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

Fixed the differencing of images for the webagg/nbagg backends. #3567

Merged
merged 1 commit into from Sep 27, 2014

Conversation

pelson
Copy link
Member

@pelson pelson commented Sep 25, 2014

In #3552 I improved the ability to handle images with transparency in the webagg/nbagg backends. Unfortunately, in doing so, I managed to break the differencing mode by always clearing the existing image on the javascript side. This change fixes the issue by keeping track of the image mode in the backend and notifying the client of any changes (as a result of transparency appearing).

@pelson pelson added this to the v1.4.1 milestone Sep 25, 2014
@pelson pelson mentioned this pull request Sep 25, 2014
@@ -86,24 +92,41 @@ def draw(self):
def draw_idle(self):
self.send_event("draw")

def set_image_mode(self, mode):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be done as a property?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could do. There is a performance cost to using properties over methods, but I agree, it would be a more pleasant interface. Having said that, I was very tempted to put a leading underscore in the name as it is a pretty useless interface unless you are developing some code in get_diff_image...

mdboom added a commit that referenced this pull request Sep 27, 2014
Fixed the differencing of images for the webagg/nbagg backends.
@mdboom mdboom merged commit ccc7afb into matplotlib:v1.4.x Sep 27, 2014
@pelson pelson deleted the nbagg_diff_image_fix branch September 29, 2014 07:38
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

Successfully merging this pull request may close these issues.

None yet

3 participants