import hvplot.xarray # noqa
Similar to image
, contour
displays values on a 2d grid. But it first segments data into various levels.
import xarray as xr
ds = xr.tutorial.open_dataset('air_temperature')
ds
ds.hvplot.contour()
There are lots of options exposed to control the style and contents of the contour
plot:
ds.mean(dim='time').hvplot.contour(z='air', x='lon', y='lat', levels=20,
clabel='T [K]', label='Mean Air temperature [K]',
cmap='gray')
Include a basemap from a tiling service using the tiles
option.
ds.hvplot.contour(geo=True, tiles='EsriImagery', levels=20, line_width=2, cmap='reds',)