MCPcopy
hub / github.com/matplotlib/matplotlib / add_child_axes

Method add_child_axes

lib/matplotlib/axes/_base.py:2359–2376  ·  view source on GitHub ↗

Add an `.Axes` to the Axes' children; return the child Axes. This is the lowlevel version. See `.axes.Axes.inset_axes`.

(self, ax)

Source from the content-addressed store, hash-verified

2357 return a
2358
2359 def add_child_axes(self, ax):
2360 """
2361 Add an `.Axes` to the Axes' children; return the child Axes.
2362
2363 This is the lowlevel version. See `.axes.Axes.inset_axes`.
2364 """
2365
2366 # normally Axes have themselves as the Axes, but these need to have
2367 # their parent...
2368 # Need to bypass the getter...
2369 ax._axes = self
2370 ax.stale_callback = martist._stale_axes_callback
2371
2372 self.child_axes.append(ax)
2373 ax._remove_method = functools.partial(
2374 self.get_figure(root=False)._remove_axes, owners=[self.child_axes])
2375 self.stale = True
2376 return ax
2377
2378 def add_collection(self, collection, autolim=True):
2379 """

Callers 3

inset_axesMethod · 0.80
secondary_xaxisMethod · 0.80
secondary_yaxisMethod · 0.80

Calls 1

get_figureMethod · 0.45

Tested by

no test coverage detected