Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c639af4

Browse filesBrowse files
authored
Merge pull request #9569 from anntzer/docstring-fix
Docstring fix.
2 parents ad616c6 + e461d75 commit c639af4
Copy full SHA for c639af4

File tree

Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-10
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2644,23 +2644,19 @@ class FigureManagerBase(object):
26442644
num : int or str
26452645
The figure number
26462646
2647+
key_press_handler_id : int
2648+
The default key handler cid, when using the toolmanager. Can be used
2649+
to disable default key press handling ::
2650+
2651+
figure.canvas.mpl_disconnect(
2652+
figure.canvas.manager.key_press_handler_id)
26472653
"""
26482654
def __init__(self, canvas, num):
26492655
self.canvas = canvas
26502656
canvas.manager = self # store a pointer to parent
26512657
self.num = num
26522658

26532659
self.key_press_handler_id = None
2654-
"""
2655-
The returned id from connecting the default key handler via
2656-
:meth:`FigureCanvasBase.mpl_connect`.
2657-
2658-
To disable default key press handling::
2659-
2660-
manager, canvas = figure.canvas.manager, figure.canvas
2661-
canvas.mpl_disconnect(manager.key_press_handler_id)
2662-
2663-
"""
26642660
if rcParams['toolbar'] != 'toolmanager':
26652661
self.key_press_handler_id = self.canvas.mpl_connect(
26662662
'key_press_event',

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.