panel.pane.holoviews module#
HoloViews integration for Panel including a Pane to render HoloViews
objects and their widgets and support for Links
- class panel.pane.holoviews.HoloViews(object=None, **params)[source]#
Bases:
Pane
HoloViews panes render any HoloViews object using the currently selected backend (‘bokeh’ (default), ‘matplotlib’ or ‘plotly’).
To be able to use the plotly backend you must add plotly to pn.extension.
Reference: https://panel.holoviz.org/reference/panes/HoloViews.html
- Example:
>>> HoloViews(some_holoviews_object)
Methods
applies
(obj)Returns boolean or float indicating whether the Pane can render the object.
jslink
(target[, code, args, bidirectional])Links properties on the this Reactive object to those on the target Reactive object in JS code.
widgets_from_dimensions
Parameter Definitions
Parameters inherited from:
panel.viewable.Layoutable
: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visiblepanel.viewable.Viewable
: loadingpanel.pane.base.PaneBase
: margin, default_layout, objectbackend = Selector(label='Backend', names={}, objects=['bokeh', 'matplotlib', 'plotly'])
The HoloViews backend used to render the plot (if None defaults to the currently selected renderer).
center = Boolean(default=False, label='Center')
Whether to center the plot.
format = Selector(default='png', label='Format', names={}, objects=['png', 'svg'])
The format to render Matplotlib plots with.
linked_axes = Boolean(default=True, label='Linked axes')
Whether to link the axes of bokeh plots inside this pane across a panel layout.
renderer = Parameter(allow_None=True, label='Renderer')
Explicit renderer instance to use for rendering the HoloViews plot. Overrides the backend.
theme = ClassSelector(allow_None=True, class_=(<class 'bokeh.themes.theme.Theme'>, <class 'str'>), label='Theme')
Bokeh theme to apply to the HoloViews plot.
widget_location = Selector(default='right_top', label='Widget location', names={}, objects=['left', 'bottom', 'right', 'top', 'top_left', 'top_right', 'bottom_left', 'bottom_right', 'left_top', 'left_bottom', 'right_top', 'right_bottom'])
The layout of the plot and the widgets. The value refers to the position of the widgets relative to the plot.
widget_layout = Selector(constant=True, default=<class 'panel.layout.base.WidgetBox'>, label='Widget layout', names={}, objects=[<class 'panel.layout.base.WidgetBox'>, <class 'panel.layout.base.Row'>, <class 'panel.layout.base.Column'>])
The layout object to display the widgets in.
widget_type = Selector(default='individual', label='Widget type', names={}, objects=['individual', 'scrubber'])
) Whether to generate individual widgets for each dimension or on global scrubber.
widgets = Dict(class_=<class 'dict'>, default={}, label='Widgets')
A mapping from dimension name to a widget instance which will be used to override the default widgets.
- classmethod applies(obj: Any) float | bool | None [source]#
Returns boolean or float indicating whether the Pane can render the object.
If the priority of the pane is set to None, this method may also be used to define a float priority depending on the object being rendered.
- jslink(target, code=None, args=None, bidirectional=False, **links)[source]#
Links properties on the this Reactive object to those on the target Reactive object in JS code.
Supports two modes, either specify a mapping between the source and target model properties as keywords or provide a dictionary of JS code snippets which maps from the source parameter to a JS code snippet which is executed when the property changes.
- Parameters:
- target: panel.viewable.Viewable | bokeh.model.Model | holoviews.core.dimension.Dimensioned
The target to link the value to.
- code: dict
Custom code which will be executed when the widget value changes.
- args: dict
A mapping of objects to make available to the JS callback
- bidirectional: boolean
Whether to link source and target bi-directionally
- links: dict
A mapping between properties on the source model and the target model property to link it to.
- Returns:
- link: GenericLink
The GenericLink which can be used unlink the widget and the target model.
- class panel.pane.holoviews.Interactive(object=None, **params)[source]#
Bases:
Pane
- Attributes:
- priority
Methods
applies
(object)Returns boolean or float indicating whether the Pane can render the object.
Parameter Definitions
Parameters inherited from:
panel.viewable.Layoutable
: align, aspect_ratio, css_classes, design, height, min_width, min_height, max_width, max_height, styles, stylesheets, tags, width, width_policy, height_policy, sizing_mode, visiblepanel.viewable.Viewable
: loadingpanel.pane.base.PaneBase
: margin, default_layoutobject = Parameter(allow_None=True, label='Object')
The object being wrapped, which will be converted to a Bokeh model.
- classmethod applies(object: Any) float | bool | None [source]#
Returns boolean or float indicating whether the Pane can render the object.
If the priority of the pane is set to None, this method may also be used to define a float priority depending on the object being rendered.
- priority: ClassVar[float | bool | None] = None#
- panel.pane.holoviews.find_links(root_view, root_model)[source]#
Traverses the supplied Viewable searching for Links between any HoloViews based panes.
- panel.pane.holoviews.generate_panel_bokeh_map(root_model, panel_views)[source]#
mapping panel elements to its bokeh models