holoviews.widgets Package ¶
widgets
Package
¶
-
class
holoviews.plotting.widgets.
NdWidget
( plot , renderer=None , **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
NdWidget is an abstract base class implementing a method to find the dimensions and keys of any ViewableElement, GridSpace or UniformNdMapping type. In the process it creates a mock_obj to hold the dimensions and keys.
-
param Dict
display_options
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The display options used to generate individual frames
-
param Boolean
embed
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to embed all plots in the Javascript, generating a static widget not dependent on the IPython server.
-
param Boolean
export_json
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to export plots as JSON files, which can be dynamically loaded through a callback from the slider.
-
param String
json_save_path
( allow_None=False, basestring=<class ‘str’>, constant=False, default=./json_figures, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget will save the JSON data to this path. If None data will be accessible via the json_data attribute.
-
param String
json_load_path
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget JS code will load the data from this path, if None defaults to json_save_path. For loading the data from within the notebook the path must be relative, when exporting the notebook the path can be set to another location like a webserver where the JSON files can be uploaded to.
-
param String
css
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Defines the local CSS file to be loaded for this widget.
-
param String
basejs
( allow_None=False, basestring=<class ‘str’>, constant=False, default=widgets.js, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - JS file containing javascript baseclasses for the widget.
-
param String
extensionjs
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Optional javascript extension file for a particular backend.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
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
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
save_json
( frames ) [source] ¶ -
Saves frames data into a json file at the specified json_path, named with the widget uuid.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.NdWidget'>) ¶
-
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.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Dict
-
class
holoviews.plotting.widgets.
ScrubberWidget
( plot , renderer=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.widgets.NdWidget
ScrubberWidget generates a basic animation widget with a slider and various play/rewind/stepping options. It has been adapted from Jake Vanderplas’ JSAnimation library, which was released under BSD license.
Optionally the individual plots can be exported to json, which can be dynamically loaded by serving the data the data for each frame on a simple server.
-
param Dict
display_options
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The display options used to generate individual frames
-
param Boolean
embed
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to embed all plots in the Javascript, generating a static widget not dependent on the IPython server.
-
param Boolean
export_json
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to export plots as JSON files, which can be dynamically loaded through a callback from the slider.
-
param String
json_save_path
( allow_None=False, basestring=<class ‘str’>, constant=False, default=./json_figures, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget will save the JSON data to this path. If None data will be accessible via the json_data attribute.
-
param String
json_load_path
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget JS code will load the data from this path, if None defaults to json_save_path. For loading the data from within the notebook the path must be relative, when exporting the notebook the path can be set to another location like a webserver where the JSON files can be uploaded to.
-
param String
css
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Defines the local CSS file to be loaded for this widget.
-
param String
basejs
( allow_None=False, basestring=<class ‘str’>, constant=False, default=widgets.js, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - JS file containing javascript baseclasses for the widget.
-
param String
extensionjs
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Optional javascript extension file for a particular backend.
-
param String
html_template
( allow_None=False, basestring=<class ‘str’>, constant=False, default=htmlscrubber.jinja, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The jinja2 template used to generate the html output.
-
param String
js_template
( allow_None=False, basestring=<class ‘str’>, constant=False, default=jsscrubber.jinja, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The jinja2 template used to generate the html output.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
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
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
save_json
( frames ) ¶ -
Saves frames data into a json file at the specified json_path, named with the widget uuid.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.ScrubberWidget'>) ¶
-
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.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Dict
-
class
holoviews.plotting.widgets.
SelectionWidget
( plot , renderer=None , **params ) [source] ¶ -
Bases:
holoviews.plotting.widgets.NdWidget
Javascript based widget to select and view ViewableElement objects contained in an NdMapping. For each dimension in the NdMapping a slider or dropdown selection widget is created and can be used to select the html output associated with the selected ViewableElement type. The widget maybe set to embed all frames in the supplied object into the rendered html or to dynamically update the widget with a live IPython kernel.
The widget supports all current HoloViews figure backends including png and svg output..
Just like the ScrubberWidget the data can be optionally saved to json and dynamically loaded from a server.
-
param Dict
display_options
( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - The display options used to generate individual frames
-
param Boolean
embed
( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to embed all plots in the Javascript, generating a static widget not dependent on the IPython server.
-
param Boolean
export_json
( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} ) - Whether to export plots as JSON files, which can be dynamically loaded through a callback from the slider.
-
param String
json_save_path
( allow_None=False, basestring=<class ‘str’>, constant=False, default=./json_figures, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget will save the JSON data to this path. If None data will be accessible via the json_data attribute.
-
param String
json_load_path
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - If export_json is enabled the widget JS code will load the data from this path, if None defaults to json_save_path. For loading the data from within the notebook the path must be relative, when exporting the notebook the path can be set to another location like a webserver where the JSON files can be uploaded to.
-
param String
css
( allow_None=False, basestring=<class ‘str’>, constant=False, default=jsslider.css, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Defines the local CSS file to be loaded for this widget.
-
param String
basejs
( allow_None=False, basestring=<class ‘str’>, constant=False, default=widgets.js, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - JS file containing javascript baseclasses for the widget.
-
param String
extensionjs
( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - Optional javascript extension file for a particular backend.
-
param String
html_template
( allow_None=False, basestring=<class ‘str’>, constant=False, default=htmlslider.jinja, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The jinja2 template used to generate the html output.
-
param String
js_template
( allow_None=False, basestring=<class ‘str’>, constant=False, default=jsslider.jinja, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} ) - The jinja2 template used to generate the html output.
-
debug
( *args , **kwargs ) ¶ -
Inspect .param.debug method for the full docstring
-
defaults
( *args , **kwargs ) ¶ -
Inspect .param.defaults method for the full docstring
-
force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
message
( *args , **kwargs ) ¶ -
Inspect .param.message method for the full docstring
-
params
( *args , **kwargs ) ¶ -
Inspect .param.params method for the full docstring
-
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
( *args , **kwargs ) ¶ -
Inspect .param.print_param_defaults method for the full docstring
-
print_param_values
( *args , **kwargs ) ¶ -
Inspect .param.print_param_values method for the full docstring
-
save_json
( frames ) ¶ -
Saves frames data into a json file at the specified json_path, named with the widget uuid.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
set_default
( *args , **kwargs ) ¶ -
Inspect .param.set_default method for the full docstring
-
set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.plotting.widgets.SelectionWidget'>) ¶
-
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.
-
verbose
( *args , **kwargs ) ¶ -
Inspect .param.verbose method for the full docstring
-
warning
( *args , **kwargs ) ¶ -
Inspect .param.warning method for the full docstring
-
param Dict
-
holoviews.plotting.widgets.
escape_vals
( vals , escape_numerics=True ) [source] ¶ -
Escapes a list of values to a string, converting to unicode for safety.