with a dataframe df in Pandas, I am trying to plot histograms on the same page filtering by 3 different variables; the intended outcome is histograms of the values for each of the three types. The following code works for me as PLOTs, but when I change to HISTs, they all stack on top of each other. Any suggestions?
plt.figure(1)
plt.subplot(311)
df[df.Type == 'Type1'].values.plot()
plt.subplot(312)
df[df.Type == 'Type2'].values.plot()
plt.subplot(313)
df[df.Type == 'Type3'].values.plot()
plt.savefig('output.pdf')
Is this a bug in Pandas or are plot and hist not interchangable?
Thanks in advance