Matplotlib 给出错误“OverflowError: In draw_path: Exceeded cell block limit"; [英] Matplotlib giving error "OverflowError: In draw_path: Exceeded cell block limit"
问题描述
我正在尝试使用具有 100000000 个数据点的 matplotlib
渲染图像,但它产生错误 OverflowError: In draw_path: Exceeded cell block limit
.它可以绘制的数据点数量有限制吗?
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
. Is there a limit in the amount of data points it can draw?
推荐答案
问题是后端Agg中点数的硬编码限制.
The problem is a hardcoded limit in the number of points in the backend Agg.
尝试使用:
将 matplotlib 导入为 mplmpl.rcParams ['agg.path.chunksize'] = 10000
或其他大值.
您可以在此处找到问题和建议的解决方案: https://github.com/matplotlib/matplotlib/issues/5907
You can find the issue and the solution proposed here: https://github.com/matplotlib/matplotlib/issues/5907
这篇关于Matplotlib 给出错误“OverflowError: In draw_path: Exceeded cell block limit";的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!