MCPcopy Create free account
hub / github.com/holoviz/hvplot / test_xarray_transform

Method test_xarray_transform

hvplot/tests/testtransforms.py:63–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 1

imageMethod · 0.45

Tested by

no test coverage detected