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

Method test_operation_resample_when

hvplot/tests/testoperations.py:288–305  ·  view source on GitHub ↗
(self, operation)

Source from the content-addressed store, hash-verified

286
287 @parameterized.expand([('rasterize',), ('datashade',)])
288 def test_operation_resample_when(self, operation):
289 df = pd.DataFrame(
290 np.random.multivariate_normal((0, 0), [[0.1, 0.1], [0.1, 1.0]], (5000,))
291 ).rename({0: 'x', 1: 'y'}, axis=1)
292 dmap = df.hvplot.scatter('x', 'y', resample_when=1000, **{operation: True})
293 assert isinstance(dmap, DynamicMap)
294
295 render(dmap) # trigger dynamicmap
296 overlay = dmap.items()[0][1]
297 assert isinstance(overlay, Overlay)
298
299 image = overlay.get(0)
300 assert isinstance(image, Image)
301 assert len(image.data) > 0
302
303 scatter = overlay.get(1)
304 assert isinstance(scatter, Scatter)
305 assert len(scatter.data) == 0
306
307 @parameterized.expand([('points', Points), ('scatter', Scatter)])
308 def test_downsample_resample_when(self, kind, eltype):

Callers

nothing calls this directly

Calls 1

scatterMethod · 0.45

Tested by

no test coverage detected