pttools.analysis.utils

Utilities for plotting and analysing data

Functions

pttools.analysis.utils.create_fig_ax(fig=None, ax=None)

Create a figure and axes if necessary

Parameters:
Return type:

Tuple[Figure, Axes]

pttools.analysis.utils.legend(ax, **kwargs)

Add a legend to the axes if there are any legend labels

Parameters:

ax (Axes)

Return type:

Legend | None

pttools.analysis.utils.model_phase_label(model, phase)

Get the label text for the model and phase

Parameters:
Return type:

str

pttools.analysis.utils.setup_plotting(font='serif', font_size=20, usetex=True)

Get decent-sized plots.

LaTeX can cause problems if the system is not configured correctly.

Parameters:
  • font (str) – name of the default font

  • font_size (int) – font size for the labels

  • usetex (bool) – whether to use LaTeX

Return type:

None