Matplotlib: plt.subplot

define

subplot(nrows, ncols, plot_number)

!note:

plot_number starts at 1, increments across rows first and has a maximum of nrows * ncols.

test

  • code
import matplotlib.pyplot as plt   
  
plt.figure(1) 
plt.subplot(2,2,2)
plt.subplot(2,2,3) 

plt.figure(2)
plt.subplot(2,1,1)
plt.subplot(2,1,2)
  
plt.show()  
  • result
figure1
figure2

read more

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 推荐给各位科研工作者一本好书:writing science。这本书不同于其他教写作的书,不是从写作的角度教你具体...
    石博士阅读 5,366评论 1 17
  • 目录 第二天,两人继续同行,虽然经历过了昨天晚上的事情,但女孩对许文杰还是不理不睬,只是任由他跟在自己身边,仿佛他...
    问欣阅读 172评论 0 0
  • 如今的城市中,各种的大机器代替了手工生产,现在大多数的人们都特别喜欢吃凉皮儿,但是你们知道凉皮儿是怎么做出来的...
    夏沫之秋阅读 260评论 0 0
  • 和儿子晚间散步 08.5 夜读累了,散步舒体 儿子闹着要同去 倦色已浓,行人渐稀 清凉的...
    天行健君马甲阅读 199评论 0 3