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

Method __init__

lib/mpl_toolkits/axes_grid1/axes_divider.py:288–319  ·  view source on GitHub ↗

Parameters ---------- fig : `~matplotlib.figure.Figure` *args : tuple (*nrows*, *ncols*, *index*) or int The array of subplots in the figure has dimensions ``(nrows, ncols)``, and *index* is the index of the subplot being created.

(self, fig, *args, horizontal=None, vertical=None,
                 aspect=None, anchor='C')

Source from the content-addressed store, hash-verified

286 """
287
288 def __init__(self, fig, *args, horizontal=None, vertical=None,
289 aspect=None, anchor='C'):
290 """
291 Parameters
292 ----------
293 fig : `~matplotlib.figure.Figure`
294
295 *args : tuple (*nrows*, *ncols*, *index*) or int
296 The array of subplots in the figure has dimensions ``(nrows,
297 ncols)``, and *index* is the index of the subplot being created.
298 *index* starts at 1 in the upper left corner and increases to the
299 right.
300
301 If *nrows*, *ncols*, and *index* are all single digit numbers, then
302 *args* can be passed as a single 3-digit number (e.g. 234 for
303 (2, 3, 4)).
304 horizontal : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
305 Sizes for horizontal division.
306 vertical : list of :mod:`~mpl_toolkits.axes_grid1.axes_size`, optional
307 Sizes for vertical division.
308 aspect : bool, optional
309 Whether overall rectangular area is reduced so that the relative
310 part of the horizontal and vertical scales have the same scale.
311 anchor : (float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', 'N', \
312'NW', 'W'}, default: 'C'
313 Placement of the reduced rectangle, when *aspect* is True.
314 """
315 self.figure = fig
316 super().__init__(fig, [0, 0, 1, 1],
317 horizontal=horizontal or [], vertical=vertical or [],
318 aspect=aspect, anchor=anchor)
319 self.set_subplotspec(SubplotSpec._from_subplot_args(fig, args))
320
321 def get_position(self):
322 """Return the bounds of the subplot box."""

Callers

nothing calls this directly

Calls 3

set_subplotspecMethod · 0.95
_from_subplot_argsMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected