MCPcopy
hub / github.com/matplotlib/matplotlib / host_axes

Function host_axes

lib/mpl_toolkits/axes_grid1/parasite_axes.py:238–257  ·  view source on GitHub ↗

Create axes that can act as a hosts to parasitic axes. Parameters ---------- figure : `~matplotlib.figure.Figure` Figure to which the axes will be added. Defaults to the current figure `.pyplot.gcf()`. *args, **kwargs Will be passed on to the underlying

(*args, axes_class=Axes, figure=None, **kwargs)

Source from the content-addressed store, hash-verified

236
237
238def host_axes(*args, axes_class=Axes, figure=None, **kwargs):
239 """
240 Create axes that can act as a hosts to parasitic axes.
241
242 Parameters
243 ----------
244 figure : `~matplotlib.figure.Figure`
245 Figure to which the axes will be added. Defaults to the current figure
246 `.pyplot.gcf()`.
247
248 *args, **kwargs
249 Will be passed on to the underlying `~.axes.Axes` object creation.
250 """
251 import matplotlib.pyplot as plt
252 host_axes_class = host_axes_class_factory(axes_class)
253 if figure is None:
254 figure = plt.gcf()
255 ax = host_axes_class(figure, *args, **kwargs)
256 figure.add_axes(ax)
257 return ax
258
259
260host_subplot = host_axes

Callers

nothing calls this directly

Calls 1

add_axesMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…