Skip to content

Commit e731d13

Browse files
committed
Cleanup comments/docs in backend_macosx, backend_pdf.
We don't bother with the staple comments about pylab integration in other backends, so remove them from backend_macosx It seems better to let FigureCanvasMac and FigureCanvasPdf just inherit the parent docstrings (and move comments about implementation details of FigureCanvasMac to, well, comments).
1 parent 845eada commit e731d13

File tree

2 files changed

+7
-37
lines changed

2 files changed

+7
-37
lines changed

lib/matplotlib/backends/backend_macosx.py

Lines changed: 6 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -10,34 +10,18 @@
1010
from matplotlib.widgets import SubplotTool
1111

1212

13-
########################################################################
14-
#
15-
# The following functions and classes are for pylab and implement
16-
# window/figure managers, etc...
17-
#
18-
########################################################################
19-
20-
2113
class TimerMac(_macosx.Timer, TimerBase):
2214
"""Subclass of `.TimerBase` using CFRunLoop timer events."""
2315
# completely implemented at the C-level (in _macosx.Timer)
2416

2517

2618
class FigureCanvasMac(_macosx.FigureCanvas, FigureCanvasAgg):
27-
"""
28-
The canvas the figure renders into. Calls the draw and print fig
29-
methods, creates the renderers, etc...
30-
31-
Events such as button presses, mouse movements, and key presses
32-
are handled in the C code and the base class methods
33-
button_press_event, button_release_event, motion_notify_event,
34-
key_press_event, and key_release_event are called from there.
35-
36-
Attributes
37-
----------
38-
figure : `matplotlib.figure.Figure`
39-
A high-level Figure instance
40-
"""
19+
# docstring inherited
20+
21+
# Events such as button presses, mouse movements, and key presses
22+
# are handled in the C code and the base class methods
23+
# button_press_event, button_release_event, motion_notify_event,
24+
# key_press_event, and key_release_event are called from there.
4125

4226
required_interactive_framework = "macosx"
4327
_timer_cls = TimerMac
@@ -147,12 +131,6 @@ def set_message(self, message):
147131
_macosx.NavigationToolbar2.set_message(self, message.encode('utf-8'))
148132

149133

150-
########################################################################
151-
#
152-
# Now just provide the standard names that backend.__init__ is expecting
153-
#
154-
########################################################################
155-
156134
@_Backend.export
157135
class _BackendMac(_Backend):
158136
FigureCanvas = FigureCanvasMac

lib/matplotlib/backends/backend_pdf.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2692,15 +2692,7 @@ def attach_note(self, text, positionRect=[-100, -100, 0, 0]):
26922692

26932693

26942694
class FigureCanvasPdf(FigureCanvasBase):
2695-
"""
2696-
The canvas the figure renders into. Calls the draw and print fig
2697-
methods, creates the renderers, etc...
2698-
2699-
Attributes
2700-
----------
2701-
figure : `matplotlib.figure.Figure`
2702-
A high-level Figure instance
2703-
"""
2695+
# docstring inherited
27042696

27052697
fixed_dpi = 72
27062698
filetypes = {'pdf': 'Portable Document Format'}

0 commit comments

Comments
 (0)