-
Notifications
You must be signed in to change notification settings - Fork 4
Issue #70 #83
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
base: dev_Peiderk
Are you sure you want to change the base?
Issue #70 #83
Conversation
|
This solution rasterizes collections from a less specific selection as what was possible using the attribute collections, which has been deprecated in matplotlib, and for what doesn't need to (and can't) get rasterized it simply fails to do so and filter out the warning. not the cleanest solution but has the same result as previously while solving the deprecation issue |
pirmink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Solving the deprecation issue is important to be able to move to newer versions, so the workaround which includes filtering error messages is ok until a cleaner solution is found.
pirmink
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comment as suggested and change title to something indicating the problem.
| for contour in contours.collections: | ||
| contour.set_rasterized(True) | ||
|
|
||
| new = ax.ax.collections[len(before):] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| new = ax.ax.collections[len(before):] | |
| # Workaround for deprecated contours.collection: | |
| # Loop over ax.collections, ignore warning that are produced for collections | |
| # that cannot be rasterized. | |
| new = ax.ax.collections[len(before):] |
This solution solves the collections attribute deprecation in matplotlib draw_colors_contours, but the plots weigh almost double as much storage and the shapes on the map have worse boundaries.