How to separately plot the figures in one big single figure using matplotlib?
<p>I have just started learning <code>Python</code>, I am analyzing a data from <code>.csv</code> file and I want to separate figures, but I am getting all the plots in one graph and I am not able to separate the graphs. Please help!</p>

<pre><code>n = 10
i=0
for i in range(0,n):
    inflammation = matplotlib.pyplot.plot(data[i,:40])#inflammation graph for patient 0
</code></pre>

<p>This is the image i got ,but I want separate graphs:</p>

<p><a href="https://i.stack.imgur.com/qiH0C.png" rel="nofollow"><img src="https://i.stack.imgur.com/qiH0C.png" alt="enter image description here"></a></p>

<p>Just use a new <code>figure()</code></p>

<pre><code>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
</code></pre>

<p>Each figure uses a lot of memory. So use it sparingly. Learn about <code>clf()</code> and <code>cla()</code> and <code>savefig()</code> if you have too many figures ...</p>

python matplotlib