Skip to content Skip to sidebar Skip to footer

Matplotlib Overflowerror: Allocated Too Many Blocks

I am plotting three sets of roughly 20 time series. Each time series has 1.8 million points and I am plotting them separately. In order to reduce execution time (because I found ou

Solution 1:

You can try to change the value of agg.path.chunksize (10000-100000) in the matplotlibrc file or during run time in matplotlib.rcParams. It causes the renderer to plot paths in chunks rather than the whole path at once; but according to the docs it might cause artifacts. See the sample matplotlibrc file at http://matplotlib.org/1.3.1/users/customizing.html for some more information.

Solution 2:

when setsmatplotlib.pyplot.rcParams['agg.path.chunksize'] = 20000, my problem is solved. The png figure is fine.

Post a Comment for "Matplotlib Overflowerror: Allocated Too Many Blocks"