![](/img/trans.png)
[英]How to separately plot and save to figure from multiple files using glob and matplotlib?
[英]How to separately plot the figures in one big single figure using matplotlib?
您可以隨時查看使用subplot()
,其工作方式如下:
import matplotlib.pyplot as plt
for n in range(1, 11):
plt.subplot(2, 5, n)
plt.plot(range(12))
plt.show()
這將在單個圖中顯示以下內容:
只需使用一個新的figure()
n = 10
i=0
for i in range(0,n):
matplotlib.pyplot.figure()
inflammation = matplotlib.pyplot.plot(data[i,:40]) #inflammation graph for patient 0
每個數字都占用大量內存。 因此,請謹慎使用。 如果數字太多,請了解clf()
以及cla()
和savefig()
...
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.