polartoolkit.plot_3d#
- plot_3d(grids, cmaps, exaggeration, drapegrids=None, view=(170, 30), vlims=None, region=None, hemisphere=None, epsg=None, shp_mask=None, shapefile=None, polygon_mask=None, colorbar=True, cbar_perspective=True, **kwargs)[source]#
create a 3D perspective plot of a list of grids
- Parameters:
grids (
list[DataArray] |DataArray) – xarray DataArrays to be plotted in 3Dcmaps (
list[str] |str) – list of PyGMT colormap names to use for each gridexaggeration (
list[float] |float) – list of vertical exaggeration factors to use for each gridview (
tuple[float,float]) – tuple of azimuth and elevation angles for the view, by default [170, 30]vlims (
tuple[float,float] |None) – tuple of vertical limits for the plot, by default is z range of gridsregion (
tuple[float,float,float,float] |None) – region for the figure in format [xmin, xmax, ymin, ymax], by default Nonehemisphere (
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 Noneshp_mask (
str|GeoDataFrame|None) – deprecated, use shapefile insteadshapefile (
str|GeoDataFrame|None) – shapefile or geodataframe to clip the grids with, by default Nonecolorbar (
bool) – whether to plot a colorbar, by default Truecbar_perspective (
bool) – whether to plot the colorbar in perspective, by default Truekwargs (
Any)
- Returns:
Returns a figure object, which can be used by other PyGMT plotting functions.
- Return type: