Repository navigation
Fix a crash when saving to PDF or SVG with contour hatching. - #891
Conversation
There was a problem hiding this comment.
Does this trigger the exception your fixing? Might be worth making this a numpy array from the off?
There was a problem hiding this comment.
What triggers the exception is having colors for the hatch that come from a collection or colormap -- in which case each rgb triple is a numpy array, not something hashable as was previously assumed by the PDF and SVG backends.
There was a problem hiding this comment.
I should also note -- it doesn't make sense to convert to tuples outside of the backends because the Agg backend benefits from having the colors as a Numpy array.
|
Looks good to me. Would it make sense to merge this to the v1.1.x maintenance branch? |
|
The whole thing can't be, because contourf hatching is not in v1.1.x. So maybe the thing to do is split it, merge the backend changes into v1.1.x, merge that into master, and then merge the rest of this pull request into master. Or just leave it as-is and not worry about fixing this particular bug in 1.1.x. |
|
If there's no example where this crashes in v1.1.x, let's just merge into master. |
Fix a crash when saving to PDF or SVG with contour hatching.
This was found building the docs -- generating the page for
contourf_hatching.py