New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XKCD-style doesn't work with LineCollection #2255
Comments
Unfortunately not without sacrificing performance of LineCollection. |
@mdboom - I don't mind if this doesn't get fixed in Matplotlib, but would it be possible to provide a workaround for cases where this is wanted? On the other hand, maybe this could be made an option of |
The short answer to doing this outside is to use a list of Lines rather than a LineCollection -- but that's easier said than done if you're using some higher-level plotting function that produces a LineCollection. Having looked at this again in more detail --- here's the thing that makes it hard. For vector format, Collections are implemented by storing the path only once (as a "stamp") and then referencing it multiple times, usually with some sort of translation or other affine transformation. Since when we create the "stamps" we don't know the resulting scale that the path will ultimately be rendered at, we can't determine how much to subsample the line to add the "wiggles". So getting this to work across all backends would require turning that very important optimization off at least when a wiggly line is requested, and that felt like more hassle than it was worth at the time. |
@mdboom - in my case, I'm producing the LineCollection, so I can just switch to using a list of Lines instead. I agree it's not really worth the time to try and fix this. |
I'm going to close this as a 'wontfix' for the reasons @mdboom has outlined above. |
@mdboom I meet this problem when use "PatchCollection". I want to know if it be changed know? |
Same idea, create each patch independently. |
The following code:
produces the following plot:
i.e. the blue line is not xicdified. Is there an easy way to fix this?
cc @jakevdp
The text was updated successfully, but these errors were encountered: