虚拟主机域名注册-常见问题网站推广 → 网站推广问题

Python Matplotlib subplot函数详解:创建子图

python中使用matplotlib模块的add_subplot函数添加子图,具体方法如下:

from matplotlib import pyplot as plt #导入matplotlib模块


fig = plt.figure()

ax1 = fig.add_subplot(231)

ax2 = fig.add_subplot(232)

ax3 = fig.add_subplot(233)

ax4 = fig.add_subplot(234)

ax5 = fig.add_subplot(235)

ax6 = fig.add_subplot(236)

plt.grid(True)

plt.show()




免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:bkook@qq.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。
【 双击滚屏 】 【 推荐朋友 】 【 收藏 】 【 打印 】 【 关闭 】 【 字体: 】 
上一篇:什么是安全漏洞?常见的网络安全漏洞类型
下一篇:python中使用最多的函数有哪些
  >> 相关文章
0

在线
客服

在线客服服务时间:9:00-18:00

客服
热线

19899115815
7*24小时客服服务热线

关注
微信

关注官方微信
顶部