holoviews.bokeh Package ¶
bokeh
Package
¶
annotation
Module
¶
-
class
holoviews.plotting.bokeh.annotation.
SplinePlot
( element , plot=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.element.ElementPlot
Draw the supplied Spline annotation (see Spline docstring). Does not support matplotlib Path codes.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param List
default_tools
( allow_None=False, bounds=(0, None), constant=False, default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
param HookList
finalize_hooks
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Optional list of hooks called when finalizing an axis. The hook is passed the plot object and the displayed object, other plotting handles can be accessed via plot.handles.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the x- and y-axis
-
param Number
border
( allow_None=False, bounds=None, constant=False, default=10, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Minimum border around plot.
-
param Boolean
shared_axes
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the share axes across plots for linked panning and zooming.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply extent overrides on the Elements
-
param Dict
lod
( allow_None=False, constant=False, default={‘threshold’: 2000, ‘interval’: 300, ‘timeout’: 500, ‘factor’: 10}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Bokeh plots offer “Level of Detail” (LOD) capability to accomodate 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.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute the plot bounds from the data itself.
-
param List
tools
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot y-axis.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot x-axis.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Boolean
show_frame
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether or not to show a complete frame around the plot.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the x-axis of the plot will be a log axis.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘12pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’}
-
param List
labelled
( allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether to plot the ‘x’ and ‘y’ labels.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show a Cartesian grid on the plot.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the y-axis of the plot will be a log axis.
-
param ObjectSelector
toolbar
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], pickle_default_value=True, precedence=None, readonly=False ) - The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Parameter
bgcolor
( allow_None=False, constant=False, default=white, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Background color of the plot.
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Returns a list of the plot objects to update.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
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_extents
( view , ranges ) ¶ -
Gets the extents for the axes from the current View. The globally computed ranges can optionally override the extents.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None , plot=None , plots=None , source=None ) ¶ -
Initializes a new plot object with the last available frame.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
model_changed
( model ) ¶ -
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.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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_frame
( key , ranges=None , plot=None , element=None , empty=False ) ¶ -
Updates an existing plot with data corresponding to the key.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Integer
bkcharts
Module
¶
callbacks
Module
¶
-
class
holoviews.plotting.bokeh.callbacks.
BoundsCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the bounds of a box_select tool.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
BoundsXCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the bounds of a xbox_select tool.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
BoundsYCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the bounds of a ybox_select tool.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
Callback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.CustomJSCallback
,holoviews.plotting.bokeh.callbacks.ServerCallback
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:
-
- models : Defines 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.
-
- extra_models: Any additional models available in handles which
-
should be made available in the namespace of the objects, e.g. to make a tool available to skip checks.
-
- attributes : The 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 extra_models attributes 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_data and cb_obj variables available containing additional information about the event.
-
- skip : Conditions when the Callback should be skipped
-
specified as a list of valid JS expressions, which can reference models requested by the callback, e.g. [‘pan.attributes.active’] would skip the callback if the pan tool is active.
-
- code : Defines any additional JS code to be executed,
-
which can modify the data object that is sent to the backend.
-
- on_events : If the Callback should listen to bokeh events this
-
should declare the types of event as a list (optional)
-
- on_changes : If 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.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
CustomJSCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.MessageCallback
The CustomJSCallback attaches CustomJS callbacks to a bokeh plot, which looks up the requested attributes and sends back a message to Python using a Comms instance.
-
classmethod
attributes_js
( attributes ) [source] ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
classmethod
-
class
holoviews.plotting.bokeh.callbacks.
DoubleTapCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x/y-position on doubletap event.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
MessageCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
object
A MessageCallback is an abstract baseclass used to supply Streams with events originating from bokeh plot interactions. The baseclass defines how messages are handled and the basic specification required to define a Callback.
-
class
holoviews.plotting.bokeh.callbacks.
MouseEnterCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x/y-position on mouseenter event, i.e. when mouse enters the plot canvas.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
MouseLeaveCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x/y-position on mouseleave event, i.e. when mouse leaves the plot canvas.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
PlotSizeCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the actual width and height of a plot once the layout solver has executed.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
PointerXCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x-position on mousemove event.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
PointerXYCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the mouse x/y-position on mousemove event.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
PointerYCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x/y-position on mousemove event.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
RangeXCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.RangeXYCallback
Returns the x-axis range of a plot.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
RangeXYCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the x/y-axis ranges of a plot.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
RangeYCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.RangeXYCallback
Returns the y-axis range of a plot.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
Selection1DCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.Callback
Returns the current selection on a ColumnDataSource.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
ServerCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.MessageCallback
Implements methods to set up bokeh server callbacks. A ServerCallback resolves the requested attributes on the Python end and then hands the msg off to the general on_msg handler, which will update the Stream(s) attached to the callback.
-
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.
-
on_event
( event ) [source] ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
-
class
holoviews.plotting.bokeh.callbacks.
SingleTapCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.PointerXYCallback
Returns the mouse x/y-position on tap event.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
-
class
holoviews.plotting.bokeh.callbacks.
TapCallback
( plot , streams , source , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.callbacks.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.
-
attributes_js
( attributes ) ¶ -
Generates JS code to look up attributes on JS objects from an attributes specification dictionary. If the specification references a plotting particular plotting handle it will also generate JS code to get the ID of the object.
Simple example (when referencing cb_data or cb_obj):
Input : {‘x’: ‘cb_data.geometry.x’}
Output : data[‘x’] = cb_data[‘geometry’][‘x’]
Example referencing plot handle:
Input : {‘x0’: ‘x_range.attributes.start’}
- Output : if ((x_range !== undefined)) {
-
data[‘x0’] = {id: x_range[‘id’], value: x_range[‘attributes’][‘start’]}
}
-
get_customjs
( references ) ¶ -
Creates a CustomJS callback that will send the requested attributes back to python.
-
on_change
( attr , old , new ) ¶ -
Process change events adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
on_event
( event ) ¶ -
Process bokeh UIEvents adding timeout to process multiple concerted value change at once rather than firing off multiple plot updates.
-
process_on_event
( ) ¶ -
Trigger callback change event and triggering corresponding streams.
-
resolve_attr_spec
( spec , cb_obj , model=None ) ¶ -
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_customjs_callback
( js_callback , handle ) ¶ -
Generates a CustomJS callback by generating the required JS code and gathering all plotting handles and installs it on the requested callback handle.
-
set_server_callback
( handle ) ¶ -
Set up on_change events for bokeh server interactions.
-
chart
Module
¶
-
class
holoviews.plotting.bokeh.chart.
BarPlot
( element , plot=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.element.ColorbarPlot
,holoviews.plotting.bokeh.element.LegendPlot
BarPlot allows generating single- or multi-category bar Charts, by selecting which key dimensions are mapped onto separate groups, categories and stacks.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param ClassSelector
color_index
( allow_None=True, constant=False, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Index of the dimension from which the color will the drawn
-
param Boolean
logz
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply log scaling to the z-axis.
-
param List
default_tools
( allow_None=False, bounds=(0, None), constant=False, default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param Dict
clipping_colors
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
param HookList
finalize_hooks
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Optional list of hooks called when finalizing an axis. The hook is passed the plot object and the displayed object, other plotting handles can be accessed via plot.handles.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the x- and y-axis
-
param Number
border
( allow_None=False, bounds=None, constant=False, default=10, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Minimum border around plot.
-
param Boolean
shared_axes
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the share axes across plots for linked panning and zooming.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
colorbar
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display a colorbar.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply extent overrides on the Elements
-
param Dict
lod
( allow_None=False, constant=False, default={‘threshold’: 2000, ‘interval’: 300, ‘timeout’: 500, ‘factor’: 10}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Bokeh plots offer “Level of Detail” (LOD) capability to accomodate 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.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute the plot bounds from the data itself.
-
param List
tools
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param ClassSelector
group_index
( allow_None=True, constant=False, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Index of the dimension in the supplied Bars Element, which will be laid out into groups.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot y-axis.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot x-axis.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Boolean
show_frame
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether or not to show a complete frame around the plot.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the x-axis of the plot will be a log axis.
-
param Dict
colorbar_opts
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param ObjectSelector
colorbar_position
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘right’, ‘bottom_right’, ‘bottom’, ‘top’, ‘top_right’, ‘bottom_left’, ‘top_left’, ‘left’], pickle_default_value=True, precedence=None, readonly=False ) - Allows selecting between a number of predefined colorbar position options. The predefined options may be customized in the colorbar_specs class attribute.
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘12pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’}
-
param List
labelled
( allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether to plot the ‘x’ and ‘y’ labels.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show a Cartesian grid on the plot.
-
param ObjectSelector
legend_position
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=top_right, instantiate=False, objects=[‘top_right’, ‘top_left’, ‘bottom_left’, ‘bottom_right’, ‘right’, ‘left’, ‘top’, ‘bottom’], pickle_default_value=True, precedence=None, readonly=False ) - Allows selecting between a number of predefined legend position options. The predefined options may be customized in the legend_specs class attribute.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the y-axis of the plot will be a log axis.
-
param ObjectSelector
toolbar
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], pickle_default_value=True, precedence=None, readonly=False ) - The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Integer
legend_cols
( allow_None=False, bounds=None, constant=False, default=False, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Whether to lay out the legend as columns.
-
param Parameter
bgcolor
( allow_None=False, constant=False, default=white, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Background color of the plot.
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param ClassSelector
stack_index
( allow_None=True, constant=False, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Index of the dimension in the supplied Bars Element, which will stacked.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Returns a list of the plot objects to update.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
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_extents
( element , ranges ) [source] ¶ -
Make adjustments to plot extents by computing stacked bar heights, adjusting the bar baseline and forcing the x-axis to be categorical.
-
get_group
( xvals , nshift , ngroups , width , xdim ) [source] ¶ -
Adjust x-value positions on categorical axes to stop x-axis overlapping. Currently bokeh uses a suffix of the format ‘:%f’ with a floating value to set up offsets within a single category.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_stack
( xvals , yvals , baselines ) [source] ¶ -
Iterates over a x- and y-values in a stack layer and appropriately offsets the layer on top of the previous layer.
-
get_value_generator
= <functools.partial object> ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None , plot=None , plots=None , source=None ) ¶ -
Initializes a new plot object with the last available frame.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
model_changed
( model ) ¶ -
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.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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_frame
( key , ranges=None , plot=None , element=None , empty=False ) ¶ -
Updates an existing plot with data corresponding to the key.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Integer
-
class
holoviews.plotting.bokeh.chart.
SideSpikesPlot
( element , plot=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.chart.SpikesPlot
SpikesPlot with useful defaults for plotting adjoined rug plot.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param ClassSelector
color_index
( allow_None=True, constant=False, default=1, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Index of the dimension from which the color will the drawn
-
param Boolean
logz
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply log scaling to the z-axis.
-
param List
default_tools
( allow_None=False, bounds=(0, None), constant=False, default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=50, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of plot
-
param Dict
clipping_colors
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
param HookList
finalize_hooks
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Optional list of hooks called when finalizing an axis. The hook is passed the plot object and the displayed object, other plotting handles can be accessed via plot.handles.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the x- and y-axis
-
param Integer
border
( allow_None=False, bounds=None, constant=False, default=5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Default borders on plot
-
param Boolean
shared_axes
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the share axes across plots for linked panning and zooming.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
colorbar
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display a colorbar.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply extent overrides on the Elements
-
param Dict
lod
( allow_None=False, constant=False, default={‘threshold’: 2000, ‘interval’: 300, ‘timeout’: 500, ‘factor’: 10}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Bokeh plots offer “Level of Detail” (LOD) capability to accomodate 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.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute the plot bounds from the data itself.
-
param List
tools
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot y-axis.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=50, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of plot
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot x-axis.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=top-bare, instantiate=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Boolean
show_frame
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether or not to show a complete frame around the plot.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the x-axis of the plot will be a log axis.
-
param Dict
colorbar_opts
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param ObjectSelector
colorbar_position
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘right’, ‘bottom_right’, ‘bottom’, ‘top’, ‘top_right’, ‘bottom_left’, ‘top_left’, ‘left’], pickle_default_value=True, precedence=None, readonly=False ) - Allows selecting between a number of predefined colorbar position options. The predefined options may be customized in the colorbar_specs class attribute.
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘12pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’}
-
param List
labelled
( allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether to plot the ‘x’ and ‘y’ labels.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show a Cartesian grid on the plot.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the y-axis of the plot will be a log axis.
-
param ObjectSelector
toolbar
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], pickle_default_value=True, precedence=None, readonly=False ) - The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right-bare, instantiate=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Parameter
bgcolor
( allow_None=False, constant=False, default=white, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Background color of the plot.
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Number
position
( allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - The position of the lower end of each spike.
-
param Number
spike_length
( allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - The length of each spike if Spikes object is one dimensional.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Returns a list of the plot objects to update.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
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_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None , plot=None , plots=None , source=None ) ¶ -
Initializes a new plot object with the last available frame.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
model_changed
( model ) ¶ -
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.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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_frame
( key , ranges=None , plot=None , element=None , empty=False ) ¶ -
Updates an existing plot with data corresponding to the key.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Integer
element
Module
¶
-
class
holoviews.plotting.bokeh.element.
ColorbarPlot
( element , plot=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.element.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.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param Boolean
logz
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply log scaling to the z-axis.
-
param List
default_tools
( allow_None=False, bounds=(0, None), constant=False, default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param Dict
clipping_colors
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
param HookList
finalize_hooks
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Optional list of hooks called when finalizing an axis. The hook is passed the plot object and the displayed object, other plotting handles can be accessed via plot.handles.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the x- and y-axis
-
param Number
border
( allow_None=False, bounds=None, constant=False, default=10, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Minimum border around plot.
-
param Boolean
shared_axes
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the share axes across plots for linked panning and zooming.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
colorbar
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display a colorbar.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply extent overrides on the Elements
-
param Dict
lod
( allow_None=False, constant=False, default={‘threshold’: 2000, ‘interval’: 300, ‘timeout’: 500, ‘factor’: 10}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Bokeh plots offer “Level of Detail” (LOD) capability to accomodate 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.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute the plot bounds from the data itself.
-
param List
tools
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot y-axis.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot x-axis.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Boolean
show_frame
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether or not to show a complete frame around the plot.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the x-axis of the plot will be a log axis.
-
param Dict
colorbar_opts
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param ObjectSelector
colorbar_position
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘right’, ‘bottom_right’, ‘bottom’, ‘top’, ‘top_right’, ‘bottom_left’, ‘top_left’, ‘left’], pickle_default_value=True, precedence=None, readonly=False ) - Allows selecting between a number of predefined colorbar position options. The predefined options may be customized in the colorbar_specs class attribute.
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘12pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’}
-
param List
labelled
( allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether to plot the ‘x’ and ‘y’ labels.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show a Cartesian grid on the plot.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the y-axis of the plot will be a log axis.
-
param ObjectSelector
toolbar
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], pickle_default_value=True, precedence=None, readonly=False ) - The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Parameter
bgcolor
( allow_None=False, constant=False, default=white, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Background color of the plot.
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Returns a list of the plot objects to update.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
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_data
( element , ranges=None , empty=False ) ¶ -
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
( view , ranges ) ¶ -
Gets the extents for the axes from the current View. The globally computed ranges can optionally override the extents.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None , plot=None , plots=None , source=None ) ¶ -
Initializes a new plot object with the last available frame.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
model_changed
( model ) ¶ -
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.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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_frame
( key , ranges=None , plot=None , element=None , empty=False ) ¶ -
Updates an existing plot with data corresponding to the key.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Integer
-
class
holoviews.plotting.bokeh.element.
CompositeElementPlot
( element , plot=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.element.ElementPlot
A CompositeElementPlot is an Element plot type that coordinates drawing of multiple glyphs.
-
param Integer
xrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the xticks.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param List
default_tools
( allow_None=False, bounds=(0, None), constant=False, default=[‘save’, ‘pan’, ‘wheel_zoom’, ‘box_zoom’, ‘reset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param Boolean
show_legend
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show legend for the plot.
-
param HookList
finalize_hooks
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Optional list of hooks called when finalizing an axis. The hook is passed the plot object and the displayed object, other plotting handles can be accessed via plot.handles.
-
param Boolean
invert_axes
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the x- and y-axis
-
param Number
border
( allow_None=False, bounds=None, constant=False, default=10, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Minimum border around plot.
-
param Boolean
shared_axes
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the share axes across plots for linked panning and zooming.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
apply_extents
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to apply extent overrides on the Elements
-
param Dict
lod
( allow_None=False, constant=False, default={‘threshold’: 2000, ‘interval’: 300, ‘timeout’: 500, ‘factor’: 10}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Bokeh plots offer “Level of Detail” (LOD) capability to accomodate 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.
-
param Boolean
apply_ranges
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute the plot bounds from the data itself.
-
param List
tools
( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - A list of plugin tools to use on the plot.
-
param Boolean
invert_yaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot y-axis.
-
param Parameter
xticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Boolean
invert_xaxis
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to invert the plot x-axis.
-
param ObjectSelector
xaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=bottom, instantiate=False, objects=[‘top’, ‘bottom’, ‘bare’, ‘top-bare’, ‘bottom-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Boolean
show_frame
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether or not to show a complete frame around the plot.
-
param Boolean
logx
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the x-axis of the plot will be a log axis.
-
param Integer
yrotation
( allow_None=True, bounds=(0, 360), constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Rotation angle of the yticks.
-
param Parameter
fontsize
( allow_None=True, constant=False, default={‘title’: ‘12pt’}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’}
-
param List
labelled
( allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether to plot the ‘x’ and ‘y’ labels.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Boolean
show_grid
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to show a Cartesian grid on the plot.
-
param Boolean
logy
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether the y-axis of the plot will be a log axis.
-
param ObjectSelector
toolbar
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=right, instantiate=False, objects=[‘above’, ‘below’, ‘left’, ‘right’, None], pickle_default_value=True, precedence=None, readonly=False ) - The toolbar location, must be one of ‘above’, ‘below’, ‘left’, ‘right’, None.
-
param ObjectSelector
yaxis
( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=left, instantiate=False, objects=[‘left’, ‘right’, ‘bare’, ‘left-bare’, ‘right-bare’, None], pickle_default_value=True, precedence=None, readonly=False ) - 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’.
-
param Parameter
bgcolor
( allow_None=False, constant=False, default=white, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Background color of the plot.
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Parameter
yticks
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Returns a list of the plot objects to update.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
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_data
( element , ranges=None , empty=False ) ¶ -
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
( view , ranges ) ¶ -
Gets the extents for the axes from the current View. The globally computed ranges can optionally override the extents.
-
get_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
get_zorder
( overlay , key , el ) ¶ -
Computes the z-order of element in the NdOverlay taking into account possible batching of elements.
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None , plot=None , plots=None , source=None ) ¶ -
Initializes a new plot object with the last available frame.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
model_changed
( model ) ¶ -
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.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
push
( ) ¶ -
Pushes updated plot data via the Comm.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
set_root
( root ) ¶ -
Sets the current document on all subplots.
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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_frame
( key , ranges=None , plot=None , element=None , empty=False ) ¶ -
Updates an existing plot with data corresponding to the key.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Integer
plot
Module
¶
-
class
holoviews.plotting.bokeh.plot.
BokehPlot
( *args , **params ) [source] ¶ -
Bases:
holoviews.plotting.plot.DimensionedPlot
Plotting baseclass for the Bokeh backends, implementing the basic plotting interface for Bokeh based plots.
-
param Boolean
normalize
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to compute ranges across all Elements at this level of plotting. Allows selecting normalization at different levels for nested data containers.
-
param Boolean
shared_datasource
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether Elements drawing the data from the same object should share their Bokeh data source allowing for linked brushing and other linked behaviors.
-
param Integer
height
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Height of the plot in pixels
-
param String
title_format
( allow_None=False, basestring=<type ‘basestring’>, constant=False, default={label} {group} {dimensions}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - The formatting string for the title of this plot, allows defining a label group separator and dimension labels.
-
param Integer
width
( allow_None=False, bounds=None, constant=False, default=300, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Width of the plot in pixels
-
param Parameter
fontsize
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - 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’:20, ‘title’:15, ‘ylabel’:5, ‘xlabel’:5, ‘legend’:8, ‘legend_title’:13} You can set the fontsize of both ‘ylabel’ and ‘xlabel’ together using the ‘labels’ key.
-
param Boolean
show_title
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Whether to display the plot title.
-
param Parameter
projection
( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False ) - Allows supplying a custom projection to transform the axis coordinates during display. Example projections include ‘3d’ and ‘polar’ projections supported by some backends. Depending on the backend custom projection objects may be supplied.
-
compute_ranges
( obj , key , ranges ) ¶ -
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.
-
current_handles
¶ -
Should return a list of plot objects that have changed and should be updated.
-
debug
( msg , *args , **kw ) ¶ -
Print msg merged with args as a debugging statement.
See Python’s logging module for details of message formatting.
-
defaults
( ) ¶ -
Return {parameter_name:parameter.default} for all non-constant Parameters.
Note that a Parameter for which instantiate==True has its default instantiated.
-
force_new_dynamic_value
= <functools.partial object> ¶
-
get_data
( element , ranges=None , empty=False ) [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_param_values
( onlychanged=False ) ¶ -
Return a list of name,value pairs for all Parameters of this object.
If onlychanged is True, will only return values that are not equal to the default value.
-
get_value_generator
= <functools.partial object> ¶
-
init_comm
( ) ¶ -
Initializes comm and attaches streams.
-
initialize_plot
( ranges=None ) ¶ -
Initialize the matplotlib figure.
-
inspect_value
= <functools.partial object> ¶
-
matches
( spec ) ¶ -
Matches a specification against the current Plot.
-
message
( msg , *args , **kw ) ¶ -
Print msg merged with args as a message.
See Python’s logging module for details of message formatting.
-
params
( parameter_name=None ) ¶ -
Return the Parameters of this class as the dictionary {name: parameter_object}
Includes Parameters from this class and its superclasses.
-
pprint
( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' ) ¶ -
(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.
-
print_param_defaults
( ) ¶ -
Print the default values of all cls’s Parameters.
-
print_param_values
( ) ¶ -
Print the values of all this object’s Parameters.
-
refresh
( **kwargs ) ¶ -
Refreshes the plot by rerendering it and then pushing the updated data if the plot has an associated Comm.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( param_name , value ) ¶ -
Set the default value of param_name.
Equivalent to setting param_name on the class.
-
set_dynamic_time_fn
= <functools.partial object> ¶
-
set_param
= <functools.partial object> ¶
-
state
¶ -
The plotting state that gets updated via the update method and used by the renderer to generate output.
-
state_pop
( ) ¶ -
Restore the most recently saved state.
See state_push() for more details.
-
state_push
( ) ¶ -
Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.
-
sync_sources
( ) [source] ¶ -
Syncs data sources between Elements, which draw data from the same object.
-
traverse
( fn=None , specs=None , full_breadth=True ) ¶ -
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.
-
verbose
( msg , *args , **kw ) ¶ -
Print msg merged with args as a verbose message.
See Python’s logging module for details of message formatting.
-
warning
( msg , *args , **kw ) ¶ -
Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.
See Python’s logging module for details of message formatting.
-
param Boolean
-
class
holoviews.plotting.bokeh.plot.
CompositePlot
( *args , **params ) [source] ¶ -
Bases:
holoviews.plotting.bokeh.plot.BokehPlot