aPriori.plot_utilities.plot_multifield¶
- aPriori.plot_utilities.plot_multifield(X, Y, fields, titles=None, n_cols=None, figsize=None, cmap='viridis', vmin=None, vmax=None, side_text=None)¶
Plot multiple 2D fields as subplots with shared colorbar and scaling.
Parameters:¶
- Xarray-like
2D mesh for X coordinates
- Yarray-like
2D mesh for Y coordinates
- fieldsarray-like
3D array of shape (n_fields, ny, nx) or list of 2D arrays Each field represents the same variable at different conditions
- titleslist of str, optional
Titles for each subplot. If None, uses āField 1ā, āField 2ā, etc.
- n_colsint, optional
Number of columns in the subplot grid. If None, automatically determined
- figsizetuple, optional
Figure size (width, height). If None, automatically computed based on data aspect ratio
- cmapstr, optional
Colormap name (default: āviridisā)
- vminfloat, optional
Minimum value for colorbar. If None, uses global minimum of fields
- vmaxfloat, optional
Maximum value for colorbar. If None, uses global maximum of fields
- side_textstr, optional
Text to display on the right side of the figure
Returns:¶
: fig : matplotlib.figure.Figure
The figure object
- axesnumpy.ndarray
Array of subplot axes