Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread Adam Mercer
On 14/07/07, John Hunter <[EMAIL PROTECTED]> wrote: > > Thanks John, that works great! > > You're welcome. If you are a svn user, I added a more efficient > poly_between to matplotlib.mlab and updated the fill_between.py > example, which shows filling below, above and between. Thanks John, I'll

Re: [Matplotlib-users] Bus error on multiple hist plots

2007-07-14 Thread Christopher Fonnesbeck
On Jul 14, 2007, at 3:43 PM, David Warde-Farley wrote: > Hi Chris, > > This just came up I think a day or so ago. Are you using TkAgg as > your backend, I am using TkAgg > and are you closing the plot window in between the two histograms? > Yes. > Try updating from svn, Andrew just fixed a b

Re: [Matplotlib-users] Bus error on multiple hist plots

2007-07-14 Thread John Hunter
On 7/14/07, David Warde-Farley <[EMAIL PROTECTED]> wrote: > > Bus error > > > > This is using recent svn builds of numpy and maplotlib. In particular, you need to make sure you remove your build directory and your install directory, get the latest svn, and do a clean rebuild. JDH ---

Re: [Matplotlib-users] Bus error on multiple hist plots

2007-07-14 Thread David Warde-Farley
Hi Chris, This just came up I think a day or so ago. Are you using TkAgg as your backend, and are you closing the plot window in between the two histograms? Try updating from svn, Andrew just fixed a bug. David On 14-Jul-07, at 2:05 PM, Chris Fonnesbeck wrote: > I get a repeatable bus erro

[Matplotlib-users] Bus error on multiple hist plots

2007-07-14 Thread Chris Fonnesbeck
I get a repeatable bus error when trying to plot more than one histogram of simulated data. The first plot is generated without error, but invariably a second plot crashes: In [4]: x = random.negative_binomial(2, 0.25, 1000) In [5]: from pylab import * In [6]: hist(x) Out[6]: (array([240, 318,

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread John Hunter
On 7/14/07, Adam Mercer <[EMAIL PROTECTED]> wrote: > On 14/07/07, John Hunter <[EMAIL PROTECTED]> wrote: > > > OK, the problem with this code is fill expects the vertices of the > > polygon you want filled and you are only providing the top part, not > > the bottom. The modified version of your co

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread Adam Mercer
On 14/07/07, John Hunter <[EMAIL PROTECTED]> wrote: > OK, the problem with this code is fill expects the vertices of the > polygon you want filled and you are only providing the top part, not > the bottom. The modified version of your code fills between your line > and the bottom of zero Thanks

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread John Hunter
On 7/14/07, Adam Mercer <[EMAIL PROTECTED]> wrote: I've attached the complete code ./params.py --min-mass 4 --max-mass 100 --output test.png OK, the problem with this code is fill expects the vertices of the polygon you want filled and you are only providing the top part, not the bottom. The

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread Adam Mercer
On 14/07/07, John Hunter <[EMAIL PROTECTED]> wrote: OK, you'll probably need to give us a complete, free standing example for us to debug this. I've attached the complete code ./params.py --min-mass 4 --max-mass 100 --output test.png Cheers Adam params.py Description: Binary data -

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread John Hunter
On 7/14/07, Adam Mercer <[EMAIL PROTECTED]> wrote: > I found these examples whilst trying to get the fill() method to work > but couldn't get anything working. I added the line > > axes.fill(mass, minimum_mass(options, mass), facecolor='red', alpha=0.5) > > which, if I'm following the example co

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread Adam Mercer
On 14/07/07, John Hunter <[EMAIL PROTECTED]> wrote: > On 7/14/07, Adam Mercer <[EMAIL PROTECTED]> wrote: > > > I'm trying to shade a couple of areas of a plot I'm creating, I need > > to shade the area above one line and the area below another. > > According to the documentation it looks like I nee

Re: [Matplotlib-users] shading an area of a plot

2007-07-14 Thread John Hunter
On 7/14/07, Adam Mercer <[EMAIL PROTECTED]> wrote: > I'm trying to shade a couple of areas of a plot I'm creating, I need > to shade the area above one line and the area below another. > According to the documentation it looks like I need to use the fill() > method but I can't get it to work, the

[Matplotlib-users] shading an area of a plot

2007-07-14 Thread Adam Mercer
Hi I'm trying to shade a couple of areas of a plot I'm creating, I need to shade the area above one line and the area below another. According to the documentation it looks like I need to use the fill() method but I can't get it to work, the code I use for creating the plot is below: # import req