HoloViews#
This component is also available in the classic reference.
HoloViews panes render any HoloViews object using the currently selected backend (‘bokeh’ (default), ‘matplotlib’ or ‘plotly’).
Use pn.ui.HoloViews to create this component.
API#
.. py:class:: HoloViews(object=None, **params) :module: panel.pane.holoviews
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)
:Attributes:
**backend**
..
**renderer**
..
**theme**
..
.. rubric:: Methods
.. autosummary::
applies
jslink
widget_layout
=========================== ==========
widgets_from_dimensions
=========================== ==========
.. !! processed by numpydoc !!
Parameter Definitions
Parameters inherited from:
:class:`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, visible
:class:`panel.viewable.Viewable`: loading
:class:`panel.pane.base.PaneBase`: margin, default_layout, object
backend = 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.
default_widgets = Dict(class_=<class 'dict'>, constant=True, default={'date': <class 'panel_material_ui.widgets.input.DatetimeInput'>, 'discrete': <class 'panel_material_ui.widgets.select.Select'>, 'discrete_numeric': <class 'panel_material_ui.widgets.slider.DiscreteSlider'>, 'float': (<class 'panel_material_ui.widgets.slider.FloatSlider'>, <class 'panel_material_ui.widgets.slider.EditableFloatSlider'>), 'int': (<class 'panel_material_ui.widgets.slider.IntSlider'>, <class 'panel_material_ui.widgets.slider.EditableIntSlider'>), 'scrubber': <class 'panel_material_ui.widgets.player.Player'>}, label='Default widgets')
Mapping that determines which widgets are used by default when
constructing interactive controls for HoloViews dimensions.
Keys and expected values:
- ``'date'``: For datetime ranges.
- ``'discrete'``: For categorical values.
- ``'discrete_numeric'``: For discrete, numeric values.
- ``'float'``: For continuous floating-point ranges.
- ``'int'``: For integer ranges.
- ``'scrubber'``: For stepping through frame sequences.
Note that float and int widgets may be given a tuple
to select between the static case (i.e. a HoloMap) and
dynamic case (i.e. a DynamicMap).
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.
.. py:method:: HoloViews.applies(object: ~typing.Any) -> float | bool | None :module: panel.pane.holoviews :classmethod:
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.
..
!! processed by numpydoc !!
.. py:method:: HoloViews.jslink(target, code=None, args=None, bidirectional=False, **links) :module: panel.pane.holoviews
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.
..
!! processed by numpydoc !!
.. py:attribute:: HoloViews.widget_layout :module: panel.pane.holoviews
alias of :py:class:`~panel.layout.base.WidgetBox`