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

Skip to content

Commit 261cb76

Browse files
committed
Made similar doc changes in geo.py. Also some code style fixes.
1 parent 7a540d4 commit 261cb76

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

lib/matplotlib/backend_bases.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2512,12 +2512,13 @@ def press_pan(self, event):
25122512

25132513
self._xypress=[]
25142514
for i, a in enumerate(self.canvas.figure.get_axes()):
2515-
if x is not None and y is not None and a.in_axes(event) \
2516-
and a.get_navigate() and a.can_pan() :
2515+
if (x is not None and y is not None and a.in_axes(event) and
2516+
a.get_navigate() and a.can_pan()) :
25172517
a.start_pan(x, y, event.button)
25182518
self._xypress.append((a, i))
25192519
self.canvas.mpl_disconnect(self._idDrag)
2520-
self._idDrag=self.canvas.mpl_connect('motion_notify_event', self.drag_pan)
2520+
self._idDrag=self.canvas.mpl_connect('motion_notify_event',
2521+
self.drag_pan)
25212522

25222523
self.press(event)
25232524

@@ -2538,9 +2539,10 @@ def press_zoom(self, event):
25382539

25392540
self._xypress=[]
25402541
for i, a in enumerate(self.canvas.figure.get_axes()):
2541-
if x is not None and y is not None and a.in_axes(event) \
2542-
and a.get_navigate() and a.can_zoom():
2543-
self._xypress.append(( x, y, a, i, a.viewLim.frozen(), a.transData.frozen()))
2542+
if (x is not None and y is not None and a.in_axes(event) and
2543+
a.get_navigate() and a.can_zoom()) :
2544+
self._xypress.append(( x, y, a, i, a.viewLim.frozen(),
2545+
a.transData.frozen() ))
25442546

25452547
id1 = self.canvas.mpl_connect('motion_notify_event', self.drag_zoom)
25462548

lib/matplotlib/projections/geo.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,17 @@ def get_data_ratio(self):
218218

219219
def can_zoom(self):
220220
"""
221-
Return True if this axes support the zoom box
221+
Return *True* if this axes supports the zoom box button functionality.
222+
223+
This axes object does not support interactive zoom box.
222224
"""
223225
return False
224226

225227
def can_pan(self) :
226228
"""
227-
Return True if this axes support the pan action
229+
Return *True* if this axes supports the pan/zoom button functionality.
230+
231+
This axes object does not support interactive pan/zoom.
228232
"""
229233
return False
230234

0 commit comments

Comments
 (0)