/Users/dstansby/matplotlib/lib/matplotlib/axes/_base.py:3208: UserWarning: Attempted to set non-positive ylimits for log-scale axis; invalid limits will be ignored.
'Attempted to set non-positive ylimits for log-scale axis; '
Expected outcome
I would expect the horizontal line to be ignored, and axis limits to remain as they were originally.
Matplotlib version
Operating System: OSX 10.12.5
Matplotlib Version: master branch installed using pip
ignores the hline completely, and just shows the single scatter point as it was before. In my opinion I think this should be the behavior of `ax.set_yscale('log') too. At the very least they should be consistent which I think is what #8537 is for.
Activity
tacaswell commented on Jun 20, 2017
On the other hand, you asked it to draw a line at 0 a it made a best-effort to do so. What does a line at a negative position do?
anntzer commented on Jun 20, 2017
Do nothing, which is what happens when the call to scatter is not included.
OTOH this is fixed by #8537.
dstansby commented on Jun 21, 2017
Trying a line at a negative position (ax.axhline(-1)) results in exactly the same behavior as above.
Changing the code to
ignores the hline completely, and just shows the single scatter point as it was before. In my opinion I think this should be the behavior of `ax.set_yscale('log') too. At the very least they should be consistent which I think is what #8537 is for.
dstansby commented on Jul 26, 2017
Fixed by #8836