Visualizing Data as Points

Visualizing Data as Points#

Authors: Philip Chmielowiec

Overview#

This notebook showcases how to visualize data variables as Points using the UXarray Plotting API.

Note

UXarray’s Plotting API is build around the Holoviews package. For details about customization and accepted parameters, pleases refer to their documentation.

import uxarray as ux
import cartopy.crs as ccrs
base_path = "../../test/meshfiles/mpas/QU/"
grid_path = base_path + "oQU480.231010.nc"
uxds_mpas = ux.open_dataset(grid_path, grid_path)
uxds_mpas["bottomDepth"]
<xarray.UxDataArray 'bottomDepth' (n_face: 1791)> Size: 14kB
[1791 values with dtype=float64]
Dimensions without coordinates: n_face

Vector Point Plots#

UXarray supports plotting data variables that are mapped to nodes, edges, or faces by plotting their coordinates as Points and shading those points with the associated data value.

uxds_mpas["bottomDepth"].plot.points(title="Point Plot", height=350, width=700, size=3)
uxds_mpas["bottomDepth"].plot.points(
    title="Point Plot (Orthographic Projection)",
    height=350,
    width=700,
    size=5,
    projection=ccrs.Orthographic(),
)

Rasterized Point Plots#

uxds_mpas["bottomDepth"].plot.rasterize(method="point", projection=ccrs.Robinson())