Skip to content
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

1.4.0 RC1 UserWarning: Rasterization of PolyCollection will be ignored #3299

Closed
letmaik opened this issue Jul 24, 2014 · 3 comments
Closed
Milestone

Comments

@letmaik
Copy link
Contributor

letmaik commented Jul 24, 2014

Since 1.4.0 rc1 I get "../matplotlib/artist.py:686: UserWarning: Rasterization of 'matplotlib.collections.PolyCollection object at 0x6004a90' will be ignored" when using the rasterized=True parameter on a PolyCollection.

This is due to the fact that PolyCollection doesn't have its own draw method anymore (which in 1.3.1 had the @allow_rasterization decorator) but instead uses the inherited one from _CollectionWithSizes which doesn't have the decorator.

@tacaswell tacaswell added this to the v1.4.0 milestone Jul 24, 2014
@tacaswell
Copy link
Member

That does seem like a major regression..

tacaswell added a commit to tacaswell/matplotlib that referenced this issue Jul 25, 2014
The was accidentally removed as part of
b8726d0

Closes matplotlib#3299
@tacaswell
Copy link
Member

@neothemachine I have a patch that should fix the problem

@letmaik
Copy link
Contributor Author

letmaik commented Jul 26, 2014

Without having tested whether the rasterization code path was really broken, I think the only effect was the output of the UserWarning, as set_rasterized() checks hasattr(self.draw, "_supports_rasterization") which fails but self._rasterized = rasterized is set regardless and PolyCollection would invoke Collection.draw which in turn has the allow_rasterization decorator.

EDIT: To clarify, PolyCollection doesn't directly invoke Collection.draw but its inherited _CollectionWithSizes would.

jbmohler pushed a commit to jbmohler/matplotlib that referenced this issue Aug 14, 2014
The was accidentally removed as part of
b8726d0

Closes matplotlib#3299
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants