Make more than one chart in same IPython Notebook cell
You can also call the show() function after each plot. e.g
plt.plot(a) plt.show() plt.plot(b) plt.show()
Make the multiple axes first and pass them to the Pandas plot function, like:
fig, axs = plt.subplots(1,2)df['korisnika'].plot(ax=axs[0])df['osiguranika'].plot(ax=axs[1])
It still gives you 1 figure, but with two different plots next to each other.
Something like this:
import matplotlib.pyplot as plt... code for plot 1 ...plt.show()... code for plot 2...plt.show()
Note that this will also work if you are using the seaborn
package for plotting:
import matplotlib.pyplot as pltimport seaborn as snssns.barplot(... code for plot 1 ...) # plot 1plt.show()sns.barplot(... code for plot 2 ...) # plot 2plt.show()