我有一组12个地块,我想保存为一个。第一组是由9个片段组成的3x3子片段,第二部分是4个片段的2x2子片段。 我试着在这两幅图之间添加一个子图(121),并尝试使用图(1)和图(2),但两幅图都不符合我的要求,将这两幅图像保存为一幅大图像。有什么简单的方法吗?在
plt.subplot(331)
plt.imshow(getpoly(seg1),origin="lower")
plt.subplot(332)
plt.imshow(getpoly(seg2),origin="lower")
plt.subplot(333)
plt.imshow(getpoly(seg3),origin="lower")
plt.subplot(334)
plt.imshow(getpoly(seg4),origin="lower")
plt.subplot(335)
plt.imshow(getpoly(seg5),origin="lower")
plt.subplot(336)
plt.imshow(getpoly(seg6),origin="lower")
plt.subplot(337)
plt.imshow(getpoly(seg7),origin="lower")
plt.subplot(338)
plt.imshow(getpoly(seg8),origin="lower")
plt.subplot(339)
plt.imshow(getpoly(seg9),origin="lower")
plt.subplot(221)
plt.imshow(h1,origin="lower")
plt.colorbar()
plt.subplot(222)
plt.imshow(h2,origin="lower")
plt.colorbar()
plt.subplot(223)
plt.imshow(getpoly(h2),origin="lower")
plt.colorbar()
plt.subplot(224)
plt.imshow(h1-getpoly(h2),origin="lower")
plt.colorbar()
您可能希望将
gridspec
与GridSpecFromSubplotSpec
一起使用,如here所示。在相关问题 更多 >
编程相关推荐