Setup is a xarray.Dataset
with two variables and a grid of values.
import xarray as xr
import numpy as np
import hvplot.xarray
ds = xr.Dataset({
'temp': (('lon', 'lat'), 15 + 8 * np.random.randn(2, 2)),
'precip': (('lon', 'lat'), 10 * np.random.rand(2, 2)),
},
coords={
'lon': [-99.83, -99.32],
'lat': [42.25, 42.21],
})
Extrapolating from the hvplot docs, I expected subplots for each variable and a shared colorbar (z-axis) would result from:
ds.hvplot(z=['temp', 'precip'], subplots=True)
That gives an UnboundLocalError
and several variants are no better. Am I doing it wrong or is it not implemented? If that latter, any way to manually produce two hvplot.image
plots side-by-side with a shared colorbar?