-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
fill_between incorrect with log y-axis and value 0 #8623
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
Confirmed on master, thanks for the code sample. |
Slightly abstractly, |
@dstansby - Thanks for looking into the issue! When creating the issue I forgot to mention #7371 . Also, if someone else has this issue, I wanted to mention that it's possible to work around the issue using where = (y_hi > 0) & (y_lo > 0) & (other possible selections you might have)
ax.fill_between(energy.value, y_lo.value, y_hi.value, where=where) This is what I'm doing for now. |
@cdeil and @dstansby I think this issue was already dealt with using the current latest code in master. You just have to call |
@Tuan333 - Yes, indeed The main remaining issue is that we have to teach our users about it, because if they call Close this issue? |
Probably related to #8537? |
Yeah, I think finishing that PR will fix this and a few other open bugs.
I'll try and get round to it in the next couple of days.
…On 3 Jul 2017 8:03 pm, "Antony Lee" ***@***.***> wrote:
Probably related to #8537
<#8537>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#8623 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AF6RfHrvIf6rvOy78OZB_MIIuUqwaXunks5sKTsIgaJpZM4NbNpa>
.
|
I don't think it'll make it worse than the image in the original bug report, but it certainly doesn't fix it. |
Currently, the MWE results in @tacaswell @anntzer |
I think this is fixed by #9477 |
fill_between doesn't give the result I expect if using a log y-axis and having a value of 0 in the y1 array.
Example:
Actual outcome:
The polygon created by fill_between somehow connects the last and first point, resulting in a completely incorrect patch:
Expected outcome
I was expecting / hoping that the band would be filled correctly and simply clipped (i.e. the result I get when changing the last y1 value from 0 to e.g. 1e-10). In the plot, the blue fill should be between the red and green line.
Matplotlib version
This is with Matplotlib 2.0.0.
(on Macports, but I don't think that matters)
The text was updated successfully, but these errors were encountered: