arctichoke.plot.hvplots
Functions
|
Create an hvplot quadmesh map. |
Module Contents
- arctichoke.plot.hvplots.quadmesh_map(xr_data: xarray.Dataset, var: str, save_as: str = None, map_projection: str = 'NorthPolarStereo', map_bbox: [float, float, float, float] = sps.NWP_BBOX, clims: [int, float, int, float] = None, diverging_cbar: bool = False, verbose: bool = False, **kwargs)
Create an hvplot quadmesh map.
Plot a map of the given data using the hvplot.quadmesh() function.
- Parameters:
xr_data (xarray.Dataset) – The dataset to plot.
var (str) – The variable in xr_data to plot.
save_as (str, None, optional) – The file name to pass to arctichoke.plot.save_hvplots.save_hvplot(). Default is None, which doesn’t save the plot to a file.
map_projection (str, optional) – A string naming the map projection to use in the plot. Must be one of the following: ‘NorthPolarStereo’, ‘Orthograpic’. Default is ‘NorthPolarStereo’.
map_bbox (Array of float, optional) –
- An array of coordinates defining the bounding box of the map in the following format:
[LAT_MAX, LAT_MIN, LON_MAX, LON_MIN]
Default is arctichoke.params.latlon_params.NWP_BBOX.
clims (List or tuple of int, float, optional) – The limits to use in the colorbar. Note: This overrides the default method of limiting the colorbar range when diverging_cbar=True. Default is None, which uses the minimum / maximum values present in the data.
diverging_cbar (bool, optional) – Whether to use a diverging colormap on the colorbar. Default is False.
verbose (bool, optional) – Whether to verbosely output information as the function executes. Default is False.
**kwargs – Keyword arguments to pass to hvplot.quadmesh() and arctichoke.plot.limit_extent.get_limited_extent()
- Returns:
qm_map_plot – An overlay object which can be used to construct the plot.
- Return type:
holoviews.core.overlay.Overlay
Examples
>>> import xarray as xr >>> this_plot = hvplots.quadmesh_map(xr.open_dataset("data/areacello_Ofx_EC-Earth3P-HR_highres-future_r2i1p2f1_gn.nc", 'areacello') >>> print(type(this_plot)) <class 'holoviews.core.overlay.Overlay'>