Stack a bar chart for a single series pandas

Viewed 3243

I know how to create a stacked bar chart using a dataframe with multiple rows, but is there a way to plot a series such that each index in the series in put into a stacked bar plot?

What I get is something like this:

dodged bar graph

Code:

series = pd.Series(3 * np.random.rand(4), index=['a', 'b', 'c', 'd'], name='series')
series.plot(kind = 'bar')

But what I want is to show a,b,c, and d all in one stacked bar graph. Can somebody help?

1 Answers
Related