问题
Consider a list of matplotlib figures called a. I try to draw them at once writing in the cell of jupyter notebook something like
import matplotlib.pyplot as plt
%matplotlib inline
for fig in a:
fig.show()
However I can't get any figures drawn in the cell output.
Writing plt.show() inside the loop or after is useless.
How can I do this correctly?
回答1:
An option might be to use display to display the figures:
from IPython.core.display import display
for fig in a:
display(fig)
来源:https://stackoverflow.com/questions/45614123/showing-several-figures-at-once