Quadmesh#

import hvplot.xarray  # noqa
import xarray as xr

ds = xr.tutorial.open_dataset('rasm')
ds
<xarray.Dataset> Size: 17MB
Dimensions:  (time: 36, y: 205, x: 275)
Coordinates:
  * time     (time) object 288B 1980-09-16 12:00:00 ... 1983-08-17 00:00:00
    xc       (y, x) float64 451kB ...
    yc       (y, x) float64 451kB ...
Dimensions without coordinates: y, x
Data variables:
    Tair     (time, y, x) float64 16MB ...
Attributes:
    title:                     /workspace/jhamman/processed/R1002RBRxaaa01a/l...
    institution:               U.W.
    source:                    RACM R1002RBRxaaa01a
    output_frequency:          daily
    output_mode:               averaged
    convention:                CF-1.4
    references:                Based on the initial model of Liang et al., 19...
    comment:                   Output from the Variable Infiltration Capacity...
    nco_openmp_thread_number:  1
    NCO:                       netCDF Operators version 4.7.9 (Homepage = htt...
    history:                   Fri Aug  7 17:57:38 2020: ncatted -a bounds,,d...

quadmesh can be slower that image, but it allows you to plot values on an irregular grid by representing each value as a polygon.

ds.Tair.hvplot.quadmesh(x='xc', y='yc', geo=True, widget_location='bottom')

To reduce the render time or the size of the saved plot, use rasterize to aggregate the values to the pixel. It is recommended that when rasterizing geo plots, you project before rasterizing, by setting project=True.

ds.Tair.hvplot.quadmesh(x='xc', y='yc', geo=True, widget_location='bottom', rasterize=True, project=True)
This web page was generated from a Jupyter notebook and not all interactivity will work on this website.