tabensemb.trainer.Trainer._plot_action_subplots#

method

Trainer._plot_action_subplots(meth_name: str, ls: List[str], ls_kwarg_name: str | None, tqdm_active: bool = False, with_title: bool = False, titles: List[str] | None = None, fontsize: float = 12, xlabel: str | None = None, ylabel: str | None = None, twin_ylabel: str | None = None, get_figsize_kwargs: Dict | None = None, figure_kwargs: Dict | None = None, meth_fix_kwargs: Dict | None = None)[source]#

Iterate over a list to plot subplots in a single figure.

Parameters:
ls

The list to be iterated.

ls_kwarg_name

The argument name of the components in ls when the component is passed to meth_name one by one. If is None, the components in ls should be dictionaries and will be unpacked and passed to the method meth_name.

tqdm_active

Whether to use a tqdm progress bar.

meth_name

The method to plot on a subplot. It has an argument named ax which indicates the subplot.

with_title

Whether each subplot has a title, which is the components in ls if titles is None.

titles

The titles of each subplot if with_title is True.

fontsize

plt.rcParams["font.size"]

xlabel

The overall xlabel.

ylabel

The overall ylabel.

twin_ylabel

The overall ylabel of the twin x-axis.

get_figsize_kwargs

Arguments for tabensemb.utils.utils.get_figsize().

figure_kwargs

Arguments for plt.figure()

meth_fix_kwargs

Fixed arguments of meth_name (except for ax and ls_kwarg_name).

Returns:
matplotlib.figure.Figure

The figure that has plotted subplots.