polartoolkit.subplots#
- subplots(grids, hemisphere=None, epsg=None, region=None, dims=None, fig_title=None, fig_x_axis_title=None, fig_y_axis_title=None, fig_title_font='30p,Helvetica-Bold', subplot_labels=True, subplot_labels_loc='TL', row_titles=None, column_titles=None, **kwargs)[source]#
Plot a series of grids as individual suplots. This will automatically configure the layout to be closest to a square. Add any parameters from plot_grid() here as keyword arguments for further customization.
- Parameters:
grids (
list[DataArray]) – list of xarray.DataArray’s to be plottedhemisphere (
str|None) – set whether to plot in “north” hemisphere (EPSG:3413) or “south” hemisphere (EPSG:3031), can be set manually, or will read from the environment variable: “POLARTOOLKIT_HEMISPHERE”epsg (
str|None) – set which EPSG projection to use for plotting, can be set manually, or will read from the environment variable: “POLARTOOLKIT_EPSG”, by default Noneregion (
tuple[float,float,float,float] |None) – choose to subset the grids to a specified region, in format [xmin, xmax, ymin, ymax], by default Nonedims (
tuple[int,int] |None) – customize the subplot dimensions (# rows, # columns), by default will use square_subplots() to make a square(~ish) layout.fig_title (
str|None) – add a title to the figure, by default Nonefig_x_axis_title (
str|None) – add a title to the x axis of the figure, by default Nonefig_y_axis_title (
str|None) – add a title to the y axis of the figure, by default Nonefig_title_font (
str) – font for the figure title, by default “30p,Helvetica-Bold”subplot_labels (
bool) – add subplot labels (a, b, c …), by default Truesubplot_labels_loc (
str) – location of subplot labels, by default “TL”row_titles (
list[str] |None) – add titles to the left of each row, by default Nonecolumn_titles (
list[str] |None) – add titles above each column, by default Nonekwargs (
Any)
- Returns:
Returns a figure object, which can be used by other PyGMT plotting functions.
- Return type: