Showing several figures at once

本小妞迷上赌 提交于 2019-12-11 06:25:13

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!