publiplots.set_axis_labels¶
- publiplots.set_axis_labels(ax, xlabel=None, ylabel=None, title=None, fontsize=None, fontweight='normal')[source]¶
Set axis labels and title with consistent formatting.
Only labels that are explicitly provided are set;
Nonevalues leave the existing label / title untouched.- Parameters:
ax (matplotlib.axes.Axes) – Axes to modify in place.
xlabel (str, optional) – X-axis label.
Noneleaves it unchanged.ylabel (str, optional) – Y-axis label.
Noneleaves it unchanged.title (str, optional) – Plot title.
Noneleaves it unchanged.fontsize (float, optional) – Font size (points) for labels and title.
Noneuses the active rcParams.fontweight (str, default
'normal') – Font weight — e.g.'normal','bold','light'.
Examples
>>> pp.set_axis_labels(ax, xlabel='Time (s)', ylabel='Signal', ... title='Results')