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
lswhen the component is passed tometh_nameone by one. If is None, the components inlsshould be dictionaries and will be unpacked and passed to the methodmeth_name.- tqdm_active
Whether to use a tqdm progress bar.
- meth_name
The method to plot on a subplot. It has an argument named
axwhich indicates the subplot.- with_title
Whether each subplot has a title, which is the components in
lsiftitlesis None.- titles
The titles of each subplot if
with_titleis 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 foraxandls_kwarg_name).
- Returns:
- matplotlib.figure.Figure
The figure that has plotted subplots.