tfmindi.pl.render_plot#
- tfmindi.pl.render_plot(fig, width=8, height=8, title=None, xlabel=None, ylabel=None, supxlabel=None, supylabel=None, tight_rect=None, title_fontsize=16, x_label_fontsize=14, y_label_fontsize=14, x_tick_fontsize=12, y_tick_fontsize=12, x_label_rotation=0, y_label_rotation=0, show=True, save_path=None, dpi=300, **kwargs)#
Render a plot with customization options.
Note
This function should never be called directly. Rather, the other plotting functions call this function.
- Parameters:
fig (
Figure) – The figure object to render.width (
int(default:8)) – Width of the plot (inches).height (
int(default:8)) – Height of the plot (inches).supxlabel (
str|None(default:None)) – Suplabel for the X-axis.supylabel (
str|None(default:None)) – Suplabel for the Y-axis.tight_rect (
tuple|None(default:None)) – Normalized coordinates in which subplots will fit.title_fontsize (
int(default:16)) – Font size for the title.x_label_fontsize (
int(default:14)) – Font size for the X-axis labels.y_label_fontsize (
int(default:14)) – Font size for the Y-axis labels.x_tick_fontsize (
int(default:12)) – Font size for the X-axis ticks.y_tick_fontsize (
int(default:12)) – Font size for the Y-axis ticksx_label_rotation (
int(default:0)) – Rotation of the X-axis labels in degrees.y_label_rotation (
int(default:0)) – Rotation of the Y-axis labels in degrees.show (
bool(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 (
str|None(default:None)) – Optional path to save the figure. If None, the figure is displayed but not saved.dpi (
int(default:300)) – Resolution for saving figures.**kwargs – Additional arguments passed to plt.savefig().
- Return type:
- Returns:
None or matplotlib.Figure Returns figure object if show=False and save_path=None, otherwise None.