In [ ]:
import hvplot.xarray  # noqa

Similar to image, contour displays values on a 2d grid. But it first segments data into various levels.

In [ ]:
import xarray as xr

ds = xr.tutorial.open_dataset('air_temperature')
ds
In [ ]:
ds.hvplot.contour()

There are lots of options exposed to control the style and contents of the contour plot:

In [ ]:
ds.mean(dim='time').hvplot.contour(z='air', x='lon', y='lat', levels=20, 
                                   clabel='T [K]', label='Mean Air temperature [K]',
                                   cmap='gray')

Geographic Data

Include a basemap from a tiling service using the tiles option.

In [ ]:
ds.hvplot.contour(geo=True, tiles='EsriImagery', levels=20, line_width=2, cmap='reds',)