holoviews.bokeh Package#


bokeh Package#


annotation Module#

class holoviews.plotting.bokeh.annotation.ArrowPlot(element, plot=None, **params)[source]#

Bases: CompositeElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.BoxAnnotationPlot(element, plot=None, **params)[source]#

Bases: ElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

apply_ranges = param.Boolean(allow_refs=False, default=False, label=’Apply ranges’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16dc7d650>)

Whether to include the annotation in axis range calculations.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.DivPlot(element, plot=None, **params)[source]#

Bases: BokehPlot, GenericElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticks

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format, toolbar

hooks = param.HookList(allow_refs=False, bounds=(0, None), default=[], label=’Hooks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16dc2ba10>)

Optional list of hooks called when finalizing a plot. The hook is passed the plot object and the displayed element, and other plotting handles can be accessed via plot.handles.

width = param.Number(allow_refs=False, bounds=(0, None), default=300, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16dca9b90>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

height = param.Number(allow_refs=False, bounds=(0, None), default=300, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16dca9fd0>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

sizing_mode = param.Selector(allow_refs=False, label=’Sizing mode’, names={}, nested_refs=False, objects=[‘fixed’, ‘stretch_width’, ‘stretch_height’, ‘stretch_both’, ‘scale_width’, ‘scale_height’, ‘scale_both’, None], rx=<param.reactive.reactive_ops object at 0x16dca9450>)

How the component should size itself. * “fixed” : Component is not responsive. It will retain its original width and height regardless of any subsequent browser window resize events. * “stretch_width” Component will responsively resize to stretch to the available width, without maintaining any aspect ratio. The height of the component depends on the type of the component and may be fixed or fit to component’s contents. * “stretch_height” Component will responsively resize to stretch to the available height, without maintaining any aspect ratio. The width of the component depends on the type of the component and may be fixed or fit to component’s contents. * “stretch_both” Component is completely responsive, independently in width and height, and will occupy all the available horizontal and vertical space, even if this changes the aspect ratio of the component. * “scale_width” Component will responsively resize to stretch to the available width, while maintaining the original or provided aspect ratio. * “scale_height” Component will responsively resize to stretch to the available height, while maintaining the original or provided aspect ratio. * “scale_both” Component will responsively resize to both the available width and height, while maintaining the original or provided aspect ratio.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_aspect(xspan, yspan)[source]#

Should define the aspect ratio of the plot.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(key, ranges=None, plot=None)[source]#

Updates an existing plot with data corresponding to the key.

class holoviews.plotting.bokeh.annotation.HLinesAnnotationPlot(element, **kwargs)[source]#

Bases: _SyntheticAnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.annotation._SyntheticAnnotationPlot: apply_ranges

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.HSpansAnnotationPlot(element, **kwargs)[source]#

Bases: _SyntheticAnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.annotation._SyntheticAnnotationPlot: apply_ranges

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.LabelsPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16dce2850>)

Whether to show legend for the plot.

xoffset = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Xoffset’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e16aa10>)

Amount of offset to apply to labels along x-axis.

yoffset = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Yoffset’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e16afd0>)

Amount of offset to apply to labels along x-axis.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e169310>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.LineAnnotationPlot(element, plot=None, **params)[source]#

Bases: ElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

apply_ranges = param.Boolean(allow_refs=False, default=False, label=’Apply ranges’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e116610>)

Whether to include the annotation in axis range calculations.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.SlopePlot(element, plot=None, **params)[source]#

Bases: ElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.SplinePlot(element, plot=None, **params)[source]#

Bases: ElementPlot, AnnotationPlot

Draw the supplied Spline annotation (see Spline docstring). Does not support matplotlib Path codes.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.TextPlot(element, plot=None, **params)[source]#

Bases: ElementPlot, AnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.VLinesAnnotationPlot(element, **kwargs)[source]#

Bases: _SyntheticAnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.annotation._SyntheticAnnotationPlot: apply_ranges

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.annotation.VSpansAnnotationPlot(element, **kwargs)[source]#

Bases: _SyntheticAnnotationPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.annotation._SyntheticAnnotationPlot: apply_ranges

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges=None, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


callbacks Module#

class holoviews.plotting.bokeh.callbacks.BoundsCallback(plot, streams, source, **params)[source]#

Bases: PopupMixin, Callback

Returns the bounds of a box_select tool.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.BoundsXCallback(plot, streams, source, **params)[source]#

Bases: Callback

Returns the bounds of a xbox_select tool.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.BoundsYCallback(plot, streams, source, **params)[source]#

Bases: Callback

Returns the bounds of a ybox_select tool.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.BoxEditCallback(plot, streams, source, **params)[source]#

Bases: GlyphDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.CDSCallback(plot, streams, source, **params)[source]#

Bases: Callback

A Stream callback that syncs the data on a bokeh ColumnDataSource model with Python.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.Callback(plot, streams, source, **params)[source]#

Bases: object

Provides a baseclass to define callbacks, which return data from bokeh model callbacks, events and attribute changes. The callback then makes this data available to any streams attached to it.

The definition of a callback consists of a number of components:

  • modelsDefines which bokeh models the callback will be

    attached on referencing the model by its key in the plots handles, e.g. this could be the x_range, y_range, plot, a plotting tool or any other bokeh mode.

  • attributesThe attributes define which attributes to send

    back to Python. They are defined as a dictionary mapping between the name under which the variable is made available to Python and the specification of the attribute. The specification should start with the variable name that is to be accessed and the location of the attribute separated by periods. All models defined by the models and can be addressed in this way, e.g. to get the start of the x_range as ‘x’ you can supply {‘x’: ‘x_range.attributes.start’}. Additionally certain handles additionally make the cb_obj variables available containing additional information about the event.

  • on_eventsIf the Callback should listen to bokeh events this

    should declare the types of event as a list (optional)

  • on_changesIf the Callback should listen to model attribute

    changes on the defined models (optional)

If either on_events or on_changes are declared the Callback will be registered using the on_event or on_change machinery, otherwise it will be treated as a regular callback on the model. The callback can also define a _process_msg method, which can modify the data sent by the callback before it is passed to the streams.

A callback supports three different throttling modes:

  • adaptive (default): The callback adapts the throttling timeout depending on the rolling mean of the time taken to process each message. The rolling window is controlled by the adaptive_window value.

  • throttle: Uses the fixed throttle_timeout as the minimum amount of time between events.

  • debounce: Processes the message only when no new event has been received within the throttle_timeout duration.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.CurveEditCallback(plot, streams, source, **params)[source]#

Bases: GlyphDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.DoubleTapCallback(plot, streams, source, **params)[source]#

Bases: TapCallback

Returns the mouse x/y-position on doubletap event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.DrawCallback(*args, **kwargs)[source]#

Bases: PointerXYCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.FreehandDrawCallback(plot, streams, source, **params)[source]#

Bases: PolyDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.GlyphDrawCallback(plot, streams, source, **params)[source]#

Bases: CDSCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.LassoCallback(plot, streams, source, **params)[source]#

Bases: PopupMixin, Callback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.MouseEnterCallback(plot, streams, source, **params)[source]#

Bases: PointerXYCallback

Returns the mouse x/y-position on mouseenter event, i.e. when mouse enters the plot canvas.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.MouseLeaveCallback(plot, streams, source, **params)[source]#

Bases: PointerXYCallback

Returns the mouse x/y-position on mouseleave event, i.e. when mouse leaves the plot canvas.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.MultiAxisTapCallback(plot, streams, source, **params)[source]#

Bases: TapCallback

Returns the mouse x/y-positions on tap event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PanEndCallback(plot, streams, source, **params)[source]#

Bases: TapCallback

Returns the mouse x/y-position of a pan end event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PlotSizeCallback(plot, streams, source, **params)[source]#

Bases: Callback

Returns the actual width and height of a plot once the layout solver has executed.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PointDrawCallback(plot, streams, source, **params)[source]#

Bases: GlyphDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PointerXCallback(plot, streams, source, **params)[source]#

Bases: PointerXYCallback

Returns the mouse x-position on mousemove event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PointerXYCallback(plot, streams, source, **params)[source]#

Bases: Callback

Returns the mouse x/y-position on mousemove event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PointerYCallback(plot, streams, source, **params)[source]#

Bases: PointerXYCallback

Returns the mouse x/y-position on mousemove event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PolyDrawCallback(plot, streams, source, **params)[source]#

Bases: GlyphDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PolyEditCallback(plot, streams, source, **params)[source]#

Bases: PolyDrawCallback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.PressUpCallback(plot, streams, source, **params)[source]#

Bases: TapCallback

Returns the mouse x/y-position of a pressup mouse event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.RangeXCallback(plot, streams, source, **params)[source]#

Bases: RangeXYCallback

Returns the x-axis range of a plot.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.RangeXYCallback(plot, streams, source, **params)[source]#

Bases: Callback

Returns the x/y-axis ranges of a plot.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.RangeYCallback(plot, streams, source, **params)[source]#

Bases: RangeXYCallback

Returns the y-axis range of a plot.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.ResetCallback(plot, streams, source, **params)[source]#

Bases: Callback

Signals the Reset stream if an event has been triggered.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.SelectModeCallback(plot, streams, source, **params)[source]#

Bases: Callback

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.Selection1DCallback(plot, streams, source, **params)[source]#

Bases: PopupMixin, Callback

Returns the current selection on a ColumnDataSource.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.SelectionXYCallback(plot, streams, source, **params)[source]#

Bases: BoundsCallback

Converts a bounds selection to numeric or categorical x-range and y-range selections.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.SingleTapCallback(plot, streams, source, **params)[source]#

Bases: TapCallback

Returns the mouse x/y-position on tap event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.

class holoviews.plotting.bokeh.callbacks.TapCallback(plot, streams, source, **params)[source]#

Bases: PopupMixin, PointerXYCallback

Returns the mouse x/y-position on tap event.

Note: As of bokeh 0.12.5, there is no way to distinguish the individual tap events within a doubletap event.

async on_change(attr, old, new)[source]#

Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async on_event(event)[source]#

Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.

async process_on_event(timeout=None)[source]#

Trigger callback change event and triggering corresponding streams.

classmethod resolve_attr_spec(spec, cb_obj, model=None)[source]#

Resolves a Callback attribute specification looking the corresponding attribute up on the cb_obj, which should be a bokeh model. If not model is supplied cb_obj is assumed to be the same as the model.

set_callback(handle)[source]#

Set up on_change events for bokeh server interactions.


chart Module#

class holoviews.plotting.bokeh.chart.AreaPlot(element, plot=None, **params)[source]#

Bases: AreaMixin, SpreadPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=(0, 0.1), label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ef58fd0>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.BarPlot(element, plot=None, **params)[source]#

Bases: BarsMixin, ColorbarPlot, LegendPlot

BarPlot allows generating single- or multi-category bar Charts, by selecting which key dimensions are mapped onto separate groups, categories and stacks.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

multi_level = param.Boolean(allow_refs=False, default=True, label=’Multi level’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16eb08790>)

Whether the Bars should be grouped into a second categorical axis level.

stacked = param.Boolean(allow_refs=False, default=False, label=’Stacked’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ef323d0>)

Whether the bars should be stacked or grouped.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ef33a90>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Make adjustments to plot extents by computing stacked bar heights, adjusting the bar baseline and forcing the x-axis to be categorical.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_stack(xvals, yvals, baselines, sign='positive')[source]#

Iterates over a x- and y-values in a stack layer and appropriately offsets the layer on top of the previous layer.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.CurvePlot(element, plot=None, **params)[source]#

Bases: ElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=(0, 0.1), label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f09cd50>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

interpolation = param.Selector(allow_refs=False, default=’linear’, label=’Interpolation’, names={}, nested_refs=False, objects=[‘linear’, ‘steps-mid’, ‘steps-pre’, ‘steps-post’], rx=<param.reactive.reactive_ops object at 0x16f09e750>)

Defines how the samples of the Curve are interpolated, default is ‘linear’, other options include ‘steps-mid’, ‘steps-pre’ and ‘steps-post’.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.ErrorPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f075a50>)

The current selection as a list of integers corresponding to the selected items.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.HistogramPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.PointPlot(element, plot=None, **params)[source]#

Bases: LegendPlot, ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

jitter = param.Number(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Jitter’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f1c5550>)

The amount of jitter to apply to offset the points along the x-axis.

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f1c6f90>)

The current selection as a list of integers corresponding to the selected items.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f1c4dd0>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

size_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Size index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f1c6ed0>)

Deprecated in favor of size style mapping, e.g. size=dim(‘size’)

scaling_method = param.Selector(allow_refs=False, default=’area’, label=’Scaling method’, names={}, nested_refs=False, objects=[‘width’, ‘area’], rx=<param.reactive.reactive_ops object at 0x16f1c51d0>)

Deprecated in favor of size style mapping, e.g. size=dim(‘size’)**2.

scaling_factor = param.Number(allow_refs=False, bounds=(0, None), default=1, inclusive_bounds=(True, True), label=’Scaling factor’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f1c54d0>)

Scaling factor which is applied to either the width or area of each point, depending on the value of scaling_method.

size_fn = param.Callable(allow_refs=False, default=<ufunc ‘absolute’>, label=’Size fn’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e8e0210>)

Function applied to size values before applying scaling, to remove values lower than zero.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

size_fn = <ufunc 'absolute'>#
property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.SideHistogramPlot(*args, **kwargs)[source]#

Bases: HistogramPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

show_title = param.Boolean(allow_refs=False, default=False, label=’Show title’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f266210>)

Whether to display the plot title.

width = param.Integer(allow_refs=False, bounds=(0, None), default=125, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f267bd0>)

The width of the plot

height = param.Integer(allow_refs=False, bounds=(0, None), default=125, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f2442d0>)

The height of the plot

default_tools = param.List(allow_refs=False, bounds=(0, None), default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], label=’Default tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f267450>)

A list of plugin tools to use on the plot.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.SideSpikesPlot(element, plot=None, **params)[source]#

Bases: SpikesPlot

SpikesPlot with useful defaults for plotting adjoined rug plot.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, active_tools, align, apply_hard_bounds, autorange, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.chart.SpikesPlot: show_legend, spike_length, position, color_index

xaxis = param.Selector(allow_refs=False, default=’top-bare’, label=’Xaxis’, names={}, nested_refs=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], rx=<param.reactive.reactive_ops object at 0x16f2d8310>)

Whether and where to display the xaxis, bare options allow suppressing all axis labels including ticks and xlabel. Valid options are ‘top’, ‘bottom’, ‘bare’, ‘top-bare’ and ‘bottom-bare’.

yaxis = param.Selector(allow_refs=False, default=’right-bare’, label=’Yaxis’, names={}, nested_refs=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], rx=<param.reactive.reactive_ops object at 0x16f2d9d10>)

Whether and where to display the yaxis, bare options allow suppressing all axis labels including ticks and ylabel. Valid options are ‘left’, ‘right’, ‘bare’ ‘left-bare’ and ‘right-bare’.

width = param.Integer(allow_refs=False, bounds=(0, None), default=50, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f2d9f10>)

Width of plot

height = param.Integer(allow_refs=False, bounds=(0, None), default=50, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f2da2d0>)

Height of plot

border = param.Integer(allow_refs=False, default=5, inclusive_bounds=(True, True), label=’Border’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f2da010>)

Default borders on plot

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f2d9990>)

The current selection as a list of integers corresponding to the selected items.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.SpikesPlot(element, plot=None, **params)[source]#

Bases: SpikesMixin, ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

show_legend = param.Boolean(allow_refs=False, default=True, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f352250>)

Whether to show legend for the plot.

spike_length = param.Number(allow_refs=False, default=0.5, inclusive_bounds=(True, True), label=’Spike length’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f353e50>)

The length of each spike if Spikes object is one dimensional.

position = param.Number(allow_refs=False, default=0.0, inclusive_bounds=(True, True), label=’Position’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f34c550>)

The position of the lower end of each spike.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f353690>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.SpreadPlot(element, plot=None, **params)[source]#

Bases: ElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=(0, 0.1), label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f3b4890>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.chart.VectorFieldPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=0.05, label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16edd4150>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

arrow_heads = param.Boolean(allow_refs=False, default=True, label=’Arrow heads’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ed950d0>)

Whether or not to draw arrow heads.

magnitude = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘holoviews.util.transform.dim’>), label=’Magnitude’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16edd53d0>)

Dimension or dimension value transform that declares the magnitude of each vector. Magnitude is expected to be scaled between 0-1, by default the magnitudes are rescaled relative to the minimum distance between vectors, this can be disabled with the rescale_lengths option.

pivot = param.Selector(allow_refs=False, default=’mid’, label=’Pivot’, names={}, nested_refs=False, objects=[‘mid’, ‘tip’, ‘tail’], rx=<param.reactive.reactive_ops object at 0x16ed94d90>)

The point around which the arrows should pivot valid options include ‘mid’, ‘tip’ and ‘tail’.

rescale_lengths = param.Boolean(allow_refs=False, default=True, label=’Rescale lengths’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16edd5290>)

Whether the lengths will be rescaled to take into account the smallest non-zero distance between two vectors.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ed95390>)

Deprecated in favor of dimension value transform on color option, e.g. color=dim(‘Magnitude’).

size_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Size index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16edd4550>)

Deprecated in favor of the magnitude option, e.g. magnitude=dim(‘Magnitude’).

normalize_lengths = param.Boolean(allow_refs=False, default=True, label=’Normalize lengths’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16edd4150>)

Deprecated in favor of rescaling length using dimension value transforms using the magnitude option, e.g. dim(‘Magnitude’).norm().

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


element Module#

class holoviews.plotting.bokeh.element.AnnotationPlot[source]#

Bases: object

Mix-in plotting subclass for AnnotationPlots which do not have a legend.

class holoviews.plotting.bokeh.element.ColorbarPlot(element, plot=None, **params)[source]#

Bases: ElementPlot

ColorbarPlot provides methods to create colormappers and colorbar models which can be added to a glyph. Additionally it provides parameters to control the position and other styling options of the colorbar. The default colorbar_position options are defined by the colorbar_specs, but may be overridden by the colorbar_opts.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

color_levels = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘int’>, <class ‘list’>, <class ‘range’>), label=’Color levels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f899bd0>)

Number of discrete colors to use when colormapping or a set of color intervals defining the range of values to map each color to.

cformatter = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘bokeh.models.formatters.TickFormatter’>, <class ‘function’>), label=’Cformatter’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f899890>)

Formatter for ticks along the colorbar axis.

clabel = param.String(allow_None=True, allow_refs=False, label=’Clabel’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f23c150>)

An explicit override of the color bar label. If set, takes precedence over the title key in colorbar_opts.

clim = param.Tuple(allow_refs=False, default=(nan, nan), label=’Clim’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f89a010>)

User-specified colorbar axis range limits for the plot, as a tuple (low,high). If specified, takes precedence over data and dimension ranges.

clim_percentile = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘bool’>), default=False, label=’Clim percentile’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f899a10>)

Percentile value to compute colorscale robust to outliers. If True, uses 2nd and 98th percentile; otherwise uses the specified numerical percentile value.

cnorm = param.Selector(allow_refs=False, default=’linear’, label=’Cnorm’, names={}, nested_refs=False, objects=[‘linear’, ‘log’, ‘eq_hist’], rx=<param.reactive.reactive_ops object at 0x16f899890>)

Color normalization to be applied during colormapping.

colorbar = param.Boolean(allow_refs=False, default=False, label=’Colorbar’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f77bf10>)

Whether to display a colorbar.

colorbar_position = param.Selector(allow_refs=False, default=’right’, label=’Colorbar position’, names={}, nested_refs=False, objects=[‘right’, ‘left’, ‘bottom’, ‘top’, ‘top_right’, ‘top_left’, ‘bottom_left’, ‘bottom_right’], rx=<param.reactive.reactive_ops object at 0x16f89a290>)

Allows selecting between a number of predefined colorbar position options. The predefined options may be customized in the colorbar_specs class attribute.

colorbar_opts = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Colorbar opts’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f8999d0>)

Allows setting specific styling options for the colorbar overriding the options defined in the colorbar_specs class attribute. Includes location, orientation, height, width, scale_alpha, title, title_props, margin, padding, background_fill_color and more.

clipping_colors = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Clipping colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f899d10>)

Dictionary to specify colors for clipped values, allows setting color for NaN values and for values above and below the min and max value. The min, max or NaN color may specify an RGB(A) color as a color hex string of the form #FFFFFF or #FFFFFFFF or a length 3 or length 4 tuple specifying values in the range 0-1 or a named HTML color.

cticks = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘int’>, <class ‘list’>, <class ‘tuple’>, <class ‘numpy.ndarray’>, <class ‘bokeh.models.tickers.Ticker’>), label=’Cticks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f899e90>)

Ticks along colorbar-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.

logz = param.Boolean(allow_refs=False, default=False, label=’Logz’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f89a1d0>)

Whether to apply log scaling to the z-axis.

rescale_discrete_levels = param.Boolean(allow_refs=False, default=True, label=’Rescale discrete levels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f898d50>)

If cnorm='eq_hist and there are only a few discrete values, then rescale_discrete_levels=True decreases the lower limit of the autoranged span so that the values are rendering towards the (more visible) top of the palette, thus avoiding washout of the lower values. Has no effect if cnorm!=`eq_hist.

symmetric = param.Boolean(allow_refs=False, default=False, label=’Symmetric’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f89a1d0>)

Whether to make the colormap symmetric around zero.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.element.CompositeElementPlot(element, plot=None, **params)[source]#

Bases: ElementPlot

A CompositeElementPlot is an Element plot type that coordinates drawing of multiple glyphs.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.element.ElementPlot(element, plot=None, **params)[source]#

Bases: BokehPlot, GenericElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

fontsize = param.Parameter(allow_None=True, allow_refs=False, default={‘title’: ‘12pt’}, label=’Fontsize’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ff70790>)

Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘ticks’: ‘20pt’, ‘title’: ‘15pt’, ‘ylabel’: ‘5px’, ‘xlabel’: ‘5px’}

xticks = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘int’>, <class ‘list’>, <class ‘tuple’>, <class ‘numpy.ndarray’>, <class ‘bokeh.models.tickers.Ticker’>), label=’Xticks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc9c10>)

Ticks along x-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.

yticks = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘int’>, <class ‘list’>, <class ‘tuple’>, <class ‘numpy.ndarray’>, <class ‘bokeh.models.tickers.Ticker’>), label=’Yticks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc9fd0>)

Ticks along y-axis specified as an integer, explicit list of tick locations, or bokeh Ticker object. If set to None default bokeh ticking behavior is applied.

toolbar = param.Selector(allow_refs=False, default=’right’, label=’Toolbar’, names={}, nested_refs=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, ‘disable’, None], rx=<param.reactive.reactive_ops object at 0x16ffc92d0>)

The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.

width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), default=300, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc9f50>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), default=300, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc9350>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

active_tools = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Active tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

Allows specifying which tools are active by default. Note that only one tool per gesture type can be active, e.g. both ‘pan’ and ‘box_zoom’ are drag tools, so if both are listed only the last one will be active. As a default ‘pan’ and ‘wheel_zoom’ will be used if the tools are enabled.

align = param.Selector(allow_refs=False, default=’start’, label=’Align’, names={}, nested_refs=False, objects=[‘start’, ‘center’, ‘end’], rx=<param.reactive.reactive_ops object at 0x16f9cbe90>)

Alignment (vertical or horizontal) of the plot in a layout.

apply_hard_bounds = param.Boolean(allow_refs=False, default=False, label=’Apply hard bounds’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cad10>)

If True, the navigable bounds of the plot will be set based on the more extreme of extents between the data or xlim/ylim ranges. If dim ranges are set, the hard bounds will be set to the dim ranges.

autorange = param.Selector(allow_refs=False, label=’Autorange’, names={}, nested_refs=False, objects=[‘x’, ‘y’, None], rx=<param.reactive.reactive_ops object at 0x16f9cbe90>)

Whether to auto-range along either the x- or y-axis, i.e. when panning or zooming along the orthogonal axis it will ensure all the data along the selected axis remains visible.

border = param.Number(allow_refs=False, default=10, inclusive_bounds=(True, True), label=’Border’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f779a90>)

Minimum border around plot.

aspect = param.Parameter(allow_None=True, allow_refs=False, label=’Aspect’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb790>)

The aspect ratio mode of the plot. By default, a plot may select its own appropriate aspect ratio but sometimes it may be necessary to force a square aspect ratio (e.g. to display the plot as an element of a grid). The modes ‘auto’ and ‘equal’ correspond to the axis modes of the same name in matplotlib, a numeric value specifying the ratio between plot width and height may also be passed. To control the aspect ratio between the axis scales use the data_aspect option instead.

backend_opts = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Backend opts’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e1eb110>)

A dictionary of custom options to apply to the plot or subcomponents of the plot. The keys in the dictionary mirror attribute access on the underlying models stored in the plot’s handles, e.g. {‘colorbar.margin’: 10} will index the colorbar in the Plot.handles and then set the margin to 10.

data_aspect = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Data aspect’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9caf50>)

Defines the aspect of the axis scaling, i.e. the ratio of y-unit to x-unit.

frame_width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Frame width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc92d0>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

frame_height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Frame height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae10>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

min_width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Min width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffca050>)

Minimal width of the component (in pixels) if width is adjustable.

min_height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Min height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae10>)

Minimal height of the component (in pixels) if height is adjustable.

max_width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Max width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16ffc9a90>)

Minimal width of the component (in pixels) if width is adjustable.

max_height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Max height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae10>)

Minimal height of the component (in pixels) if height is adjustable.

margin = param.Parameter(allow_None=True, allow_refs=False, label=’Margin’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f779a90>)

Allows to create additional space around the component. May be specified as a two-tuple of the form (vertical, horizontal) or a four-tuple (top, right, bottom, left).

multi_y = param.Boolean(allow_refs=False, default=False, label=’Multi y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

Enables multiple axes (one per value dimension) in overlays and useful for creating twin-axis plots. When enabled, axis options are no longer propagated between the elements and the overlay container, allowing customization on a per-axis basis.

scalebar = param.Boolean(allow_refs=False, default=False, label=’Scalebar’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f779a90>)

Whether to display a scalebar.

scalebar_range = param.Selector(allow_refs=False, default=’x’, label=’Scalebar range’, names={}, nested_refs=False, objects=[‘x’, ‘y’], rx=<param.reactive.reactive_ops object at 0x16f9cb790>)

Whether to have the scalebar on the x or y axis.

scalebar_unit = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘tuple’>), label=’Scalebar unit’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb8d0>)

Unit of the scalebar. The order of how this will be done is by: 1. This value if it is set. 2. The elements kdim unit (if exist). 3. Meter If the value is a tuple, the first value will be the unit and the second will be the base unit. The scalebar_unit is only used if scalebar is True.

scalebar_location = param.Selector(allow_refs=False, label=’Scalebar location’, names={}, nested_refs=False, objects=[‘top_left’, ‘top_center’, ‘top_right’, ‘center_left’, ‘center_center’, ‘center_right’, ‘bottom_left’, ‘bottom_center’, ‘bottom_right’, ‘top’, ‘left’, ‘center’, ‘right’, ‘bottom’], rx=<param.reactive.reactive_ops object at 0x16f9cbdd0>)

Location anchor for positioning scale bar. Default to ‘bottom_right’, except if subcoordinate_y is True then it will default to ‘right’. The scalebar_location is only used if scalebar is True.

scalebar_label = param.String(allow_refs=False, default=’@{value} @{unit}’, label=’Scalebar label’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9e5bd0>)

The label template. This can use special variables: * @{value} The current value. Optionally can provide a number formatter with e.g. @{value}{%.2f}. * @{unit} The unit of measure. The scalebar_label is only used if scalebar is True.

scalebar_tool = param.Boolean(allow_refs=False, default=True, label=’Scalebar tool’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb9d0>)

Whether to show scalebar tools in the toolbar, the tools are used to control scalebars visibility. The scalebar_tool is only used if scalebar is True.

scalebar_opts = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Scalebar opts’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9c8590>)

Allows setting specific styling options for the scalebar. See https://docs.bokeh.org/en/latest/docs/reference/models/annotations.html#bokeh.models.ScaleBar for more information. The scalebar_opts is only used if scalebar is True.

subcoordinate_y = param.ClassSelector(allow_refs=False, class_=(<class ‘bool’>, <class ‘tuple’>), default=False, label=’Subcoordinate y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

Enables sub-coordinate systems for this plot. Accepts also a numerical two-tuple that must be a range between 0 and 1, the plot will be rendered on this vertical range of the axis.

subcoordinate_scale = param.Number(allow_refs=False, bounds=(0, None), default=1, inclusive_bounds=(False, True), label=’Subcoordinate scale’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae10>)

Scale factor for subcoordinate ranges to control the level of overlap.

responsive = param.Selector(allow_refs=False, default=False, label=’Responsive’, names={}, nested_refs=False, objects=[False, True, ‘width’, ‘height’], rx=<param.reactive.reactive_ops object at 0x16f9cbdd0>)

gridstyle = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Gridstyle’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb8d0>)

Allows customizing the grid style, e.g. grid_line_color defines the line color for both grids while xgrid_line_color exclusively customizes the x-axis grid lines.

labelled = param.List(allow_refs=False, bounds=(0, None), default=[‘x’, ‘y’], label=’Labelled’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

Whether to plot the ‘x’ and ‘y’ labels.

lod = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={‘factor’: 10, ‘interval’: 300, ‘threshold’: 2000, ‘timeout’: 500}, label=’Lod’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb550>)

Bokeh plots offer “Level of Detail” (LOD) capability to accommodate large (but not huge) amounts of data. The available options are: * factor : Decimation factor to use when applying decimation. * interval : Interval (in ms) downsampling will be enabled after an interactive event. * threshold : Number of samples before downsampling is enabled. * timeout : Timeout (in ms) for checking whether interactive tool events are still occurring.

show_frame = param.Boolean(allow_refs=False, default=True, label=’Show frame’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cb9d0>)

Whether or not to show a complete frame around the plot.

shared_axes = param.Boolean(allow_refs=False, default=True, label=’Shared axes’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16e1eb110>)

Whether to invert the share axes across plots for linked panning and zooming.

default_tools = param.List(allow_refs=False, bounds=(0, None), default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], label=’Default tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9c8bd0>)

A list of plugin tools to use on the plot.

tools = param.List(allow_refs=False, bounds=(0, None), default=[], label=’Tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cbc10>)

A list of plugin tools to use on the plot.

hover_tooltips = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘list’>, <class ‘str’>), label=’Hover tooltips’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

A list of dimensions to be displayed in the hover tooltip.

hover_formatters = param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, label=’Hover formatters’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9e5bd0>)

A dict of formatting options for the hover tooltip.

hover_mode = param.Selector(allow_refs=False, default=’mouse’, label=’Hover mode’, names={}, nested_refs=False, objects=[‘mouse’, ‘vline’, ‘hline’], rx=<param.reactive.reactive_ops object at 0x16f9caf90>)

The hover mode determines how the hover tool is activated.

xformatter = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘bokeh.models.formatters.TickFormatter’>, <class ‘function’>), label=’Xformatter’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9e5bd0>)

Formatter for ticks along the x-axis.

yformatter = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘bokeh.models.formatters.TickFormatter’>, <class ‘function’>), label=’Yformatter’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9cae90>)

Formatter for ticks along the x-axis.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.element.LegendPlot(element, plot=None, **params)[source]#

Bases: ElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

legend_cols = param.Integer(allow_refs=False, bounds=(0, None), default=0, inclusive_bounds=(True, True), label=’Legend cols’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f94eb50>)

Number of columns for legend.

legend_labels = param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, label=’Legend labels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9a3390>)

Label overrides.

legend_muted = param.Boolean(allow_refs=False, default=False, label=’Legend muted’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f94dd10>)

Controls whether the legend entries are muted by default.

legend_offset = param.NumericTuple(allow_refs=False, default=(0, 0), label=’Legend offset’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f94c0d0>)

If legend is placed outside the axis, this determines the (width, height) offset in pixels from the original position.

legend_position = param.Selector(allow_refs=False, default=’top_right’, label=’Legend position’, names={}, nested_refs=False, objects=[‘top_right’, ‘top_left’, ‘bottom_left’, ‘bottom_right’, ‘right’, ‘left’, ‘top’, ‘bottom’], rx=<param.reactive.reactive_ops object at 0x16f94de90>)

Allows selecting between a number of predefined legend position options. The predefined options may be customized in the legend_specs class attribute.

legend_opts = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={}, label=’Legend opts’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f94c0d0>)

Allows setting specific styling options for the colorbar.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.element.OverlayPlot(overlay, **kwargs)[source]#

Bases: GenericOverlayPlot, LegendPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.plot.GenericOverlayPlot: show_legend, batched, legend_limit, style_grouping

tabs = param.Boolean(allow_refs=False, default=False, label=’Tabs’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9df690>)

Whether to display overlaid plots in separate panes

multiple_legends = param.Boolean(allow_refs=False, default=False, label=’Multiple legends’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16f9dce50>)

Whether to split the legend for subplots into multiple legends.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(overlay, ranges, range_type='combined', dimension=None, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None)[source]#

Initialize the matplotlib figure.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


geometry Module#

class holoviews.plotting.bokeh.geometry.RectanglesPlot(element, plot=None, **params)[source]#

Bases: GeomMixin, LegendPlot, ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fb6a790>)

The current selection as a list of integers corresponding to the selected items.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Use first two key dimensions to set names, and all four to set the data range.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.geometry.SegmentPlot(element, plot=None, **params)[source]#

Bases: GeomMixin, ColorbarPlot

Segments are lines in 2D space where each two each dimensions specify a (x, y) node of the line.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fb0a450>)

The current selection as a list of integers corresponding to the selected items.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Use first two key dimensions to set names, and all four to set the data range.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


graphs Module#

class holoviews.plotting.bokeh.graphs.ChordPlot(element, plot=None, **params)[source]#

Bases: ChordMixin, GraphPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, shared_axes, default_tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.graphs.GraphPlot: tools, arrowhead_length, directed, selection_policy, inspection_policy, color_index, edge_color_index

show_frame = param.Boolean(allow_refs=False, default=False, label=’Show frame’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16faebf10>)

Whether or not to show a complete frame around the plot.

labels = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘holoviews.util.transform.dim’>), label=’Labels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fe6b850>)

The dimension or dimension value transform used to draw labels from.

label_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Label index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17001f250>)

Index of the dimension from which the node labels will be drawn

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

A Chord plot is always drawn on a unit circle.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.graphs.GraphPlot(element, plot=None, **params)[source]#

Bases: GraphMixin, CompositeElementPlot, ColorbarPlot, LegendPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

tools = param.List(allow_refs=False, bounds=(0, None), default=[‘hover’, ‘tap’], label=’Tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170140310>)

A list of plugin tools to use on the plot.

arrowhead_length = param.Number(allow_refs=False, default=0.025, inclusive_bounds=(True, True), label=’Arrowhead length’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fd896d0>)

If directed option is enabled this determines the length of the arrows as fraction of the overall extent of the graph.

directed = param.Boolean(allow_refs=False, default=False, label=’Directed’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170140410>)

Whether to draw arrows on the graph edges to indicate the directionality of each edge.

selection_policy = param.Selector(allow_refs=False, default=’nodes’, label=’Selection policy’, names={}, nested_refs=False, objects=[‘edges’, ‘nodes’, None], rx=<param.reactive.reactive_ops object at 0x170141fd0>)

Determines policy for inspection of graph components, i.e. whether to highlight nodes or edges when selecting connected edges and nodes respectively.

inspection_policy = param.Selector(allow_refs=False, default=’nodes’, label=’Inspection policy’, names={}, nested_refs=False, objects=[‘edges’, ‘nodes’, None], rx=<param.reactive.reactive_ops object at 0x1701411d0>)

Determines policy for inspection of graph components, i.e. whether to highlight nodes or edges when hovering over connected edges and nodes respectively.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170141fd0>)

Deprecated in favor of color style mapping, e.g. node_color=dim(‘color’)

edge_color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Edge color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170140410>)

Deprecated in favor of color style mapping, e.g. edge_color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.graphs.NodePlot(element, plot=None, **params)[source]#

Bases: PointPlot

Simple subclass of PointPlot which hides x, y position on hover.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.chart.PointPlot: jitter, selected, color_index, size_index, scaling_method, scaling_factor, size_fn

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

size_fn = <ufunc 'absolute'>#
property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.graphs.TriMeshPlot(element, plot=None, **params)[source]#

Bases: GraphPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.graphs.GraphPlot: tools, arrowhead_length, directed, selection_policy, inspection_policy, color_index, edge_color_index

filled = param.Boolean(allow_refs=False, default=False, label=’Filled’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170176450>)

Whether the triangles should be drawn as filled.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


heatmap Module#

class holoviews.plotting.bokeh.heatmap.HeatMapPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, cticks, logz, rescale_discrete_levels, symmetric

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=0, label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170440690>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17042e390>)

Whether to show legend for the plot.

clipping_colors = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={‘NaN’: ‘white’}, label=’Clipping colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fd09850>)

Dictionary to specify colors for clipped values. Allows setting color for NaN values and for values above and below the min and max value. The min, max, or NaN color may specify an RGB(A) color as a either (1) a color hex string of the form #FFFFFF or #FFFFFFFF, (2) a length-3 or length-4 tuple specifying values in the range 0-1, or (3) a named HTML color.

radial = param.Boolean(allow_refs=False, default=False, label=’Radial’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17042cb90>)

Whether the HeatMap should be radial

xmarks = param.Parameter(allow_None=True, allow_refs=False, label=’Xmarks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x16fde8090>)

Add separation lines to the heatmap for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given categorical values. If parameter is of type function, draw separation lines where function returns True for passed heatmap category.

ymarks = param.Parameter(allow_None=True, allow_refs=False, label=’Ymarks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17042f410>)

Add separation lines to the heatmap for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given categorical values. If parameter is of type function, draw separation lines where function returns True for passed heatmap category.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.heatmap.RadialHeatMapPlot(*args, **kwargs)[source]#

Bases: CompositeElementPlot, ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, cticks, logz, rescale_discrete_levels, symmetric

yrotation = param.Number(allow_refs=False, bounds=(0, 360), default=90, inclusive_bounds=(True, True), label=’Yrotation’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a69d0>)

Define angle along which yticks/annulars are shown. By default, yticks are drawn like a regular y-axis.

xticks = param.Parameter(allow_refs=False, default=4, label=’Xticks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a82d0>)

Ticks along x-axis/segments specified as an integer, explicit list of ticks or function. If None, no ticks are shown.

yticks = param.Parameter(allow_refs=False, default=4, label=’Yticks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6110>)

Ticks along y-axis/annulars specified as an integer, explicit list of ticks or function. If None, no ticks are shown.

show_frame = param.Boolean(allow_refs=False, default=False, label=’Show frame’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6190>)

Whether or not to show a complete frame around the plot.

clipping_colors = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={‘NaN’: ‘white’}, label=’Clipping colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6210>)

Dictionary to specify colors for clipped values. Allows setting color for NaN values and for values above and below the min and max value. The min, max, or NaN color may specify an RGB(A) color as a either (1) a color hex string of the form #FFFFFF or #FFFFFFFF, (2) a length-3 or length-4 tuple specifying values in the range 0-1, or (3) a named HTML color.

start_angle = param.Number(allow_refs=False, default=1.5707963267948966, inclusive_bounds=(True, True), label=’Start angle’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a82d0>)

Define starting angle of the first annulus segment. By default, begins at 12 o’clock.

radius_inner = param.Number(allow_refs=False, bounds=(0, 0.5), default=0.1, inclusive_bounds=(True, True), label=’Radius inner’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a87d0>)

Define the radius fraction of inner, empty space.

radius_outer = param.Number(allow_refs=False, bounds=(0, 1), default=0.05, inclusive_bounds=(True, True), label=’Radius outer’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a84d0>)

Define the radius fraction of outer space including the labels.

xmarks = param.Parameter(allow_None=True, allow_refs=False, label=’Xmarks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6310>)

Add separation lines between segments for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across radial heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given segment values. If parameter is of type function, draw separation lines where function returns True for passed segment value.

ymarks = param.Parameter(allow_None=True, allow_refs=False, label=’Ymarks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6910>)

Add separation lines between annulars for better readability. By default, does not show any separation lines. If parameter is of type integer, draws the given amount of separations lines spread across radial heatmap. If parameter is of type list containing integers, show separation lines at given indices. If parameter is of type tuple, draw separation lines at given annular values. If parameter is of type function, draw separation lines where function returns True for passed annular value.

max_radius = param.Number(allow_refs=False, default=0.5, inclusive_bounds=(True, True), label=’Max radius’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a6290>)

Define the maximum radius which is used for the x and y range extents.

radial = param.Boolean(allow_refs=False, default=True, label=’Radial’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1704a69d0>)

Whether the HeatMap should be radial

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_default_mapping(z, cmapper)[source]#

Create dictionary containing default ColumnDataSource glyph to data mappings.

get_extents(view, ranges, range_type='combined', **kwargs)[source]#

Supply custom, static extents because radial heatmaps always have the same boundaries.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


hex_tiles Module#

class holoviews.plotting.bokeh.hex_tiles.HexTilesPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

aggregator = param.ClassSelector(allow_refs=False, class_=(<class ‘collections.abc.Callable’>, <class ‘tuple’>), default=<function size at 0x103fe1eb0>, label=’Aggregator’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17062b810>)

Aggregation function or dimension transform used to compute bin values. Defaults to np.size to count the number of values in each bin.

gridsize = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘tuple’>), default=50, label=’Gridsize’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170625f90>)

Number of hexagonal bins along x- and y-axes. Defaults to uniform sampling along both axes when setting and integer but independent bin sampling can be specified a tuple of integers corresponding to the number of bins along each axis.

min_count = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Min count’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170625cd0>)

The display threshold before a bin is shown, by default bins with a count of less than 1 are hidden.

orientation = param.Selector(allow_refs=False, default=’pointy’, label=’Orientation’, names={}, nested_refs=False, objects=[‘flat’, ‘pointy’], rx=<param.reactive.reactive_ops object at 0x170625a50>)

The orientation of hexagon bins. By default the pointy side is on top.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), default=2, label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17062b810>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

max_scale = param.Number(allow_refs=False, bounds=(0, None), default=0.9, inclusive_bounds=(True, True), label=’Max scale’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170625dd0>)

When size_index is enabled this defines the maximum size of each bin relative to uniform tile size, i.e. for a value of 1, the largest bin will match the size of bins when scaling is disabled. Setting value larger than 1 will result in overlapping bins.

min_scale = param.Number(allow_refs=False, bounds=(0, None), default=0, inclusive_bounds=(True, True), label=’Min scale’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170625810>)

When size_index is enabled this defines the minimum size of each bin relative to uniform tile size, i.e. for a value of 1, the smallest bin will match the size of bins when scaling is disabled. Setting value larger than 1 will result in overlapping bins.

size_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Size index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170625e90>)

Index of the dimension from which the sizes will the drawn.

aggregator(axis=None)[source]#

Return the number of elements along a given axis.

Parameters#

aarray_like

Input data.

axisint, optional

Axis along which the elements are counted. By default, give the total number of elements.

Returns#

element_countint

Number of elements along the specified axis.

See Also#

shape : dimensions of array ndarray.shape : dimensions of array ndarray.size : number of elements in array

Examples#

>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2
cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.hex_tiles.hex_binning(*, aggregator, gridsize, invert_axes, min_count, orientation, dynamic, group, input_ranges, link_inputs, streams, name)[source]#

Bases: Operation

Applies hex binning by computing aggregates on a hexagonal grid.

Should not be user facing as the returned element is not directly usable.

Parameters inherited from:

holoviews.core.operation.Operation: group, dynamic, input_ranges, link_inputs, streams

aggregator = param.ClassSelector(allow_refs=False, class_=(<class ‘collections.abc.Callable’>, <class ‘tuple’>), default=<function size at 0x103fe1eb0>, label=’Aggregator’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1706bd610>)

Aggregation function or dimension transform used to compute bin values. Defaults to np.size to count the number of values in each bin.

gridsize = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘tuple’>), default=50, label=’Gridsize’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1706beed0>)

invert_axes = param.Boolean(allow_refs=False, default=False, label=’Invert axes’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1706bd050>)

min_count = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Min count’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1706bf050>)

orientation = param.Selector(allow_refs=False, default=’pointy’, label=’Orientation’, names={}, nested_refs=False, objects=[‘flat’, ‘pointy’], rx=<param.reactive.reactive_ops object at 0x1706bf510>)

aggregator(axis=None)[source]#

Return the number of elements along a given axis.

Parameters#

aarray_like

Input data.

axisint, optional

Axis along which the elements are counted. By default, give the total number of elements.

Returns#

element_countint

Number of elements along the specified axis.

See Also#

shape : dimensions of array ndarray.shape : dimensions of array ndarray.size : number of elements in array

Examples#

>>> a = np.array([[1,2,3],[4,5,6]])
>>> np.size(a)
6
>>> np.size(a,1)
3
>>> np.size(a,0)
2
classmethod get_overlay_bounds(overlay)[source]#

Returns the extents if all the elements of an overlay agree on a consistent extents, otherwise raises an exception.

classmethod get_overlay_label(overlay, default_label='')[source]#

Returns a label if all the elements of an overlay agree on a consistent label, otherwise returns the default label.

classmethod instance(**params)[source]#

Return an instance of this class, copying parameters from any existing instance provided.

process_element(element, key, **params)[source]#

The process_element method allows a single element to be operated on given an externally supplied key.

classmethod search(element, pattern)[source]#

Helper method that returns a list of elements that match the given path pattern of form {type}.{group}.{label}.

The input may be a Layout, an Overlay type or a single Element.



path Module#

class holoviews.plotting.bokeh.path.ContourPlot(*args, **params)[source]#

Bases: PathPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1708c9890>)

Whether to show legend for the plot.

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1708b8290>)

The current selection as a list of integers corresponding to the selected items.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), default=0, label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1708b7550>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.path.PathPlot(element, plot=None, **params)[source]#

Bases: LegendPlot, ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17085f010>)

Whether to show legend for the plot.

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170794ad0>)

The current selection as a list of integers corresponding to the selected items.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170796c50>)

Deprecated in favor of color style mapping, e.g. color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.path.PolygonPlot(*args, **params)[source]#

Bases: ContourPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.path.ContourPlot: show_legend, selected, color_index

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


plot Module#

class holoviews.plotting.bokeh.plot.AdjointLayoutPlot(layout, layout_type, subplots, **params)[source]#

Bases: BokehPlot, GenericAdjointLayoutPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, normalize, projection

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format, toolbar, width, height

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

initialize_plot(ranges=None, plots=None)[source]#

Plot all the views contained in the AdjointLayout Object using axes appropriate to the layout configuration. All the axes are supplied by LayoutPlot - the purpose of the call is to invoke subplots with correct options and styles and hide any empty axes as necessary.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

class holoviews.plotting.bokeh.plot.BokehPlot(keys=None, dimensions=None, layout_dimensions=None, uniform=True, subplot=False, adjoined=None, layout_num=0, style=None, subplots=None, dynamic=False, **params)[source]#

Bases: DimensionedPlot, CallbackPlot

Plotting baseclass for the Bokeh backends, implementing the basic plotting interface for Bokeh based plots.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, normalize, projection

title = param.String(allow_refs=False, default=’{label} {group} {dimensions}’, label=’Title’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170c1cf50>)

The formatting string for the title of this plot, allows defining a label group separator and dimension labels.

shared_datasource = param.Boolean(allow_refs=False, default=True, label=’Shared datasource’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170c1e4d0>)

Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.

title_format = param.String(allow_None=True, allow_refs=False, label=’Title format’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170c1cf50>)

Alias for title.

toolbar = param.Selector(allow_refs=False, default=’above’, label=’Toolbar’, names={}, nested_refs=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], rx=<param.reactive.reactive_ops object at 0x170c1e850>)

The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.

width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170c1eb10>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170c1ee90>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

initialize_plot(ranges=None)[source]#

Initialize the matplotlib figure.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

class holoviews.plotting.bokeh.plot.CompositePlot(keys=None, dimensions=None, layout_dimensions=None, uniform=True, subplot=False, adjoined=None, layout_num=0, style=None, subplots=None, dynamic=False, **params)[source]#

Bases: BokehPlot

CompositePlot is an abstract baseclass for plot types that draw render multiple axes. It implements methods to add an overall title to such a plot.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format, toolbar, width, height

fontsize = param.Parameter(allow_None=True, allow_refs=False, default={‘title’: ‘15pt’}, label=’Fontsize’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1705c8090>)

Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘title’: ‘15pt’}

sizing_mode = param.Selector(allow_refs=False, label=’Sizing mode’, names={}, nested_refs=False, objects=[‘fixed’, ‘stretch_width’, ‘stretch_height’, ‘stretch_both’, ‘scale_width’, ‘scale_height’, ‘scale_both’, None], rx=<param.reactive.reactive_ops object at 0x170c44a90>)

How the component should size itself. * “fixed” : Component is not responsive. It will retain its original width and height regardless of any subsequent browser window resize events. * “stretch_width” Component will responsively resize to stretch to the available width, without maintaining any aspect ratio. The height of the component depends on the type of the component and may be fixed or fit to component’s contents. * “stretch_height” Component will responsively resize to stretch to the available height, without maintaining any aspect ratio. The width of the component depends on the type of the component and may be fixed or fit to component’s contents. * “stretch_both” Component is completely responsive, independently in width and height, and will occupy all the available horizontal and vertical space, even if this changes the aspect ratio of the component. * “scale_width” Component will responsively resize to stretch to the available width, while maintaining the original or provided aspect ratio. * “scale_height” Component will responsively resize to stretch to the available height, while maintaining the original or provided aspect ratio. * “scale_both” Component will responsively resize to both the available width and height, while maintaining the original or provided aspect ratio.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

initialize_plot(ranges=None)[source]#

Initialize the matplotlib figure.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

class holoviews.plotting.bokeh.plot.GridPlot(layout, ranges=None, layout_num=1, keys=None, **params)[source]#

Bases: CompositePlot, GenericCompositePlot

Plot a group of elements in a grid layout based on a GridSpace element object.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format, toolbar, width, height

holoviews.plotting.bokeh.plot.CompositePlot: sizing_mode

fontsize = param.Parameter(allow_None=True, allow_refs=False, default={‘title’: ‘16pt’}, label=’Fontsize’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170aaf850>)

Specifies various fontsizes of the displayed text. Finer control is available by supplying a dictionary where any unmentioned keys reverts to the default sizes, e.g: {‘title’: ‘15pt’}

axis_offset = param.Integer(allow_refs=False, default=50, inclusive_bounds=(True, True), label=’Axis offset’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b51650>)

Number of pixels to adjust row and column widths and height by to compensate for shared axes.

merge_tools = param.Boolean(allow_refs=False, default=True, label=’Merge tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170aafcd0>)

Whether to merge all the tools into a single toolbar

shared_xaxis = param.Boolean(allow_refs=False, default=False, label=’Shared xaxis’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b45bd0>)

If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.

shared_yaxis = param.Boolean(allow_refs=False, default=False, label=’Shared yaxis’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b40250>)

If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b47b90>)

Adds a legend based on the entries of the middle-right plot

xaxis = param.Selector(allow_refs=False, default=True, label=’Xaxis’, names={}, nested_refs=False, objects=[‘bottom’, ‘top’, None, True, False], rx=<param.reactive.reactive_ops object at 0x170aaf7d0>)

Whether and where to display the xaxis, supported options are ‘bottom’, ‘top’ and None.

yaxis = param.Selector(allow_refs=False, default=True, label=’Yaxis’, names={}, nested_refs=False, objects=[‘left’, ‘right’, None, True, False], rx=<param.reactive.reactive_ops object at 0x170aaf850>)

Whether and where to display the yaxis, supported options are ‘left’, ‘right’ and None.

xrotation = param.Integer(allow_refs=False, bounds=(0, 360), default=0, inclusive_bounds=(True, True), label=’Xrotation’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b50590>)

Rotation angle of the xticks.

yrotation = param.Integer(allow_refs=False, bounds=(0, 360), default=0, inclusive_bounds=(True, True), label=’Yrotation’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b50490>)

Rotation angle of the yticks.

plot_size = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘tuple’>), default=120, label=’Plot size’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b43890>)

Defines the width and height of each plot in the grid, either as a tuple specifying width and height or an integer for a square plot.

sync_legends = param.Boolean(allow_refs=False, default=True, label=’Sync legends’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170b47b90>)

Whether to sync the legend when muted/unmuted based on the name

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

initialize_plot(ranges=None, plots=None)[source]#

Initialize the matplotlib figure.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

class holoviews.plotting.bokeh.plot.LayoutPlot(layout, keys=None, **params)[source]#

Bases: CompositePlot, GenericLayoutPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericLayoutPlot: transpose

holoviews.plotting.bokeh.plot.BokehPlot: title, title_format, toolbar, width, height

holoviews.plotting.bokeh.plot.CompositePlot: fontsize, sizing_mode

shared_datasource = param.Boolean(allow_refs=False, default=False, label=’Shared datasource’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170cca050>)

Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.

shared_axes = param.Boolean(allow_refs=False, default=True, label=’Shared axes’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170ccb790>)

Whether axes should be shared across plots

merge_tools = param.Boolean(allow_refs=False, default=True, label=’Merge tools’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170cca050>)

Whether to merge all the tools into a single toolbar

sync_legends = param.Boolean(allow_refs=False, default=True, label=’Sync legends’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170ccb710>)

Whether to sync the legend when muted/unmuted based on the name

show_legends = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘list’>, <class ‘int’>, <class ‘bool’>), label=’Show legends’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170cca0d0>)

Whether to show the legend for a particular subplot by index. If True all legends will be shown. If False no legends will be shown.

legend_position = param.Selector(allow_refs=False, default=’top_right’, label=’Legend position’, names={}, nested_refs=False, objects=[‘top_right’, ‘top_left’, ‘bottom_left’, ‘bottom_right’, ‘right’, ‘left’, ‘top’, ‘bottom’], rx=<param.reactive.reactive_ops object at 0x170ccbcd0>)

Allows selecting between a number of predefined legend position options. Will only be applied if show_legend is not None.

tabs = param.Boolean(allow_refs=False, default=False, label=’Tabs’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170ccb990>)

Whether to display overlaid plots in separate panes

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

initialize_plot(plots=None, ranges=None)[source]#

Initialize the matplotlib figure.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.


raster Module#

class holoviews.plotting.bokeh.raster.HSVPlot(hmap, **params)[source]#

Bases: RGBPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.raster.RGBPlot: padding

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.raster.ImageStackPlot(*args, **kwargs)[source]#

Bases: RasterPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, colorbar, colorbar_position, colorbar_opts, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.raster.RasterPlot: padding, show_legend, clipping_colors, nodata

cnorm = param.Selector(allow_refs=False, default=’eq_hist’, label=’Cnorm’, names={}, nested_refs=False, objects=[‘linear’, ‘log’, ‘eq_hist’], rx=<param.reactive.reactive_ops object at 0x170f50c10>)

Color normalization to be applied during colormapping.

start_alpha = param.Integer(allow_refs=False, bounds=(0, 255), default=0, inclusive_bounds=(True, True), label=’Start alpha’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170f52750>)

end_alpha = param.Integer(allow_refs=False, bounds=(0, 255), default=255, inclusive_bounds=(True, True), label=’End alpha’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170f52b50>)

num_colors = param.Integer(allow_refs=False, default=10, inclusive_bounds=(True, True), label=’Num colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170f52750>)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.raster.QuadMeshPlot(element, plot=None, **params)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, cticks, logz, rescale_discrete_levels, symmetric

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=0, label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170fafed0>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170fb14d0>)

Whether to show legend for the plot.

clipping_colors = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={‘NaN’: ‘transparent’}, label=’Clipping colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170fafed0>)

Dictionary to specify colors for clipped values, allows setting color for NaN values and for values above and below the min and max value. The min, max or NaN color may specify an RGB(A) color as a color hex string of the form #FFFFFF or #FFFFFFFF or a length 3 or length 4 tuple specifying values in the range 0-1 or a named HTML color.

nodata = param.Integer(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Nodata’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170fb19d0>)

Optional missing-data value for integer data. If non-None, data with this value will be replaced with NaN so that it is transparent (by default) when plotted.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.raster.RGBPlot(hmap, **params)[source]#

Bases: LegendPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=0, label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171025910>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.raster.RasterPlot(*args, **kwargs)[source]#

Bases: ColorbarPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, cticks, logz, rescale_discrete_levels, symmetric

padding = param.ClassSelector(allow_refs=False, class_=(<class ‘int’>, <class ‘float’>, <class ‘tuple’>), default=0, label=’Padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1710b2310>)

Fraction by which to increase auto-ranged extents to make datapoints more visible around borders. To compute padding, the axis whose screen size is largest is chosen, and the range of that axis is increased by the specified fraction along each axis. Other axes are then padded ensuring that the amount of screen space devoted to padding is equal for all axes. If specified as a tuple, the int or float values in the tuple will be used for padding in each axis, in order (x,y or x,y,z). For example, for padding=0.2 on a 800x800-pixel plot, an x-axis with the range [0,10] will be padded by 20% to be [-1,11], while a y-axis with a range [0,1000] will be padded to be [-100,1100], which should make the padding be approximately the same number of pixels. But if the same plot is changed to have a height of only 200, the y-range will then be [-400,1400] so that the y-axis padding will still match that of the x-axis. It is also possible to declare non-equal padding value for the lower and upper bound of an axis by supplying nested tuples, e.g. padding=(0.1, (0, 0.1)) will pad the x-axis lower and upper bound as well as the y-axis upper bound by a fraction of 0.1 while the y-axis lower bound is not padded at all.

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1710b3a10>)

Whether to show legend for the plot.

clipping_colors = param.Dict(allow_refs=False, class_=<class ‘dict’>, default={‘NaN’: ‘transparent’}, label=’Clipping colors’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1710b2250>)

Dictionary to specify colors for clipped values, allows setting color for NaN values and for values above and below the min and max value. The min, max or NaN color may specify an RGB(A) color as a color hex string of the form #FFFFFF or #FFFFFFFF or a length 3 or length 4 tuple specifying values in the range 0-1 or a named HTML color.

nodata = param.Integer(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Nodata’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1710b3f10>)

Optional missing-data value for integer data. If non-None, data with this value will be replaced with NaN so that it is transparent (by default) when plotted.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


renderer Module#

class holoviews.plotting.bokeh.renderer.BokehRenderer(*, theme, webgl, backend, center, css, dpi, fig, fps, holomap, mode, post_render_hooks, size, widget_location, widget_mode, info_fn, key_fn, name)[source]#

Bases: Renderer

Parameters inherited from:

holoviews.plotting.renderer.Renderer: key_fn, info_fn, center, dpi, fps, mode, size, widget_location, widget_mode, css, post_render_hooks

backend = param.String(allow_refs=False, default=’bokeh’, label=’Backend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1713a9310>)

The backend name.

fig = param.Selector(allow_refs=False, default=’auto’, label=’Fig’, names={}, nested_refs=False, objects=[‘html’, ‘json’, ‘auto’, ‘png’], rx=<param.reactive.reactive_ops object at 0x1713aacd0>)

Output render format for static figures. If None, no figure rendering will occur.

holomap = param.Selector(allow_refs=False, default=’auto’, label=’Holomap’, names={}, nested_refs=False, objects=[‘widgets’, ‘scrubber’, None, ‘gif’, ‘auto’], rx=<param.reactive.reactive_ops object at 0x17139b590>)

Output render multi-frame (typically animated) format. If None, no multi-frame rendering will occur.

theme = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘bokeh.themes.theme.Theme’>, <class ‘str’>), default=<bokeh.themes.theme.Theme object at 0x16daaa890>, label=’Theme’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1712f6150>)

The applicable Bokeh Theme object (if any).

webgl = param.Boolean(allow_refs=False, default=True, label=’Webgl’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1712f6cd0>)

Whether to render plots with WebGL if available

classmethod app(plot, show=False, new_window=False, websocket_origin=None, port=0)[source]#

Creates a bokeh app from a HoloViews object or plot. By default simply attaches the plot to bokeh’s curdoc and returns the Document, if show option is supplied creates an Application instance and displays it either in a browser window or inline if notebook extension has been loaded. Using the new_window option the app may be displayed in a new browser tab once the notebook extension has been loaded. A websocket origin is required when launching from an existing tornado server (such as the notebook) and it is not on the default port (‘localhost:8888’).

comm_manager[source]#

alias of CommManager

components(obj, fmt=None, comm=True, **kwargs)[source]#

Returns data and metadata dictionaries containing HTML and JS components to include render in app, notebook, or standalone document.

classmethod encode(entry)[source]#

Classmethod that applies conditional encoding based on mime-type. Given an entry as returned by __call__ return the data in the appropriate encoding.

classmethod export_widgets(obj, filename, fmt=None, template=None, json=False, json_path='', **kwargs)[source]#

Render and export object as a widget to a static HTML file. Allows supplying a custom template formatting string with fields to interpolate ‘js’, ‘css’ and the main ‘html’ containing the widget. Also provides options to export widget data to a json file in the supplied json_path (defaults to current path).

get_plot(obj, doc=None, renderer=None, **kwargs)[source]#

Given a HoloViews Viewable return a corresponding plot instance. Allows supplying a document attach the plot to, useful when combining the bokeh model with another plot.

classmethod get_plot_state(obj, renderer=None, **kwargs)[source]#

Given a HoloViews Viewable return a corresponding plot state.

get_size(plot)[source]#

Return the display size associated with a plot before rendering to any particular format. Used to generate appropriate HTML display.

Returns a tuple of (width, height) in pixels.

html(obj, fmt=None, css=None, resources='CDN', **kwargs)[source]#

Renders plot or data structure and wraps the output in HTML. The comm argument defines whether the HTML output includes code to initialize a Comm, if the plot supplies one.

classmethod instance(**params)[source]#

Return an instance of this class, copying parameters from any existing instance provided.

classmethod load_nb(inline=True)[source]#

Loads any resources required for display of plots in the Jupyter notebook

classmethod plot_options(obj, percent_size)[source]#

Given a holoviews object and a percentage size, apply heuristics to compute a suitable figure size. For instance, scaling layouts and grids linearly can result in unwieldy figure sizes when there are a large number of elements. As ad hoc heuristics are used, this functionality is kept separate from the plotting classes themselves.

Used by the IPython Notebook display hooks and the save utility. Note that this can be overridden explicitly per object using the fig_size and size plot options.

classmethod plotting_class(obj)[source]#

Given an object or Element class, return the suitable plotting class needed to render it with the current renderer.

classmethod save(obj, basename, fmt='auto', key=None, info=None, options=None, resources='inline', title=None, **kwargs)[source]#

Save a HoloViews object to file, either using an explicitly supplied format or to the appropriate default.

classmethod server_doc(obj, doc=None)[source]#

Get a bokeh Document with the plot attached. May supply an existing doc, otherwise bokeh.io.curdoc() is used to attach the plot to the global document instance.

classmethod state()[source]#

Context manager to handle global state for a backend, allowing Plot classes to temporarily override that state.

static_html(obj, fmt=None, template=None)[source]#

Generates a static HTML with the rendered object in the supplied format. Allows supplying a template formatting string with fields to interpolate ‘js’, ‘css’ and the main ‘html’.

classmethod validate(options)[source]#

Validate an options dictionary for the renderer.


sankey Module#

class holoviews.plotting.bokeh.sankey.SankeyPlot(element, plot=None, **params)[source]#

Bases: GraphPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.graphs.GraphPlot: tools, arrowhead_length, directed, selection_policy, inspection_policy, edge_color_index

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17148a710>)

Whether to show the values.

width = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), default=1000, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1714b9690>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

height = param.Integer(allow_None=True, allow_refs=False, bounds=(0, None), default=600, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1714b9d10>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), default=2, label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1714b8e50>)

Index of the dimension from which the node labels will be drawn

labels = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘holoviews.util.transform.dim’>), label=’Labels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17148a690>)

The dimension or dimension value transform used to draw labels from.

label_position = param.Selector(allow_refs=False, default=’right’, label=’Label position’, names={}, nested_refs=False, objects=[‘left’, ‘right’, ‘outer’, ‘inner’], rx=<param.reactive.reactive_ops object at 0x1714b8dd0>)

Whether node labels should be placed to the left, right, outer or inner.

show_values = param.Boolean(allow_refs=False, default=True, label=’Show values’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171489f50>)

Whether to show the values.

node_width = param.Number(allow_refs=False, default=15, inclusive_bounds=(True, True), label=’Node width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170e822d0>)

Width of the nodes.

node_padding = param.Integer(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Node padding’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1714b8d50>)

Number of pixels of padding relative to the bounds.

iterations = param.Integer(allow_refs=False, default=32, inclusive_bounds=(True, True), label=’Iterations’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1714b8890>)

Number of iterations to run the layout algorithm.

node_sort = param.Boolean(allow_refs=False, default=True, label=’Node sort’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171489f50>)

Sort nodes in ascending breadth.

label_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), default=2, label=’Label index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170e822d0>)

Index of the dimension from which the node labels will be drawn

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Return the extents of the Sankey box

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


selection Module#

class holoviews.plotting.bokeh.selection.BokehOverlaySelectionDisplay(color_prop='color', is_cmap=False, supports_region=True)[source]#

Bases: OverlaySelectionDisplay

Overlay selection display subclass for use with bokeh backend

class holoviews.plotting.bokeh.selection.TabularSelectionDisplay[source]#

Bases: SelectionDisplay


stats Module#

class holoviews.plotting.bokeh.stats.BivariatePlot(*args, **params)[source]#

Bases: PolygonPlot

Bivariate plot visualizes two-dimensional kernel density estimates. Additionally, by enabling the joint option, the marginals distributions can be plotted alongside each axis (does not animate or compose).

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.path.ContourPlot: show_legend, selected, color_index

bandwidth = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Bandwidth’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17164dbd0>)

The bandwidth of the kernel for the density estimate.

cut = param.Number(allow_refs=False, default=3, inclusive_bounds=(True, True), label=’Cut’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171629e50>)

Draw the estimate to cut * bw from the extreme data points.

filled = param.Boolean(allow_refs=False, default=False, label=’Filled’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171629650>)

Whether the bivariate contours should be filled.

levels = param.ClassSelector(allow_refs=False, class_=(<class ‘list’>, <class ‘int’>), default=10, label=’Levels’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x171628c10>)

A list of scalar values used to specify the contour levels.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.stats.BoxWhiskerPlot(element, plot=None, **params)[source]#

Bases: MultiDistributionMixin, CompositeElementPlot, ColorbarPlot, LegendPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

show_legend = param.Boolean(allow_refs=False, default=False, label=’Show legend’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1716a5890>)

Whether to show legend for the plot.

outlier_radius = param.Number(allow_refs=False, default=0.01, inclusive_bounds=(True, True), label=’Outlier radius’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1716a7490>)

The radius of the circle marker for the outliers.

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1716a5990>)

Deprecated in favor of color style mapping, e.g. box_color=dim(‘color’)

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.stats.DistributionPlot(element, plot=None, **params)[source]#

Bases: AreaPlot

DistributionPlot visualizes a distribution of values as a KDE.

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.chart.AreaPlot: padding

bandwidth = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Bandwidth’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17173f2d0>)

The bandwidth of the kernel for the density estimate.

cut = param.Number(allow_refs=False, default=3, inclusive_bounds=(True, True), label=’Cut’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717050d0>)

Draw the estimate to cut * bw from the extreme data points.

filled = param.Boolean(allow_refs=False, default=True, label=’Filled’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x17173d010>)

Whether the bivariate contours should be filled.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.

class holoviews.plotting.bokeh.stats.ViolinPlot(element, plot=None, **params)[source]#

Bases: BoxWhiskerPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

holoviews.plotting.bokeh.element.LegendPlot: legend_cols, legend_labels, legend_muted, legend_offset, legend_position, legend_opts

holoviews.plotting.bokeh.element.ColorbarPlot: color_levels, cformatter, clabel, clim, clim_percentile, cnorm, colorbar, colorbar_position, colorbar_opts, clipping_colors, cticks, logz, rescale_discrete_levels, symmetric

holoviews.plotting.bokeh.stats.BoxWhiskerPlot: show_legend, outlier_radius

color_index = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘int’>), label=’Color index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a4b10>)

Deprecated in favor of color style mapping, e.g. violin_color=dim(‘color’)

bandwidth = param.Number(allow_None=True, allow_refs=False, inclusive_bounds=(True, True), label=’Bandwidth’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a6710>)

Allows supplying explicit bandwidth value rather than relying on scott or silverman method.

clip = param.NumericTuple(allow_None=True, allow_refs=False, label=’Clip’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a4710>)

A tuple of a lower and upper bound to clip the violin at.

cut = param.Number(allow_refs=False, default=5, inclusive_bounds=(True, True), label=’Cut’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a6650>)

Draw the estimate to cut * bw from the extreme data points.

inner = param.Selector(allow_refs=False, default=’box’, label=’Inner’, names={}, nested_refs=False, objects=[‘box’, ‘quartiles’, ‘stick’, None], rx=<param.reactive.reactive_ops object at 0x1717a4a90>)

Inner visual indicator for distribution values: * box - A small box plot * stick - Lines indicating each sample value * quartiles - Indicates first, second and third quartiles

split = param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘str’>, <class ‘holoviews.util.transform.dim’>), label=’Split’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a5f50>)

The dimension to split the Violin on.

violin_width = param.Number(allow_refs=False, default=0.8, inclusive_bounds=(True, True), label=’Violin width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1717a63d0>)

Relative width of the violin

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


styles Module#

Defines valid style options, validation and utilities

holoviews.plotting.bokeh.styles.expand_batched_style(style, opts, mapping, nvals)[source]#

Computes styles applied to a batched plot by iterating over the supplied list of style options and expanding any options found in the supplied style dictionary returning a data and mapping defining the data that should be added to the ColumnDataSource.

holoviews.plotting.bokeh.styles.mpl_to_bokeh(properties)[source]#

Utility to process style properties converting any matplotlib specific options to their nearest bokeh equivalent.

holoviews.plotting.bokeh.styles.rgba_tuple(rgba)[source]#

Ensures RGB(A) tuples in the range 0-1 are scaled to 0-255.

holoviews.plotting.bokeh.styles.validate(style, value, scalar=False)[source]#

Validates a style and associated value.

Arguments#

style: str

The style to validate (e.g. ‘color’, ‘size’ or ‘marker’)

value:

The style value to validate

scalar: bool

Returns#

valid: boolean or None

If validation is supported returns boolean, otherwise None


tabular Module#

class holoviews.plotting.bokeh.tabular.TablePlot(element, plot=None, **params)[source]#

Bases: BokehPlot, GenericElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontsize, fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation, xticks, yticks

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format, toolbar

hooks = param.HookList(allow_refs=False, bounds=(0, None), default=[], label=’Hooks’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x170d50f10>)

Optional list of hooks called when finalizing a plot. The hook is passed the plot object and the displayed element, and other plotting handles can be accessed via plot.handles.

width = param.Number(allow_refs=False, bounds=(0, None), default=400, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1719fe750>)

The width of the component (in pixels). This can be either fixed or preferred width, depending on width sizing policy.

height = param.Number(allow_refs=False, bounds=(0, None), default=300, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1719fc550>)

The height of the component (in pixels). This can be either fixed or preferred height, depending on height sizing policy.

selected = param.List(allow_None=True, allow_refs=False, bounds=(0, None), label=’Selected’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x1719f47d0>)

The current selection as a list of integers corresponding to the selected items.

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

get_aspect(xspan, yspan)[source]#

Should define the aspect ratio of the plot.

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', dimension=None, xdim=None, ydim=None, zdim=None, lims_as_soft_ranges=False, **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = <holoviews.plotting.bokeh.selection.TabularSelectionDisplay object>#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(key, ranges=None, plot=None)[source]#

Updates an existing plot with data corresponding to the key.


tiles Module#

class holoviews.plotting.bokeh.tiles.TilePlot(element, plot=None, **params)[source]#

Bases: ElementPlot

Parameters inherited from:

holoviews.plotting.plot.DimensionedPlot: fontscale, show_title, normalize, projection

holoviews.plotting.plot.GenericElementPlot: apply_ranges, apply_extents, bgcolor, default_span, hooks, invert_axes, invert_xaxis, invert_yaxis, logx, logy, padding, show_legend, show_grid, xaxis, yaxis, xlabel, ylabel, xlim, ylim, zlim, xrotation, yrotation

holoviews.plotting.bokeh.plot.BokehPlot: title, shared_datasource, title_format

holoviews.plotting.bokeh.element.ElementPlot: fontsize, xticks, yticks, toolbar, width, height, active_tools, align, apply_hard_bounds, autorange, border, aspect, backend_opts, data_aspect, frame_width, frame_height, min_width, min_height, max_width, max_height, margin, multi_y, scalebar, scalebar_range, scalebar_unit, scalebar_location, scalebar_label, scalebar_tool, scalebar_opts, subcoordinate_y, subcoordinate_scale, responsive, gridstyle, labelled, lod, show_frame, shared_axes, default_tools, tools, hover_tooltips, hover_formatters, hover_mode, xformatter, yformatter

cleanup()[source]#

Cleans up references to the plot after the plot has been deleted. Traverses through all plots cleaning up Callbacks and Stream subscribers.

compute_ranges(obj, key, ranges)[source]#

Given an object, a specific key, and the normalization options, this method will find the specified normalization options on the appropriate OptionTree, group the elements according to the selected normalization option (i.e. either per frame or over the whole animation) and finally compute the dimension ranges in each group. The new set of ranges is returned.

property current_handles#

Should return a list of plot objects that have changed and should be updated.

property framewise#

Property to determine whether the current frame should have framewise normalization enabled. Required for bokeh plotting classes to determine whether to send updated ranges for each frame.

get_aspect(xspan, yspan)[source]#

Computes the aspect ratio of the plot

get_data(element, ranges, style)[source]#

Returns the data from an element in the appropriate format for initializing or updating a ColumnDataSource and a dictionary which maps the expected keywords arguments of a glyph to the column in the datasource.

get_extents(element, ranges, range_type='combined', **kwargs)[source]#

Gets the extents for the axes from the current Element. The globally computed ranges can optionally override the extents.

The extents are computed by combining the data ranges, extents and dimension ranges. Each of these can be obtained individually by setting the range_type to one of:

  • ‘data’: Just the data ranges

  • ‘extents’: Element.extents

  • ‘soft’: Dimension.soft_range values

  • ‘hard’: Dimension.range values

To obtain the combined range, which includes range padding the default may be used:

  • ‘combined’: All the range types combined and padding applied

This allows Overlay plots to obtain each range and combine them appropriately for all the objects in the overlay.

If lims_as_soft_ranges is set to True, the xlim and ylim will be treated as soft ranges instead of the default case as hard ranges while computing the extents. This is used e.g. when apply_hard_bounds is True and xlim/ylim is set, in which case we limit the initial viewable range to xlim/ylim, but allow navigation up to the abs max between the data range and xlim/ylim.

get_padding(obj, extents)[source]#

Computes padding along the axes taking into account the plot aspect.

get_zorder(overlay, key, el)[source]#

Computes the z-order of element in the NdOverlay taking into account possible batching of elements.

initialize_plot(ranges=None, plot=None, plots=None, source=None)[source]#

Initializes a new plot object with the last available frame.

Returns potential Link or Stream sources.

matches(spec)[source]#

Matches a specification against the current Plot.

model_changed(model)[source]#

Determines if the bokeh model was just changed on the frontend. Useful to suppress boomeranging events, e.g. when the frontend just sent an update to the x_range this should not trigger an update on the backend.

push()[source]#

Pushes plot updates to the frontend.

refresh(**kwargs)[source]#

Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.

selection_display = None#
set_root(root)[source]#

Sets the root model on all subplots.

property state#

The plotting state that gets updated via the update method and used by the renderer to generate output.

sync_sources()[source]#

Syncs data sources between Elements, which draw data from the same object.

traverse(fn=None, specs=None, full_breadth=True)[source]#

Traverses any nested DimensionedPlot returning a list of all plots that match the specs. The specs should be supplied as a list of either Plot types or callables, which should return a boolean given the plot class.

update(key)[source]#

Update the internal state of the Plot to represent the given key tuple (where integers represent frames). Returns this state.

update_frame(*args, **kwargs)[source]#

Set the plot(s) to the given frame number. Operates by manipulating the matplotlib objects held in the self._handles dictionary.

If n is greater than the number of available frames, update using the last available frame.


util Module#

holoviews.plotting.bokeh.util.attach_periodic(plot)[source]#

Attaches plot refresh to all streams on the object.

holoviews.plotting.bokeh.util.categorize_array(array, dim)[source]#

Uses a Dimension instance to convert an array of values to categorical (i.e. string) values and applies escaping for colons, which bokeh treats as a categorical suffix.

holoviews.plotting.bokeh.util.cds_column_replace(source, data)[source]#

Determine if the CDS.data requires a full replacement or simply needs to be updated. A replacement is required if untouched columns are not the same length as the columns being updated.

holoviews.plotting.bokeh.util.colormesh(X, Y)[source]#

Generates line paths for a quadmesh given 2D arrays of X and Y coordinates.

holoviews.plotting.bokeh.util.compute_layout_properties(width, height, frame_width, frame_height, explicit_width, explicit_height, aspect, data_aspect, responsive, size_multiplier, logger=None)[source]#

Utility to compute the aspect, plot width/height and sizing_mode behavior.

Args:

width (int): Plot width height (int): Plot height frame_width (int): Plot frame width frame_height (int): Plot frame height explicit_width (list): List of user supplied widths explicit_height (list): List of user supplied heights aspect (float): Plot aspect data_aspect (float): Scaling between x-axis and y-axis ranges responsive (boolean): Whether the plot should resize responsively size_multiplier (float): Multiplier for supplied plot dimensions logger (param.Parameters): Parameters object to issue warnings on

Returns:

Returns two dictionaries one for the aspect and sizing modes, and another for the plot dimensions.

holoviews.plotting.bokeh.util.compute_plot_size(plot)[source]#

Computes the size of bokeh models that make up a layout such as figures, rows, columns, and Plot.

holoviews.plotting.bokeh.util.convert_timestamp(timestamp)[source]#

Converts bokehJS timestamp to datetime64.

holoviews.plotting.bokeh.util.date_to_integer(date)[source]#

Converts support date types to milliseconds since epoch

Attempts highest precision conversion of different datetime formats to milliseconds since the epoch (1970-01-01 00:00:00). If datetime is a cftime with a non-standard calendar the caveats described in hv.core.util.cftime_to_timestamp apply.

Args:

date: Date- or datetime-like object

Returns:

Milliseconds since 1970-01-01 00:00:00

holoviews.plotting.bokeh.util.decode_bytes(array)[source]#

Decodes an array, list or tuple of bytestrings to avoid python 3 bokeh serialization errors

holoviews.plotting.bokeh.util.empty_plot(width, height)[source]#

Creates an empty and invisible plot of the specified size.

holoviews.plotting.bokeh.util.filter_batched_data(data, mapping)[source]#

Iterates over the data and mapping for a ColumnDataSource and replaces columns with repeating values with a scalar. This is purely and optimization for scalar types.

holoviews.plotting.bokeh.util.filter_toolboxes(plots)[source]#

Filters out toolboxes out of a list of plots to be able to compose them into a larger plot.

holoviews.plotting.bokeh.util.font_size_to_pixels(size)[source]#

Convert a fontsize to a pixel value

holoviews.plotting.bokeh.util.get_default(model, name, theme=None)[source]#

Looks up the default value for a bokeh model property.

holoviews.plotting.bokeh.util.get_tab_title(key, frame, overlay)[source]#

Computes a title for bokeh tabs from the key in the overlay, the element and the containing (Nd)Overlay.

holoviews.plotting.bokeh.util.glyph_order(keys, draw_order=None)[source]#

Orders a set of glyph handles using regular sort and an explicit sort order. The explicit draw order must take the form of a list of glyph names while the keys should be glyph names with a custom suffix. The draw order may only match subset of the keys and any matched items will take precedence over other entries.

holoviews.plotting.bokeh.util.hold_policy(document, policy, server=False)[source]#

Context manager to temporary override the hold policy.

holoviews.plotting.bokeh.util.hold_render(f)[source]#

Decorator that will hold render on a Bokeh ElementPlot until after the method has been called.

holoviews.plotting.bokeh.util.hsv_to_rgb(hsv)[source]#

Vectorized HSV to RGB conversion, adapted from: http://stackoverflow.com/questions/24852345/hsv-to-rgb-color-conversion

holoviews.plotting.bokeh.util.layout_padding(plots, renderer)[source]#

Pads Nones in a list of lists of plots with empty plots.

holoviews.plotting.bokeh.util.match_ax_type(ax, range_type)[source]#

Ensure the range_type matches the axis model being matched.

holoviews.plotting.bokeh.util.match_dim_specs(specs1, specs2)[source]#

Matches dimension specs used to link axes.

Axis dimension specs consists of a list of tuples corresponding to each dimension, each tuple spec has the form (name, label, unit). The name and label must match exactly while the unit only has to match if both specs define one.

holoviews.plotting.bokeh.util.match_yaxis_type_to_range(yax, range_type, range_name)[source]#

Apply match_ax_type to the y-axis found by the given range name

holoviews.plotting.bokeh.util.merge_tools(plot_grid, *, disambiguation_properties=None, hide_toolbar=False)[source]#

Merges tools defined on a grid of plots into a single toolbar. All tools of the same type are merged unless they define one of the disambiguation properties. By default name, icon, tags and description can be used to prevent tools from being merged.

holoviews.plotting.bokeh.util.multi_polygons_data(element)[source]#

Expands polygon data which contains holes to a bokeh multi_polygons representation. Multi-polygons split by nans are expanded and the correct list of holes is assigned to each sub-polygon.

holoviews.plotting.bokeh.util.pad_plots(plots)[source]#

Accepts a grid of bokeh plots in form of a list of lists and wraps any DataTable or Tabs in a Column with appropriate padding. Required to avoid overlap in gridplot.

holoviews.plotting.bokeh.util.pad_width(model, table_padding=0.85, tabs_padding=1.2)[source]#

Computes the width of a model and sets up appropriate padding for Tabs and DataTable types.

class holoviews.plotting.bokeh.util.periodic(document)[source]#

Bases: object

Mocks the API of periodic Thread in hv.core.util, allowing a smooth API transition on bokeh server.

holoviews.plotting.bokeh.util.prop_is_none(value)[source]#

Checks if property value is None.

holoviews.plotting.bokeh.util.property_to_dict(x)[source]#

Convert Bokeh’s property Field and Value to a dictionary

holoviews.plotting.bokeh.util.recursive_model_update(model, props)[source]#

Recursively updates attributes on a model including other models. If the type of the new model matches the old model properties are simply updated, otherwise the model is replaced.

holoviews.plotting.bokeh.util.remove_legend(plot, legend)[source]#

Removes a legend from a bokeh plot.

holoviews.plotting.bokeh.util.select_legends(holoviews_layout, figure_index=None, legend_position='top_right')[source]#

Only displays selected legends in plot layout.

Parameters#

holoviews_layoutHoloviews Layout

Holoviews Layout with legends.

figure_indexlist[int] | bool | int | None

Index of the figures which legends to show. If None is chosen, only the first figures legend is shown If True is chosen, all legends are shown.

legend_positionstr

Position of the legend(s).

holoviews.plotting.bokeh.util.silence_warnings(*warnings)[source]#

Context manager for silencing bokeh validation warnings.

holoviews.plotting.bokeh.util.sync_legends(bokeh_layout)[source]#

This syncs the legends of all plots in a grid based on their name.

Parameters#

bokeh_layoutbokeh.models.{GridPlot, Row, Column}

Gridplot to sync legends of.

holoviews.plotting.bokeh.util.update_shared_sources(f)[source]#

Context manager to ensures data sources shared between multiple plots are cleared and updated appropriately avoiding warnings and allowing empty frames on subplots. Expects a list of shared_sources and a mapping of the columns expected columns for each source in the plots handles.

holoviews.plotting.bokeh.util.wrap_formatter(formatter, axis)[source]#

Wraps formatting function or string in appropriate bokeh formatter type.