【发布时间】:2012-06-24 22:38:51
【问题描述】:
我想创建一个函数,在单个窗口中在屏幕上绘制一组图形。现在我写了这段代码:
import pylab as pl
def plot_figures(figures):
"""Plot a dictionary of figures.
Parameters
----------
figures : <title, figure> dictionary
"""
for title in figures:
pl.figure()
pl.imshow(figures[title])
pl.gray()
pl.title(title)
pl.axis('off')
它工作得很好,但我希望可以选择在单个窗口中绘制所有数字。而这段代码没有。我读过一些关于 subplot 的东西,但它看起来很棘手。
【问题讨论】:
-
也可以使用skimage的蒙太奇功能stackoverflow.com/a/65033307/11143105
标签: python image matplotlib subplot