Permalink
Browse files

Add docstring to _setup_canvas()

  • Loading branch information...
1 parent 8bd1d57 commit f83fbc9424ef61fbe3750b3ad57f373e8e8ee4d3 @dmcdougall dmcdougall committed Sep 2, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/matplotlib/figure.py
View
6 lib/matplotlib/figure.py
@@ -331,8 +331,10 @@ def __init__(self,
self._cachedRenderer = None
def _setup_canvas(self):
- # TODO: docstring
- import matplotlib.backends as mbackends
+ """
+ Return the FigureCanvas instance defined by the currently loaded backend.
+ """
+ import matplotlib.backends as mbackends # lazy import
backend_mod = mbackends.pylab_setup()[0]
return backend_mod.FigureCanvas(self)

0 comments on commit f83fbc9

Please sign in to comment.