matplotlib
画图
pyorz
python 爱好者
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
matplotlib-03-实例总结
来源1 来源2 简单的 x,y import numpy as np import matplotlib.pyplot as plt t = np.arange(0.0, 2.0, 0.01) s = np.sin(2*np.pi*t) plt.plot(t, s) plt.xlabel('time (s)') plt.ylabel('voltage (mV)') plt.title('About as simple as it gets, folks') plt.grid(True) plt.show原创 2020-10-27 16:28:52 · 323 阅读 · 0 评论 -
matplotlib-02-进阶
text 和 annotate区别 text() 函数在 Axes 对象的指定位置添加文本,而 annotate() 则是对某一点添加注释文本,需要考虑两个位置:一是注释点的坐标 xy ,二是注释文本的位置坐标 xytext: fig = plt.figure() ax = fig.add_subplot(111) t = np.arange(0.0, 5.0, 0.01) s = np.cos(2*np.pi*t) line, = ax.plot(t, s, lw=2) ax.annotate('lo原创 2020-10-27 15:59:18 · 434 阅读 · 1 评论 -
matplotlib-01-pyplot
整理:https://apachecn.gitee.io/ailearning/#/docs/da/081 上面的图看不到,就将代码全部跑了一遍画图 import numpy as np import matplotlib.pyplot as plt a=[1,2,3,4] b=[3,1,5,7] plt.plot(a,b) plt.show() 颜色 字符 颜色 'b' 蓝色,blue 'g' 绿色,green 'r' 红色,red 'c' 青色,cyan 'm' 品红,magenta 'y' 黄色原创 2020-10-27 15:06:46 · 206 阅读 · 1 评论
分享