8000 WX/WXagg backend add code that zooms properly on a Mac with a Retina display by briantoby · Pull Request #5631 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

WX/WXagg backend add code that zooms properly on a Mac with a Retina display #5631

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 5 commits into from
Dec 9, 2015
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
correct more PEP8 problems
  • Loading branch information
briantoby committed Dec 7, 2015
commit 62281a9fe86f04436fde4ab3bb67c209fcc91e25
8 changes: 4 additions & 4 deletions lib/matplotlib/backends/backend_wx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1699,17 +1699,17 @@ def release(self, event):

def draw_rubberband(self, event, x0, y0, x1, y1):
if self.RetinaFix: # On Macs, use the following code
# wx.DCOverlay does not work properly on Retina displays.
# wx.DCOverlay does not work properly on Retina displays.
rubberBandColor = '#C0C0FF'
if self.prevZoomRect:
self.prevZoomRect.pop(0).remove()
self.canvas.restore_region(self.savedRetinaImage)
X0,X1 = self.zoomStartX,event.xdata
Y0,Y1 = self.zoomStartY,event.ydata
X0, X1 = self.zoomStartX, event.xdata
Y0, Y1 = self.zoomStartY, event.ydata
lineX = (X0, X0, X1, X1, X0)
lineY = (Y0, Y1, Y1, Y0, Y0)
self.prevZoomRect = self.canvas.figure.gca().plot(
lineX,lineY,'-',color=rubberBandColor)
lineX, lineY, '-', color=rubberBandColor)
self.canvas.figure.gca().draw_artist(self.prevZoomRect[0])
self.canvas.blit(self.canvas.figure.gca().bbox)
return
Expand Down
0