(self)
| 61 | import hvplot.xarray # noqa |
| 62 | |
| 63 | def test_xarray_transform(self): |
| 64 | import xarray as xr |
| 65 | |
| 66 | data = np.arange(0, 60).reshape(6, 10) |
| 67 | x = np.arange(10) |
| 68 | y = np.arange(6) |
| 69 | da = xr.DataArray(data, coords={'y': y, 'x': x}, dims=('y', 'x'), name='value') |
| 70 | img = da.hvplot.image(transforms=dict(value=hv.dim('value') * 10)) |
| 71 | self.assertEqual(img.data.value.data, da.data * 10) |