Edit the width of bars using pd.DataFrame.plot()

For anyone coming across this question:

Since pandas 0.14, plotting with bars has a ‘width’ command:
https://github.com/pydata/pandas/pull/6644

The example above can now be solved simply by using

df.plot(kind='bar', stacked=True, width=1)

See pandas.DataFrame.plot.bar or pandas.DataFrame.plot with kind='bar'.

When changing the width of the bars, it might also be appropriate to change the figure size by specifying the figsize= parameter.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)