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

Method __init__

lib/matplotlib/backend_bases.py:1761–1781  ·  view source on GitHub ↗
(self, figure=None)

Source from the content-addressed store, hash-verified

1759 and hasattr(cls, "restore_region"))
1760
1761 def __init__(self, figure=None):
1762 from matplotlib.figure import Figure
1763 self._fix_ipython_backend2gui()
1764 self._is_idle_drawing = True
1765 self._is_saving = False
1766 if figure is None:
1767 figure = Figure()
1768 figure.set_canvas(self)
1769 self.figure = figure
1770 self.manager = None
1771 self.widgetlock = widgets.LockDraw()
1772 self._button = None # the button pressed
1773 self._key = None # the key pressed
1774 self.mouse_grabber = None # the Axes currently grabbing mouse
1775 self.toolbar = None # NavigationToolbar2 will set me
1776 self._is_idle_drawing = False
1777 # We don't want to scale up the figure DPI more than once.
1778 figure._original_dpi = getattr(figure, '_original_dpi', figure.dpi)
1779 self._device_pixel_ratio = 1
1780 self._blit_backgrounds = {}
1781 super().__init__() # Typically the GUI widget init (if any).
1782
1783 callbacks = property(lambda self: self.figure._canvas_callbacks)
1784 button_pick_id = property(lambda self: self.figure._button_pick_id)

Callers

nothing calls this directly

Calls 4

set_canvasMethod · 0.95
FigureClass · 0.90
__init__Method · 0.45

Tested by

no test coverage detected