uxarray.UxDataArray.plot.polygons

uxarray.UxDataArray.plot.polygons#

UxDataArray.plot.polygons(periodic_elements='exclude', backend=None, engine='spatialpandas', rasterize=True, dynamic=False, projection=None, xlabel='Longitude', ylabel='Latitude', *args, **kwargs)#

Generated a shaded polygon plot.

This function plots the faces of an unstructured grid shaded with a face-centered data variable using hvplot. It allows for rasterization, projection settings, and labeling of the data variable to be customized through keyword arguments. The backend for plotting can also be specified. If a data array has a name, its name is used for color label.

Parameters:
  • periodic_elements (str, optional, default="exclude") – Specifies whether to include or exclude periodic elements in the grid. Options are: - “exclude”: Exclude periodic elements, - “split”: Split periodic elements. - “ignore”: Include periodic elements without any corrections

  • backend (str or None, optional) – Plotting backend to use. One of [‘matplotlib’, ‘bokeh’]. Equivalent to running holoviews.extension(backend)

  • engine (str, optional) – Engine to use for GeoDataFrame construction. One of [‘spatialpandas’, ‘geopandas’]

  • rasterize (bool, optional) – Whether to rasterize the plot (default: True)

  • projection (ccrs.Projection, optional) – The map projection to use.

  • *args (tuple) – Additional positional arguments to be passed to hvplot.polygons.

  • **kwargs (dict) – Additional keyword arguments passed to hvplot.polygons. For additional customization, please refer to https://hvplot.holoviz.org/user_guide/Customization.html

Returns:

gdf.hvplot.polygons – A shaded polygon plot

Return type:

hvplot.polygons