gsplot.inset_axes#
- inset_axes(parent, spec)#
Create one placement-only inset below an explicit parent Axes.
- Parameters:
parent (Axes) – The Matplotlib Axes that owns the child inset.
spec (InsetSpec) – Validated placement values from
gsplot.InsetSpec.
- Returns:
The newly created child Axes.
- Return type:
matplotlib.axes.Axes- Raises:
LayoutError – If the parent, specification, or requested placement is invalid.
Examples
>>> import gsplot as gs >>> figure, axes = gs.subplots() >>> child = gs.inset_axes(axes, gs.InsetSpec(bounds=(0.6, 0.6, 0.3, 0.3))) >>> _ = child.set_title("inset") >>> figure.clear()