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

Class Operations

hvplot/ui.py:423–480  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

421
422
423class Operations(Controls):
424 datashade = param.Boolean(
425 default=False,
426 doc="""
427 Whether to apply rasterization and shading using datashader
428 library returning an RGB object.""",
429 )
430
431 rasterize = param.Boolean(
432 default=False,
433 doc="""
434 Whether to apply rasterization using the datashader library
435 returning an aggregated Image.""",
436 )
437
438 aggregator = param.Selector(
439 default=None,
440 objects=AGGREGATORS,
441 doc="""
442 Aggregator to use when applying rasterize or datashade operation.""",
443 )
444
445 dynspread = param.Boolean(
446 default=False,
447 doc="""
448 Allows plots generated with datashade=True or rasterize=True
449 to increase the point size to make sparse regions more visible.""",
450 )
451
452 x_sampling = param.Number(
453 default=None,
454 doc="""
455 Specifies the smallest allowed sampling interval along the x-axis.""",
456 )
457
458 y_sampling = param.Number(
459 default=None,
460 doc="""
461 Specifies the smallest allowed sampling interval along the y-axis.""",
462 )
463
464 @param.depends('datashade', watch=True)
465 def _toggle_rasterize(self):
466 if self.datashade:
467 self.rasterize = False
468
469 @param.depends('rasterize', watch=True)
470 def _toggle_datashade(self):
471 if self.rasterize:
472 self.datashade = False
473
474 @param.depends('rasterize', 'datashade', watch=True, on_init=True)
475 def _update_options(self):
476 enabled = self.rasterize or self.datashade
477 self.param.dynspread.constant = not enabled
478 self.param.x_sampling.constant = not enabled
479 self.param.y_sampling.constant = not enabled
480 self.param.aggregator.constant = not enabled

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…