[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

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 code

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 need to use

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

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'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, 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 John,