-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fill_between interpolation & nan issue #11781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
While you are testing, have you tried masking instead of passing NaN? |
No, sorry - but can try tomorrow. |
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 |
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 |
Just in case, masking the NaN value doesn't help. |
I can't repro the issue, neither with mpl2.1.2 (original report) or master... |
You can't reproduce with |
This is what I get when running the example copy-pasted from #11781 (comment) with master: |
What version of numpy? I'm on 1.16.2. |
1.14.6... Upgrading to 1.16 fixes. So, I guess we can close this.... |
The issue was discovered here
deeptools/pyGenomeTracks#37
Basically, when fill_between encounters a NaN in the y values, when interpolate=True it produces a strange output.
This is without interpolation:
If I turn interpolation on (which I wouldn't expect to do anything in this case, since there are not zero crossings), this is what I get:
Even if I am misunderstanding something about how interpolation is supposed to work, clearly this is not what it should do...
mpl 2.1.2, python 3.5.2
The text was updated successfully, but these errors were encountered: