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
empty scatter messes up the limits #1490
Comments
Confirmed. Furthermore, it should be noted that each subsequent call to empty scatter will grow the limits even further. I suspect it is some sort of issue with autoscale_view() when one has an empty collection. A temporary fix would be to only call autoscale_view() if the length of the collection is greater than zero, but I would rather fix the issue with autoscale_view(). |
@WeatherGod I found the problem, and the issue is not with The proper fix, as far as I can tell, would be to correct Another fix, which doesn't prevent this issue from popping up somewhere else would be to fix |
Closed by #1497 |
Tested with 1.1.1 (didn't manage 1.2.0 to show anything yet).
To reproduce:
from matplotlib import pyplot as plt
plt.scatter([0,1],[0,1])
plt.scatter([], []) # The lower limit shifts appreciably, compared to not executing this line.
plt.show()
The text was updated successfully, but these errors were encountered: