Using plot.barh
creates a bar chart with equally spaced columns.
However, I have a column with unequally spaced values (df1['dist']
) which I would like to use in the plot to provide additional information:
df1 = pd.DataFrame(np.random.rand(5, 2), columns=['a', 'b'])
df1['dist'] = pd.Series([1,5,6.5,15,45], index=df1.index)
df1.plot.barh(['dist'],['a','b'],stacked=True, width=.6, color = ['y','b'])
plt.show()
Is that possible?