Matplotlib OverflowError: Allocated too many blocks

前端 未结 2 1682
生来不讨喜
生来不讨喜 2020-12-17 18:01

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 f

相关标签:
2条回答
  • 2020-12-17 18:18

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

    0 讨论(0)
  • 2020-12-17 18:24

    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.

    0 讨论(0)
提交回复
热议问题