()
2.3 设置坐标轴1
与matlab类似
设置x/y轴的范围
plt.xlim((-1, 2))
plt.ylim((-2, 3))
设置x/y轴的坐标轴名称
plt.xlabel('I am x...,我们可以使用 annotation. matplotlib 中的 annotation 有两种方法, 一种是用 plt 里面的 annotate,一种是直接用 plt 里面的 text 来写标注
import...xytext=(+30, -30) 和 textcoords='offset points' 对于标注位置的描述 xy 偏差值
arrowprops是对图中箭头类型的一些设置
'''
#添加注释text...#interpolation表示相应的内插法
plt.imshow(a,interpolation='nearest',cmap='bone',origin='lower')
#添加colorbar...不同内插法的描述
3.5 3D 数据
多图合并显示
4.1 Subplot 多合一显示
和matlab相似
plt.subplot(2,2,1)
plt.plot([0,1],[0,1])
4.2 Subplot