8000 correct PEP8 problems · matplotlib/matplotlib@f18bd4a · GitHub
[go: up one dir, main page]

Skip to content

Commit f18bd4a

Browse files
committed
correct PEP8 problems
1 parent 7487b23 commit f18bd4a

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1679,7 +1679,8 @@ def press(self, event):
16791679
if not self.RetinaFix:
16801680
self.wxoverlay = wx.Overlay()
16811681
else:
1682-
self.savedRetinaImage = self.canvas.copy_from_bbox(self.canvas.figure.gca().bbox)
1682+
self.savedRetinaImage = self.canvas.copy_from_bbox(
1683+
self.canvas.figure.gca().bbox)
16831684
self.zoomStartX = event.xdata
16841685
self.zoomStartY = event.ydata
16851686

@@ -1697,21 +1698,22 @@ def release(self, event):
16971698
self.prevZoomRect = None
16981699

16991700
def draw_rubberband(self, event, x0, y0, x1, y1):
1700-
if self.RetinaFix:
1701-
# wx.DCOverlay does not work properly on Macs with Retina displays
1702-
# for Macs, use the following code instead.
1703-
rubberBandColor = '#C0C0FF' # or load from config?
1701+
if self.RetinaFix: # On Macs, use the following code
1702+
# wx.DCOverlay does not work properly on Retina displays.
1703+
rubberBandColor = '#C0C0FF'
17041704
if self.prevZoomRect:
17051705
self.prevZoomRect.pop(0).remove()
17061706
self.canvas.restore_region(self.savedRetinaImage)
1707-
X0,X1,Y0,Y1 = self.zoomStartX,event.xdata,self.zoomStartY,event.ydata
1707+
X0,X1 = self.zoomStartX,event.xdata
1708+
Y0,Y1 = self.zoomStartY,event.ydata
17081709
lineX = (X0, X0, X1, X1, X0)
17091710
lineY = (Y0, Y1, Y1, Y0, Y0)
1710-
self.prevZoomRect = self.canvas.figure.gca().plot(lineX,lineY,'-',color=rubberBandColor)
1711+
self.prevZoomRect = self.canvas.figure.gca().plot(
1712+
lineX,lineY,'-',color=rubberBandColor)
17111713
self.canvas.figure.gca().draw_artist(self.prevZoomRect[0])
17121714
self.canvas.blit(self.canvas.figure.gca().bbox)
17131715
return
1714-
1716+
17151717
# Use an Overlay to draw a rubberband-like bounding box.
17161718

17171719
dc = wx.ClientDC(self.canvas)

0 commit comments

Comments
 (0)
0