alphapepttools.pl.label_axes#
- alphapepttools.pl.label_axes(ax, xlabel=None, ylabel=None, title=None, label_parser=None, enumeration=None, enumeration_xytext=(-10, 10))#
Apply labels to a matplotlib axes object
- Parameters:
ax (plt.Axes) – The axes object to apply labels to
xlabel (str, optional) – The x-axis label, by default None (existing label is not changed)
ylabel (str, optional) – The y-axis label, by default None (existing label is not changed)
title (str, optional) – The title of the axes, by default None (existing title is not changed)
label_parser (Callable, optional) – A function to parse labels, by default None. This is useful to convert labels from a computation-context to presentation context, e.g. a column like upregulated_proteins could be shown as “Upregulated Proteins” in the plot.
enumeration (str, optional) – A string to enumerate the plot in the top left, e.g. “A”, “B”, “C”, etc.
enumeration_xytext (Tuple[float, float], optional, by default (-10, 10)) – This parameter describes the offset of the enumeration text in typographic points relative to the top left of the axis. This does not scale with resolution or plot size, but can be adapted to fit the plot.
- Return type:
- Returns:
None