Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Macosx fixes #9495

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

Merged
merged 3 commits into from
Oct 21, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/matplotlib/backends/backend_macosx.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
from __future__ import (absolute_import, division, print_function,
unicode_literals)

import six

import os

from matplotlib._pylab_helpers import Gcf
Expand Down Expand Up @@ -99,14 +97,14 @@ def get_renderer(self, cleared=False):
def _draw(self):
renderer = self.get_renderer()

if not self.figure.stale:
return renderer
if self.figure.stale:
self.figure.draw(renderer)

self.figure.draw(renderer)
return renderer

def draw(self):
self.invalidate()
self.flush_events()

def draw_idle(self, *args, **kwargs):
self.invalidate()
Expand Down
1 change: 1 addition & 0 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -1206,6 +1206,7 @@ def _on_move(self, event):
self.elev = art3d.norm_angle(self.elev - (dy/h)*180)
self.azim = art3d.norm_angle(self.azim - (dx/w)*180)
self.get_proj()
self.stale = True
Copy link
Member

Choose a reason for hiding this comment

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

Yeah, this makes sense. Don't forget to do it for the zoom action below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Zoom doesn’t need it because the calls to set limits already take care of setting stale.

self.figure.canvas.draw_idle()

# elif self.button_pressed == 2:
Expand Down