-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Description
Hi! This bug is an issue with interoperability with Inkscape. It can be solved either by improving the performance of Inkscape for certain pathological cases, or by fixing Matplotlib such that it generates non-pathological outputs. To reproduce this issue, generate a scatter plot with a few thousand points, save it as a pdf using savefig(), and then attempt to edit it in Inkscape. The application should hang for up to minutes between mouse clicks while attempting to redraw the point cloud. I suspect the issue is caused by Matplotlib generating output with a very high depth of nested groups, as well as possibly applying excessive clipping when it is not necessary. So far, I can't even use a python script to strip out the redundant tags as the level of nesting is so high that it causes a stack overflow.
edit: On further inspection, it looks like Matplotlib is not only generating deeply nested groups, but that it's storing almost the entire scatter plot in essentially a linked-list of groups, with each point defined in terms of a transform relative to the previous point. This really should not be happening.