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)
| 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 | """ |
no test coverage detected