crested.pl.render_plot#
- crested.pl.render_plot(fig, axs, title=None, suptitle=None, xlabel=None, ylabel=None, supxlabel=None, supylabel=None, xlim=None, ylim=None, grid=False, tight_layout=False, tight_rect=None, suptitle_align=True, title_fontsize=16, suptitle_fontsize=18, xlabel_fontsize=14, ylabel_fontsize=14, supxlabel_fontsize=16, supylabel_fontsize=16, xtick_fontsize=12, ytick_fontsize=12, xtick_rotation=0.0, ytick_rotation=0.0, xtick_ha=None, ytick_va=None, xtick_rotationmode=None, ytick_rotationmode=None, show=True, save_path=None, x_label_fontsize='deprecated', y_label_fontsize='deprecated', x_tick_fontsize='deprecated', y_tick_fontsize='deprecated', x_label_rotation='deprecated', y_label_rotation='deprecated', xlabel_rotation='deprecated', ylabel_rotation='deprecated')#
Render a plot with customization options.
Note
This function should never be called directly. Rather, the other plotting functions call this function.
- Parameters:
fig – The figure object to render.
axs – The axis object or list of axis objects to render.
title (default:
None) – Axis-level title of the plot. If a list, matched to each axis in axs; if a string, applied to all axes.xlabel (default:
None) – Label for the X-axis. If a list, matched to each axis in axs; if a string, applied to all axes.ylabel (default:
None) – Label for the Y-axis. If a list, matched to each axis in axs; if a string, applied to all axes.supxlabel (default:
None) – Suplabel for the X-axis.supylabel (default:
None) – Suplabel for the Y-axis.xlim (default:
None) – X-axis limits. If a list of lists, matched to each axis in axs; if a single list, applied to all axes.ylim (default:
None) – Y-axis limits. If a list of lists, matched to each axis in axs; if a single list, applied to all axes.grid (default:
False) – Add a major tick grid. True/’both’ for a full grid, ‘x’ or ‘y’ for a specific axis, or False to disable.tight_layout (default:
False) – Whether to runfig.tight_layout()after setting all plot properties. Default is False; constrained layout throughplt.subplots(layout='constrained')is preferred.tight_rect (default:
None) – Normalized coordinates in which subplots will fit, forfig.tight_layout(tight_rect=tight_rect). Only does something iftight_layoutis True.suptitle_align (default:
True) – Whether to manually try and align suptitles closer to the axis titles.title_fontsize (default:
16) – Font size for the title.xlabel_fontsize (default:
14) – Font size for the X-axis labels.ylabel_fontsize (default:
14) – Font size for the Y-axis labels.xtick_fontsize (default:
12) – Font size for the X-axis tick labels.ytick_fontsize (default:
12) – Font size for the Y-axis tick labels.xtick_rotation (default:
0.0) – Rotation of the X-axis labels in degrees.ytick_rotation (default:
0.0) – Rotation of the Y-axis labels in degrees.xtick_ha (default:
None) – Horizontal alignment of the X-axis tick labels. If None, inferred to be appropriate for xtick_rotation.ytick_va (default:
None) – Vertical alignment of the Y-axis tick labels. If None, kept unchanged.xtick_rotationmode (default:
None) – Rotation mode when rotating the X-axis tick labels. If None, inferred to be appropriate for xtick_rotation.ytick_rotationmode (default:
None) – Rotation mode when rotating the Y-axis tick labels. If None, kept unchanged.show (default:
True) – Whether to display the plot. Set this to False if you want to return the figure object to customize it further.save_path (default:
None) – Optional path to save the figure. If None, the figure is displayed but not saved.x_label_fontsize (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.y_label_fontsize (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.x_tick_fontsize (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.y_tick_fontsize (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.x_label_rotation (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.y_label_rotation (default:
'deprecated') – Renamed arguments. Please use theirxlabel_*orylabel_*versions instead. Forx/y_label_rotation, renamed to[x/y]tick_rotation.