You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if len(diff_values) == 2:
if np.ma.is_masked(diff_values[1]):
return x[im1], y1[im1]
elif np.ma.is_masked(diff_values[0]):
return x[ind], y1[ind]
does not have an effect anymore (the invalid values are not masked anymore). It works if you replace np.ma.is_masked()by ~np.isfinite(). No sure if this is the right way to go, though.
Marking as "units", because how we normalize arrays after they come to us is tied up in the units discussion. It'd be nice if every x/y data array input to axes methods got the same consistent conversion, and that would certainly include how to handle NaN versus masked....
Activity
Phlya commentedon Jul 27, 2018
Another example to clarify what's going on
[-]fill_between interpolation issue[/-][+]fill_between interpolation & nan issue[/+]Phlya commentedon Jul 27, 2018
Also possible to make an example where this fails when there actually are negative values and a
where=y>0condition:jklymak commentedon Jul 27, 2018
While you are testing, have you tried masking instead of passing NaN?
Phlya commentedon Jul 27, 2018
No, sorry - but can try tomorrow.
timhoffm commentedon Jul 27, 2018
Part of the problem is that
_axes.py l.5039:
casts the masked arrays back to regular arrays.
_axes.py l.5063ff:
does not have an effect anymore (the invalid values are not masked anymore). It works if you replace
np.ma.is_masked()by~np.isfinite(). No sure if this is the right way to go, though.jklymak commentedon Jul 27, 2018
Good find; seems like thats definitely the issue.
Marking as "units", because how we normalize arrays after they come to us is tied up in the units discussion. It'd be nice if every x/y data array input to
axesmethods got the same consistent conversion, and that would certainly include how to handle NaN versus masked....Phlya commentedon Jul 28, 2018
Just in case, masking the NaN value doesn't help.
jklymak commentedon Mar 3, 2019
This looks to have been introduced in #7562... ping @anntzer.
anntzer commentedon Mar 3, 2019
I can't repro the issue, neither with mpl2.1.2 (original report) or master...
jklymak commentedon Mar 4, 2019
You can't reproduce with
interpolate=True?anntzer commentedon Mar 4, 2019
This is what I get when running the example copy-pasted from #11781 (comment) with master:

jklymak commentedon Mar 4, 2019
#11781 (comment) ?
anntzer commentedon Mar 4, 2019
jklymak commentedon Mar 4, 2019
anntzer commentedon Mar 4, 2019
What version of numpy? I'm on 1.16.2.
I can't think of anything else...
jklymak commentedon Mar 4, 2019
1.14.6... Upgrading to 1.16 fixes. So, I guess we can close this....