Closed
Description
Bug report
Bug summary
The interaction of setting axis limits and autoscaling changed in 3.2 with little guidance, introducing unexpected behavior that doesn't always make sense.
Code for reproduction
Here is a plot that looks very different on 3.1.2 and 3.2.1
import numpy as np
import matplotlib.pyplot as plt
f, ax = plt.subplots()
x = np.arange(100)
y = np.random.uniform(-.1, .1, 100)
ax.scatter(x, y)
assert ax._autoscaleYon
ax.set_ylim((-.5, .5), auto=None)
Actual outcome
On 3.2.1
Expected outcome
On 3.1.2
Matplotlib version
- Operating system: macOS
- Matplotlib version: 3.2.1
- Matplotlib backend (
print(matplotlib.get_backend())
): pylab inline - Python version: 3.7