tabensemb.trainer.Trainer.plot_subplots#

method

Trainer.plot_subplots(ls: List[str], ls_kwarg_name: str, meth_name: str, 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, savefig_kwargs: Dict | None = None, save_show_close: bool = True, tqdm_active: bool = False)[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.

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).

savefig_kwargs

Arguments for plt.savefig

save_show_close

Whether to save, show (in the notebook), and close the figure, or return the matplotlib.figure.Figure instance.

tqdm_active

Whether to use a tqdm progress bar.

Returns:
matplotlib.figure.Figure

The figure that has plotted subplots.