MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _set_base_canvas

Method _set_base_canvas

lib/matplotlib/figure.py:3009–3019  ·  view source on GitHub ↗

Initialize self.canvas with a FigureCanvasBase instance. This is used upon initialization of the Figure, but also to reset the canvas when decoupling from pyplot.

(self)

Source from the content-addressed store, hash-verified

3007 return w_pad, h_pad, wspace, hspace
3008
3009 def _set_base_canvas(self):
3010 """
3011 Initialize self.canvas with a FigureCanvasBase instance.
3012
3013 This is used upon initialization of the Figure, but also
3014 to reset the canvas when decoupling from pyplot.
3015 """
3016 FigureCanvasBase(self) # Set self.canvas as a side-effect
3017 # undo any high-dpi scaling
3018 if self._dpi != self._original_dpi:
3019 self.dpi = self._original_dpi
3020
3021 def set_canvas(self, canvas):
3022 """

Callers 3

__init__Method · 0.95
__setstate__Method · 0.95
destroyMethod · 0.80

Calls 1

FigureCanvasBaseClass · 0.90

Tested by

no test coverage detected