MCPcopy
hub / github.com/matplotlib/matplotlib / add_axes

Method add_axes

lib/matplotlib/figure.py:539–649  ·  view source on GitHub ↗

Add an `~.axes.Axes` to the figure. Call signatures:: add_axes(rect, projection=None, polar=False, **kwargs) add_axes(ax) Parameters ---------- rect : tuple (left, bottom, width, height) The dimensions (left, bottom, wid

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

537
538 @_docstring.interpd
539 def add_axes(self, *args, **kwargs):
540 """
541 Add an `~.axes.Axes` to the figure.
542
543 Call signatures::
544
545 add_axes(rect, projection=None, polar=False, **kwargs)
546 add_axes(ax)
547
548 Parameters
549 ----------
550 rect : tuple (left, bottom, width, height)
551 The dimensions (left, bottom, width, height) of the new
552 `~.axes.Axes`. All quantities are in fractions of figure width and
553 height.
554
555 projection : {None, 'aitoff', 'hammer', 'lambert', 'mollweide', \
556'polar', 'rectilinear', str}, optional
557 The projection type of the `~.axes.Axes`. *str* is the name of
558 a custom projection, see `~matplotlib.projections`. The default
559 None results in a 'rectilinear' projection.
560
561 polar : bool, default: False
562 If True, equivalent to projection='polar'.
563
564 axes_class : subclass type of `~.axes.Axes`, optional
565 The `.axes.Axes` subclass that is instantiated. This parameter
566 is incompatible with *projection* and *polar*. See
567 :ref:`axisartist_users-guide-index` for examples.
568
569 sharex, sharey : `~matplotlib.axes.Axes`, optional
570 Share the x or y `~matplotlib.axis` with sharex and/or sharey.
571 The axis will have the same limits, ticks, and scale as the axis
572 of the shared Axes.
573
574 label : str
575 A label for the returned Axes.
576
577 Returns
578 -------
579 `~.axes.Axes`, or a subclass of `~.axes.Axes`
580 The returned Axes class depends on the projection used. It is
581 `~.axes.Axes` if rectilinear projection is used and
582 `.projections.polar.PolarAxes` if polar projection is used.
583
584 Other Parameters
585 ----------------
586 **kwargs
587 This method also takes the keyword arguments for
588 the returned Axes class. The keyword arguments for the
589 rectilinear Axes class `~.axes.Axes` can be found in
590 the following table but there might also be other keyword
591 arguments if another projection is used, see the actual Axes
592 class.
593
594 %(Axes:kwdoc)s
595
596 Notes

Callers 15

make_matplotlib_iconFunction · 0.80
test_axes3d_labelpadFunction · 0.80
test_AxesFunction · 0.80
make_rgb_axesFunction · 0.80
__init__Method · 0.80
__init__Method · 0.80
__init__Method · 0.80
_add_inset_axesFunction · 0.80
append_axesMethod · 0.80
host_axesFunction · 0.80
test_auto_adjustableFunction · 0.80
thumbnailFunction · 0.80

Calls 4

_add_axes_internalMethod · 0.95
popMethod · 0.45
get_figureMethod · 0.45

Tested by 15

test_axes3d_labelpadFunction · 0.64
test_AxesFunction · 0.64
test_auto_adjustableFunction · 0.64
test_radio_grid_buttonsFunction · 0.64
test_clipperFunction · 0.64
test_old_subplot_compatFunction · 0.64
test_rotationFunction · 0.64
test_spines_black_axesFunction · 0.64
test_noop_tight_bboxFunction · 0.64