Questions tagged «figures»

6
防止剧情显示在jupyter笔记本中
如何防止特定的情节显示在Jupyter笔记本中?我在笔记本中有几个绘图,但我希望将其中的一部分保存到文件中,而不要在笔记本上显示,因为这会大大降低速度。 Jupyter笔记本的最小工作示例是: %matplotlib inline from numpy.random import randn from matplotlib.pyplot import plot, figure a=randn(3) b=randn(3) for i in range(10): fig=figure() plot(b) fname='s%03d.png'%i fig.savefig(fname) if(i%5==0): figure() plot(a) 如您所见,我有两种图,a和b。我想绘制a并显示,而我不想b示,我只希望将它们保存在文件中。希望这会加快速度,并且不会污染我的笔记本,而我不需要看到这些数字。 感谢您的时间
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.