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 or xarray.DataArray) – xarray DataArrays to be plotted in 3D
cmaps (list or str) – list of PyGMT colormap names to use for each grid
exaggeration (list or float) – list of vertical exaggeration factors to use for each grid
view (tuple, optional) – tuple of azimuth and elevation angles for the view, by default [170, 30]
vlims (tuple, optional) – tuple of vertical limits for the plot, by default is z range of grids
region (tuple[float, float, float, float], optional) – region for the figure in format [xmin, xmax, ymin, ymax], by default None
hemisphere (str, optional) – 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, optional) – set which EPSG projection to use for plotting, can be set manually, or will read from the environment variable: “POLARTOOLKIT_EPSG”, by default None
shp_mask (Union[str or geopandas.GeoDataFrame], optional) – deprecated, use shapefile instead
shapefile (Union[str or geopandas.GeoDataFrame], optional) – shapefile or geodataframe to clip the grids with, by default None
colorbar (bool, optional) – whether to plot a colorbar, by default True
cbar_perspective (bool, optional) – whether to plot the colorbar in perspective, by default True
kwargs (
Any)
- Returns:
Returns a figure object, which can be used by other PyGMT plotting functions.
- Return type: