【数据挖掘重要笔记day32】Matplotlib中的axes与axis的区别


axis:即轴
axes:灵活的subplot,可以翻译成轴域,subplot即特殊的axes.

subplot

fig = plt.figure 
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
plt.show()

axes

fig = plt.figure()
ax3 = fig.add_axes([0.1,0.1,0.8,0.8])
ax4 = fig.add_axes([0.72,0.72,0.16,0.16])
plt.show()

全部评论

相关推荐

AC鸽想进大厂:你是我见过最美的牛客女孩
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务