Make set_yscale("log") consistent with semilogy()#8537
Make set_yscale("log") consistent with semilogy()#8537dstansby wants to merge 2 commits intomatplotlib:masterfrom
Conversation
clipping behavior as plt.semilogy(), plt.semilogx() plt.loglog() when handing non-positive data.
|
If you remove the re-generated image, does it pass? (I can't spot the differences in the github UI) |
|
It seems to be the svg image (not the png one, which I updated) which is failing. It's not failing locally on my OSX machine, and isn't failing on the OSX build either, so there must be a difference between linux and OSX when it comes to svg. |
|
@dstansby maybe you need regenerate the SVG too. |
|
It's not failing on my machine, so I have no way to regenerate it! I presume if a linux box regenerated it the OSX build would fail? |
|
(note to myself to restart travis when #8672 gets merged) |
|
@dstansby done for you. |
|
Restarting travis didn't move the build to 14.04, so manually cycling the PR. |
|
Huh, still no luck on travis, will try and see what happens on a local linux box at some point. |
|
Can you check the history of why this was changed to clip? I have a vague memory that there was a long discussion at the time... |
|
It was originally changed to fix #163 (comment) - changing it back will break that problem, so I adding the code in that comment as a test would be a good idea. |
|
I do not see what changed about the test image... |
|
I think the basic idea of this--essentially reverting #2147 and thereby restoring problematic errorbar behavior (#163)--will have to be noted, and we will have to be prepared for someone to raise the issue again. Overall I think it is an improvement, though. I think that the errorbar problem could be fixed in the errorbar code in this way: for any errorbar covering a range from negative to positive values, insert a point in the Line2D at 1e-300. It would have no effect with a linear scale, and with a log scale it would allow a line to be plotted after the negative end-point is masked out. Worth the trouble? I'm not sure. |
|
I am in favor of:
|
This is an update of #8056, which fixes #8045 - I have now added the new test image, which should make the tests pass. Thanks to @jcalbert for the original fix.