Closed
Description
Bug report
Bug summary
In trying to debug some tests, I discovered some strange behavior. I'm not certain it's a bug, but I can't really think of an explanation for it, so I'm reporting.
Code for reproduction
import numpy as np
import matplotlib.pyplot as plt
f, ax = plt.subplots()
x, y = np.random.randn(2, 50)
ax.scatter(x, y)
xlim = ax.get_xlim()
ax.scatter(x, y)
print(xlim == ax.get_xlim())
Actual outcome
False
Expected outcome
True
Other observations
It appears to be scatter
dependent. If I replace both calls to scatter
with plot
, it passes. Calling scatter
then plot
passes, but calling plot
then scatter
fails.
Matplotlib version
- Operating system: MacOS
- Matplotlib version: '3.1.1'
- Matplotlib backend (
print(matplotlib.get_backend())
): notebook inline, reproduces on Agg - Python version: 3.7
Metadata
Metadata
Assignees
Labels
No labels