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)
| 236 | |
| 237 | |
| 238 | def 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 | |
| 260 | host_subplot = host_axes |
nothing calls this directly
no test coverage detected
searching dependent graphs…