matplotlib.axes.Axes.set_anchor#
- Axes.set_anchor(anchor, share=False)[source]#
Define the anchor location.
The actual drawing area (active position) of the Axes may be smaller than the Bbox (original position) when a fixed aspect is required. The anchor defines where the drawing area will be located within the available space.
- Parameters:
- anchor(float, float) or {'C', 'SW', 'S', 'SE', 'E', 'NE', ...}
Either an (x, y) pair of relative coordinates (0 is left or bottom, 1 is right or top), 'C' (center), or a cardinal direction ('SW', southwest, is bottom left, etc.). str inputs are shorthands for (x, y) coordinates, as shown in the following diagram:
โโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโ โ 'NW' (0.0, 1.0) โ 'N' (0.5, 1.0) โ 'NE' (1.0, 1.0) โ โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโค โ 'W' (0.0, 0.5) โ 'C' (0.5, 0.5) โ 'E' (1.0, 0.5) โ โโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโผโโโโโโโโโโโโโโโโโโค โ 'SW' (0.0, 0.0) โ 'S' (0.5, 0.0) โ 'SE' (1.0, 0.0) โ โโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโดโโโโโโโโโโโโโโโโโโ
- sharebool, default: False
If
True, apply the settings to all shared Axes.
See also
matplotlib.axes.Axes.set_aspectfor a description of aspect handling.