gsplot.paper#
- paper(target, *, cycle=True, family=None)#
Apply the frozen publication baseline to explicit Axes only.
- Parameters:
target (Axes | _AxesBase | Sequence[Axes | _AxesBase] | Mapping[Any, Axes | _AxesBase] | ndarray[tuple[Any, ...], dtype[Any]]) β One Axes or a finite ordered Axes sequence, array, or mapping.
cycle (bool) β Install the five-color paper property cycle. Populated Axes require
Falseso an existing cycle is never restarted unpredictably.family (str | None) β Explicit font family for the title, axis labels, offset texts, and major/minor tick labels.
Nonekeeps the frozen DejaVu Sans baseline; an explicit family wins overrcParamsfor these artists, so pass the same family here instead of relying onrcParams["font.family"]alone.
- Returns:
The supplied Axes are styled in place.
- Return type:
None- Raises:
PlotError β If the target is invalid,
cycleis not boolean, or cycle installation is requested for a populated Axes.
Notes
Styling is target-local and does not change global
rcParams. Artists created directly through Matplotlib after this call retain Matplotlibβs creation-time defaults where no Axes-local retrofit exists.Examples
>>> import gsplot as gs >>> figure, ax = gs.subplots(style=None) >>> gs.paper(ax) >>> ax.get_facecolor()[:3] (1.0, 1.0, 1.0) >>> figure.clear()