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

Class hvPlotExplorer

hvplot/ui.py:505–883  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

503
504
505class hvPlotExplorer(Viewer):
506 kind = param.Selector()
507
508 x = param.Selector()
509
510 y = param.Selector()
511
512 y_multi = param.ListSelector(default=[], label='Y')
513
514 by = param.ListSelector(default=[])
515
516 groupby = param.ListSelector(default=[])
517
518 # Controls that will show up as new tabs, must be ClassSelector
519
520 axes = param.ClassSelector(class_=Axes)
521
522 colormapping = param.ClassSelector(class_=Colormapping)
523
524 labels = param.ClassSelector(class_=Labels)
525
526 geographic = param.ClassSelector(class_=Geographic)
527
528 operations = param.ClassSelector(class_=Operations)
529
530 statusbar = param.ClassSelector(class_=StatusBar)
531
532 style = param.ClassSelector(class_=Style)
533
534 advanced = param.ClassSelector(class_=Advanced)
535
536 code = param.String(precedence=-1, doc='Code to generate the plot.')
537
538 @classmethod
539 def from_data(cls, data, **params):
540 if is_geodataframe(data):
541 # cls = hvGeomExplorer
542 raise TypeError('GeoDataFrame objects not yet supported.')
543 elif is_xarray(data):
544 cls = hvGridExplorer
545 else:
546 cls = hvDataFrameExplorer
547 return cls(data, **params)
548
549 def __panel__(self):
550 return self._layout
551
552 def __init__(self, df, **params):
553 x, y = params.get('x'), params.get('y')
554 if 'y' in params:
555 params['y_multi'] = params.pop('y') if isinstance(params['y'], list) else [params['y']]
556 statusbar_params = {k: params.pop(k) for k in params.copy() if k in StatusBar.param}
557 opts_kwargs = params.pop('opts', {})
558 converter = _hvConverter(
559 df, x, y, **{k: v for k, v in params.items() if k not in ('x', 'y', 'y_multi')}
560 )
561 params['opts'] = opts_kwargs
562 # Collect kwargs passed to the constructor but meant for the controls

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…