For latest matplotlib.pyplot as today:
Are there some maximum number of items allowed in the Python lists for x and y of the plot() method?
A 100 000 seem to hang on my computer.
Example:
. . plt.plot(x, y) plt.show() . .
Hmmm, I have this problem too. A more complete example and error are useful:
import matplotlib.pyplot as plt import numpy as np x = np.random.rand(100000) y = np.random.rand(100000) fig, ax = plt.subplots() ax.plot(x, y) plt.show()
OverflowError: Exceeded cell block limit (set 'agg.path.chunksize' rcparam)
So, you can set the chunk size...
import matplotlib as mpl import matplotlib.pyplot as plt import numpy as np print(mpl.rcParams['agg.path.chunksize']) mpl.rcParams['agg.path.chunksize'] = 10000 x = np.random.rand(100000) y = np.random.rand(100000) fig, ax = plt.subplots() ax.plot(x, y) plt.show()
See #4404 #4464
I'm going to close as I don't think this is a bug per-se but a limitation of the backend for which there is a workaround. If you can't use the workaround, please feel free to re-open...
Activity
jklymak commented on May 14, 2018
Hmmm, I have this problem too. A more complete example and error are useful:
So, you can set the chunk size...
jklymak commented on May 14, 2018
See #4404 #4464
jklymak commented on May 14, 2018
I'm going to close as I don't think this is a bug per-se but a limitation of the backend for which there is a workaround. If you can't use the workaround, please feel free to re-open...