gsplot.square#
- square(target, aspect=1)#
Apply a finite positive box aspect to explicit Axes.
- Parameters:
target (Axes | _AxesBase | Sequence[Axes | _AxesBase] | Mapping[Any, Axes | _AxesBase] | ndarray[tuple[int, ...], dtype[Any]]) – One Axes or a deterministic same-Figure collection of Axes.
aspect (float) – Positive ratio of box height to box width. The default is
1.
- Returns:
The supplied Axes are changed in place.
- Return type:
None- Raises:
LayoutError – If the target is invalid or
aspectis not finite and positive.
Examples
>>> import gsplot as gs >>> figure, ax = gs.subplots() >>> gs.square(ax) >>> ax.get_box_aspect() 1.0 >>> figure.clear()