gridmarthe.plot_cross_section
- gridmarthe.plot_cross_section(ds_xs, fig=None, ax=None, cbar_size=3, cmap=None, norm=None, labels=None)[source]
Plot cross-section from a cross-section dataset.
- Parameters:
- ds_xsxarray.Dataset
A cross-section dataset, as returned by
gridmarthe.slice_cross_section().- figmatplotlib.Figure, optional
A figure to plot on, by default None. If None, a new figure will be created.
- axmatplotlib.Axes, optional
An axis to plot on, by default None. If None, a new figure and axis will be created.
- cmapmatplotlib.colors.Colormap, optional
A colormap to use for the layers, by default None. If None, a default colormap will be created. It should be a ListedColormap with as many colors as layers in the dataset.
- normmatplotlib.colors.BoundaryNorm, optional
A normalization instance to map layer values to colors, by default None. If None, a default BoundaryNorm will be created.
- labelslist, optional
Labels for the layers in the colorbar, by default None. If None, default labels will be used (layer numbers).
- cbar_sizeint, optional
Size of the colorbar as a percentage of the main axis, by default 3.
- Returns:
- axmatplotlib.Axes
The axis with the cross-section plot.
- caxmatplotlib.Axes
The axis with the colorbar.
See also
gridmarthe.slice_cross_sectionFunction to create cross-section dataset.
gridmarthe.grid.processing.xsection._mk_cross_section_geomFunction to create cross-section geometry.