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>You could always take a look at using <a href="http://matplotlib.org/api/pyplot_api.html?highlight=subplot#matplotlib.pyplot.subplot" rel="nofollow"><code>subplot()</code></a>, which would work as follows:</p>

<pre><code>import matplotlib.pyplot as plt

for n in range(1, 11):
    plt.subplot(2, 5, n)
    plt.plot(range(12))

plt.show()
</code></pre>

<p>This would display the following in a single figure:</p>

<p><a href="https://i.stack.imgur.com/8ELXu.png" rel="nofollow"><img src="https://i.stack.imgur.com/8ELXu.png" alt="Ten subplots"></a></p>

python matplotlib