When using Matplotlib's scatterplot
, sometimes autoscaling works, sometimes not.
How do I fix it?
As in the example provided in the bug report, this code works:
plt.figure()
x = np.array([0,1,2,3])
x = np.array([2,4,5,9])
plt.scatter(x,y)
But when using smaller values, the scaling fails to work:
plt.figure()
x = np.array([0,1,2,3])
x = np.array([2,4,5,9])
plt.scatter(x/10000,y/10000)
Edit: An example can be found here. I have not specified the specific cause in the question, because when encountering the error it is not obvious what causes it. Also, I have specified the solution and cause in my own answer.