8000 Add docstring to _setup_canvas() · matplotlib/matplotlib@f83fbc9 · GitHub
[go: up one dir, main page]

Skip to content

Commit f83fbc9

Browse files
committed
Add docstring to _setup_canvas()
1 parent 8bd1d57 commit f83fbc9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

lib/matplotlib/figure.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,10 @@ def __init__(self,
331331
self._cachedRenderer = None
332332

333333
def _setup_canvas(self):
334-
# TODO: docstring
335-
import matplotlib.backends as mbackends
334+
"""
335+
Return the FigureCanvas instance defined by the currently loaded backend.
336+
"""
337+
import matplotlib.backends as mbackends # lazy import
336338
backend_mod = mbackends.pylab_setup()[0]
337339
return backend_mod.FigureCanvas(self)
338340

0 commit comments

Comments
 (0)
0