一.需要的三方库 1.安装词云: pip install wordcloud 2.安装结巴 pip install jieba 3.安装matplotlib pip install matplotlib 二.实现代码 三.实现效果 ...
分类:
其他好文 时间:
2018-09-04 23:35:04
阅读次数:
294
当前的图表和子图可以使用plt.gcf()和plt.gca()获得, 在Rectangle函数中 (x_rect, y_rect)代表矩形框的起始点(矩形框的左下角点),target_height*Tr/480, target_weight*fr/fft_2pow_point分别代表矩形框的长度和宽 ...
分类:
编程语言 时间:
2018-09-04 19:15:48
阅读次数:
3281
ax3 = plt.subplot2grid((3,3),(2,0))表示把整个figure分为了三行三列,从第二行第0列开始作图 可以就是用网格作图,方便 ...
分类:
其他好文 时间:
2018-09-04 14:02:38
阅读次数:
287
import matplotlib.pyplot as plt import numpy as np x = np.arange(0, 10, 0.1) y1 = 0.05 * x**2 y2 = -1 * y1 fig, ax1 = plt.subplots() #获取figure默认的坐标系 a... ...
分类:
其他好文 时间:
2018-09-04 14:02:13
阅读次数:
184
from matplotlib import pyplot as plt from matplotlib import animation import numpy as np fig, ax = plt.subplots() x = np.arange(0, 2*np.pi, 0.01) line... ...
分类:
其他好文 时间:
2018-09-04 13:58:28
阅读次数:
185
plt.subplot(2,2,3) 和plt.subplot(223)的效果是一样的 均匀分隔和不均匀分隔的区别 就是subplot前后的参数不一样 ...
分类:
其他好文 时间:
2018-09-04 13:52:56
阅读次数:
222
# 导入pyplot模块 import matplotlib.pyplot as plt # 初始化figure fig = plt.figure() # 创建数据 x = [1, 2, 3, 4, 5, 6, 7] y = [1, 3, 4, 2, 5, 8, 6] # 接着,我们来绘制大图。首先... ...
分类:
其他好文 时间:
2018-09-04 13:46:33
阅读次数:
158
plt.scatter(x,y,s=.c=,alpha=)#xy是坐标,s是size,c是颜色,alpha是透明度 ...
分类:
其他好文 时间:
2018-09-04 11:42:54
阅读次数:
191
plt.yticks(())隐藏y的刻度 plt.bar(x,-y2) bar是柱状图 ...
分类:
其他好文 时间:
2018-09-04 11:39:08
阅读次数:
162