我想创建一个功能,在一个窗口中在屏幕上绘制一组图形.到现在为止我写这段代码:
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')
Run Code Online (Sandbox Code Playgroud)
它工作得很好,但我想有选择在单个窗口中绘制所有数字.而这段代码没有.我读了一些关于subplot的东西,但看起来很棘手.