I am trying to plot n number of histograms and show them all together side by side (not in the same histograms.
I have tried this code:
for r in range(1, n):
plt.hist(combined['apple{} tomato'.format(n)], bins = bin, alpha=0.5, color='#0bf9ea')
plt.hist(combined['apple{} potato'.format(n)], bins = bin, alpha=0.5, color='#ff7fa7')
plt.show()
When I type this code, it will show me histogram 1, then when I close the figure, histogram 2 will appear and so on until histogram n.
for r in range(1, n):
plt.hist(combined['apple{} tomato'.format(n)], bins = bin, alpha=0.5, color='#0bf9ea')
plt.hist(combined['apple{} potato'.format(n)], bins = bin, alpha=0.5, color='#ff7fa7')
plt.show()
However, when I try this code, it shows me one histogram with all the histograms in one.
Is there a way to show all n different histograms separately but in one window ?
Thanks :D