Bug (?) in fill_between

Hi,

I think I found a bug in the command fill_between().
If I try to make a fill_between plot on an x-axis that spans both negative and positive values (and only in that case), I have some funny results.
I attach the code that gives the wrong result, the workaround I use, and their output.

Regards

figure()
fill_between(totime,vartotal-varstddv,vartotal+varstddv,color='blue',alpha=0.3)
savefig('wrong.png',format='png',dpi=150)

figure()
fill(np.concatenate((totime[::-1],totime)),np.concatenate((vartotal[::-1]-varstddv[::-1],vartotal+varstddv)),color='blue',alpha=0.25)
savefig('right.png',format='png',dpi=150)

right.png

wrong.png

Can you post a complete free-standing example that replicates the problem?

···

On Wed, Oct 20, 2010 at 8:43 AM, Giovanni Plantageneto <g.plantageneto@...891...> wrote:

Hi,

I think I found a bug in the command fill_between().
If I try to make a fill_between plot on an x-axis that spans both negative and positive values (and only in that case), I have some funny results.
I attach the code that gives the wrong result, the workaround I use, and their output.

I checked the data (I can't send it, sorry), and it seems that the problem is given by the presence of not-a-numbers in the array. In the workaraound version, the nan are at the end, and that solves the problem.
Shouldn't fill_between get rid of the nans?

----- Start Original Message -----

···

Sent: Wed, 20 Oct 2010 09:03:36 -0500
From: John Hunter <jdh2358@...149...>
To: g.plantageneto@...891...
Subject: Re: [matplotlib-devel] Bug (?) in fill_between

On Wed, Oct 20, 2010 at 8:43 AM, Giovanni Plantageneto > <g.plantageneto@...891...> wrote:
> Hi,
>
> I think I found a bug in the command fill_between().
> If I try to make a fill_between plot on an x-axis that spans both negative and positive values (and only in that case), I have some funny results.
> I attach the code that gives the wrong result, the workaround I use, and their output.

Can you post a complete free-standing example that replicates the problem?

----- End Original Message -----