with hold=False, the axes is reset whenever something new is added to
the axes. Instead of using pylab.hold(False), clear the figure or axes
explicitly (clf() or cla())

-JJ


On Mon, Oct 5, 2009 at 9:58 PM, Ross Anderson <rpander...@gmail.com> wrote:
> Hi all,
>
> I'm making multiple semilogy histograms, which for now are on separate
> figures and not in subplots. Here's something patched together:
> def makehistogram(data,strtitle, filename):
>     fig = Figure()
>     pylab.hold(False)
>     pylab.semilogy(base=10)
>     n, bins, patches = pylab.hist(data, 50, normed=1)
>     pylab.setp(patches, 'facecolor', 'g', 'alpha', 0.75)
>     pylab.xlabel('bins')
>     pylab.ylabel('logP')
>     pylab.title(strtitle)
>     pylab.grid(True)
>     pylab.savefig(filename,dpi=72)
>
> The first call to makehistogram() saves the semilogy histogram I want, but
> the subsequent calls create regular cartesian histograms. Am I missing
> something?
>
> Thanks
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
> is the only developer event you need to attend this year. Jumpstart your
> developing skills, take BlackBerry mobile applications to market and stay
> ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
> http://p.sf.net/sfu/devconf
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to