I have a DataFrame df
A B
H
8 0.899160 1
9 41.659693 7
10 336.414450 20
11 8.442857 3
12 0.848837 1
13 3.298130 2
14 3.447251 2
15 7.667236 3
17 0.831579 1
16 0.000000 0
I want to plot 2 histograms on one plot, so H
- is the x axis and A
with B
- y axis.
Whatever i try, e.g.:
x = delivered['A']
y = delivered['B']
fig = plt.figure()
ax = fig.add_subplot(111)
x.plot(kind='hist', ax=ax)
y.plot(kind='hist', ax=ax, color='red')
or
p = df.plot(kind='hist', x=['H'])
plots histograms with B
as an x-axis. But i need my H{8,9,10,11,12,13,14,15,16,17} to be the x axis!