1、用 R 的基础图形系统 x <- c(21, 33, 42, 46, 60) y <- c(16, 20, 27, 41, 61) plot(x, y, type='b') 2 matplotlib 库 import matplotlib.pyplot as plt x = [21, 33, 4 ...
分类:
编程语言 时间:
2020-01-10 22:13:33
阅读次数:
82
import matplotlib.pyplot as plt import matplotlib.patches as mpatches # draw rectangles on the original image fig, ax = plt.subplots(ncols=1, nrows=1, ...
分类:
其他好文 时间:
2020-01-10 20:43:13
阅读次数:
109
准备工作 matplotlib库 三体.txt(utf 8编码) 三体主要人物.txt(utf 8编码) 代码 大纲 导入matplotlib.pyplot方法,创建1个Novel类,包含2个属性和4个方法。 初始化 类包含两个属性,小说名字和主要人物名字。 主要人物来源于《三体》百度百科,以每行一 ...
分类:
编程语言 时间:
2020-01-09 10:33:27
阅读次数:
121
"介绍" "功能简介" "基础功能" "使用简介" "Pyplot示例" "图的种类" "图片示例" "一个完整的plot的例子" "使用style sheets与 rcParams控制格式" "style sheets" "rcParams" "中级功能" "Artist 教程" "legend ...
分类:
其他好文 时间:
2020-01-07 00:59:12
阅读次数:
101
from sklearn.datasets import make_blobs, load_iris import matplotlib.pyplot as plt # 支持中文 plt.rcParams['font.sans-serif'] = ['SimHei'] # 用来正常显示中文标签 pl... ...
分类:
其他好文 时间:
2020-01-07 00:48:06
阅读次数:
96
代码如下: # encoding :utf-8 import io # 文件数据流 import datetime import matplotlib.pyplot as plt import tensorflow as tf from tensorflow import keras # 导入常见网 ...
分类:
其他好文 时间:
2020-01-03 15:38:58
阅读次数:
318
```python import numpy as np import matplotlib.pyplot as plt # 准备数据 labels = ['basketball', 'football', 'volleyball', 'tennis'] # 标签列表 colors = ['#4B0... ...
分类:
其他好文 时间:
2020-01-03 12:33:49
阅读次数:
62
```pythonimport matplotlib.pyplot as pltimport numpy as np# 构造数据,表示300部电影的时长data = np.random.randint(70, 150, 300)# 创建画布# 显示中文plt.rcParams['font.sans-... ...
分类:
其他好文 时间:
2020-01-03 12:25:33
阅读次数:
98
import requests import webbrowser import matplotlib.pyplot as plot from urllib.request import urlopen with open('t1.txt','r')as f: x=f.read().split('\ ...
分类:
其他好文 时间:
2020-01-01 23:51:21
阅读次数:
81
import pandas as pd import numpy as np import matplotlib.pyplot as plt class linear_regression(object): 计算均方误差损失 def compute_loss(self,y,y_hat): retur ...
分类:
其他好文 时间:
2020-01-01 18:39:11
阅读次数:
101