[IPython-User] [SciPy-User] IPython inline plots of stacked bars graphs
Chris Withers
chris@simplistix.co...
Sat Aug 20 21:31:08 CDT 2011
Asking on the correct list this time:
> On Sat, Aug 20, 2011 at 5:12 PM, Chris Withers <chris@simplistix.co.uk
> If I do the following in an IPython 0.11 Qt shell:
>
> import matplotlib.pyplot as plt
> menMeans = (20, 35, 30, 35, 27)
> womenMeans = (25, 32, 34, 20, 25)
> plt.bar(ind, menMeans, color='r')
> plt.bar(ind, womenMeans, color='y', bottom=menMeans)
>
> I get, as I'd expect, a stacked bar graph.
>
> However, if I do:
>
> plt.bar(ind, menMeans, color='r')
>
> ...hit enter, and then do:
>
> plt.bar(ind, womenMeans, color='y', bottom=menMeans)
>
> ...I get two separate plots.
>
> How can I add to an existing inline plot?
>
> Also, and I guess this might be more of a matplotlib question, how do I
> "reach inside" an existing plot to, for example, adjust the width of the
> bars used?
On 20/08/2011 16:46, Charles R Harris wrote:
>
> I think it is more of an ipython question, possibly a matplotlib
> question ;) You might try the hold(True) command.
Sadly, that didn't work :-S
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the IPython-User
mailing list