gsplot.suptitle#

suptitle(fig, text, *, props=None, **kwargs)#

Set an explicit Figure suptitle and return its native Text artist.

Parameters:
  • fig (Figure) – Explicit target Figure.

  • text (str) – Suptitle text.

  • props (Mapping[str, Any] | None) – Optional finite Matplotlib Text property mapping.

  • **kwargs (Any) – Optional direct Matplotlib Text properties (e.g. fontsize, color, y, va). Direct keyword arguments are merged with and take precedence over props.

Returns:

Native suptitle artist attached to fig.

Return type:

matplotlib.text.Text

Raises:

PlotError – If the Figure, text, or property mapping is invalid.

Examples

>>> import gsplot as gs
>>> figure, _ = gs.subplots()
>>> text = gs.suptitle(figure, "Experiment")
>>> text.figure is figure
True
>>> figure.clear()