helper module

Define types and helpers for the visualization library.

create_fig_if_not_exists(axnum, sharex=False, num=1, clean_fig=False, **kwargs)[source]

Check if figures were already created, create it if not.

Parameters:
  • axnum (int | list[int] | range) – Axes indexes as understood by Figure.add_subplot, or number of desired axes.

  • sharex (bool, default: False) – If x axis should be shared.

  • num (int, default: 1) – Fig number.

  • clean_fig (bool, default: False) – If the previous plot should be erased from Figure.

Return type:

tuple[Figure, list[Axes]]

clean_figures(fig_ids)[source]

Clean axis of Figs in fignumlist.

Parameters:

fig_ids (Sequence[int | str | Figure | SubFigure])

Return type:

None

clean_axes(ax_ids)[source]

Clean given axis.

Parameters:

ax_ids (Sequence[Axes])

Return type:

None

remove_artists(axe)[source]

Remove lines and plots, but keep labels and grids.

Parameters:

axe (Axes)

Return type:

None

savefig(fig, filepath)[source]

Save the figure.

Parameters:
Return type:

None