holoviews.plotting.bokeh.plot module#

class holoviews.plotting.bokeh.plot.AdjointLayoutPlot(layout, layout_type, subplots, **params)[source]#

Bases: BokehPlot, GenericAdjointLayoutPlot

Parameter Definitions


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

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.

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.

Parameter Definitions


Parameters inherited from:

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

title = String(default='{label} {group} {dimensions}', label='Title')

The formatting string for the title of this plot, allows defining a label group separator and dimension labels.

shared_datasource = Boolean(default=True, label='Shared datasource')

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 = String(allow_None=True, label='Title format')

Alias for title.

toolbar = Selector(default='above', label='Toolbar', names={}, objects=['above', 'below', 'left', 'right', None])

The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.

width = Integer(allow_None=True, bounds=(0, None), inclusive_bounds=(True, True), label='Width')

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

height = Integer(allow_None=True, bounds=(0, None), inclusive_bounds=(True, True), label='Height')

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.

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.

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.

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.

Parameter Definitions


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 = Parameter(allow_None=True, default={'title': '15pt'}, label='Fontsize')

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 = Selector(label='Sizing mode', names={}, objects=['fixed', 'stretch_width', 'stretch_height', 'stretch_both', 'scale_width', 'scale_height', 'scale_both', None])

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.

property current_handles#

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

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.

Parameter Definitions


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 = Parameter(allow_None=True, default={'title': '16pt'}, label='Fontsize')

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 = Integer(default=50, inclusive_bounds=(True, True), label='Axis offset')

Number of pixels to adjust row and column widths and height by to compensate for shared axes.

merge_tools = Boolean(default=True, label='Merge tools')

Whether to merge all the tools into a single toolbar

shared_xaxis = Boolean(default=False, label='Shared xaxis')

If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.

shared_yaxis = Boolean(default=False, label='Shared yaxis')

If enabled the x-axes of the GridSpace will be drawn from the objects inside the Grid rather than the GridSpace dimensions.

show_legend = Boolean(default=False, label='Show legend')

Adds a legend based on the entries of the middle-right plot

xaxis = Selector(default=True, label='Xaxis', names={}, objects=['bottom', 'top', None, True, False])

Whether and where to display the xaxis, supported options are ‘bottom’, ‘top’ and None.

yaxis = Selector(default=True, label='Yaxis', names={}, objects=['left', 'right', None, True, False])

Whether and where to display the yaxis, supported options are ‘left’, ‘right’ and None.

xrotation = Integer(bounds=(0, 360), default=0, inclusive_bounds=(True, True), label='Xrotation')

Rotation angle of the xticks.

yrotation = Integer(bounds=(0, 360), default=0, inclusive_bounds=(True, True), label='Yrotation')

Rotation angle of the yticks.

plot_size = ClassSelector(class_=(<class 'int'>, <class 'tuple'>), default=120, label='Plot size')

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 = Boolean(default=True, label='Sync legends')

Whether to sync the legend when muted/unmuted based on the name

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

Initialize the matplotlib figure.

class holoviews.plotting.bokeh.plot.LayoutPlot(layout, keys=None, **params)[source]#

Bases: CompositePlot, GenericLayoutPlot

Parameter Definitions


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 = Boolean(default=False, label='Shared datasource')

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 = Boolean(default=True, label='Shared axes')

Whether axes should be shared across plots

merge_tools = Boolean(default=True, label='Merge tools')

Whether to merge all the tools into a single toolbar

sync_legends = Boolean(default=True, label='Sync legends')

Whether to sync the legend when muted/unmuted based on the name

show_legends = ClassSelector(allow_None=True, class_=(<class 'list'>, <class 'int'>, <class 'bool'>), label='Show legends')

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 = Selector(default='top_right', label='Legend position', names={}, objects=['top_right', 'top_left', 'bottom_left', 'bottom_right', 'right', 'left', 'top', 'bottom'])

Allows selecting between a number of predefined legend position options. Will only be applied if show_legend is not None.

tabs = Boolean(default=False, label='Tabs')

Whether to display overlaid plots in separate panes

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

Initialize the matplotlib figure.