Matplotlib giving error “OverflowError: In draw_path: Exceeded cell block limit”

后端 未结 3 1594
我在风中等你
我在风中等你 2021-02-05 02:51

I\'m trying to render an image using matplotlib with 100000000 data points and it produces the error OverflowError: In draw_path: Exceeded cell block limit

3条回答
  •  情话喂你
    2021-02-05 03:35

    The problem is a hardcoded limit in the number of points in the backend Agg.

    Try using:

    import matplotlib as mpl mpl.rcParams['agg.path.chunksize'] = 10000

    or other large value.

    You can find the issue and the solution proposed here: https://github.com/matplotlib/matplotlib/issues/5907

提交回复
热议问题