holoviews.holoviews Package ¶
holoviews
Package
¶
-
holoviews.__init__.
help
( obj , visualization=True , ansi=True , backend=None , recursive=False , pattern=None ) [source] ¶ -
Extended version of the built-in help that supports parameterized functions and objects. A pattern (regular expression) may be used to filter the output and if recursive is set to True, documentation for the supplied object is shown. Note that the recursive option will only work with an object instance and not a class.
If ansi is set to False, all ANSI color codes are stripped out.
streams
Module
¶
The streams module defines the streams API that allows visualizations to generate and respond to events, originating either in Python on the server-side or in Javascript in the Jupyter notebook (client-side).
-
class
holoviews.streams.
BoundsX
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A stream representing the bounds of a box selection as an tuple of the left and right coordinates.
-
param Tuple
boundsx
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Bounds defined as (left, right) tuple.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.BoundsX'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.BoundsX'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.BoundsX'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.BoundsX'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.BoundsX'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
BoundsXY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A stream representing the bounds of a box selection as an tuple of the left, bottom, right and top coordinates.
-
param Tuple
bounds
( allow_None=True, constant=True, default=None, instantiate=True, length=4, pickle_default_value=True, precedence=None, readonly=False ) - Bounds defined as (left, bottom, right, top) tuple.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.BoundsXY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.BoundsXY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.BoundsXY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.BoundsXY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.BoundsXY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
BoundsY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A stream representing the bounds of a box selection as an tuple of the bottom and top coordinates.
-
param Tuple
boundsy
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Bounds defined as (bottom, top) tuple.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.BoundsY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.BoundsY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.BoundsY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.BoundsY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.BoundsY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
Buffer
( data , length=1000 , index=True , **params ) [source] ¶ -
Bases:
holoviews.streams.Pipe
Buffer allows streaming and accumulating incoming chunks of rows from tabular datasets. The data may be in the form of a pandas DataFrame, 2D arrays of rows and columns or dictionaries of column arrays. Buffer will accumulate the last N rows, where N is defined by the specified
length
. The accumulated data is then made available via thedata
parameter.A Buffer may also be instantiated with a streamz.StreamingDataFrame or a streamz.StreamingSeries, it will automatically subscribe to events emitted by a streamz object.
When streaming a DataFrame will reset the DataFrame index by default making it available to HoloViews elements as dimensions, this may be disabled by setting index=False.
-
param Parameter
data
( allow_None=True, constant=True, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Arbitrary data being streamed to a DynamicMap callback.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Buffer'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Buffer'>) ¶
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Buffer'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
send
( data ) ¶ -
A convenience method to send an event with data without supplying a keyword.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Buffer'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Buffer'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
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 Parameter
-
class
holoviews.streams.
Counter
( rename={} , source=None , subscribers=[] , linked=False , transient=False , **params ) [source] ¶ -
Bases:
holoviews.streams.Stream
Simple stream that automatically increments an integer counter parameter every time it is updated.
param Integer
counter
( allow_None=False, bounds=(0, None), constant=True, default=0, inclusive_bounds=(True, True), instantiate=True, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Counter'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Counter'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Counter'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Counter'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Counter'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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.
-
-
class
holoviews.streams.
DoubleTap
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
The x/y-position of a double-tap or -click in data coordinates.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.DoubleTap'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.DoubleTap'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.DoubleTap'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.DoubleTap'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.DoubleTap'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
Draw
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
A series of updating x/y-positions when drawing, together with the current stroke count
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
param Integer
stroke_count
( allow_None=False, bounds=None, constant=True, default=0, inclusive_bounds=(True, True), instantiate=True, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - The current drawing stroke count. Increments every time a new stroke is started.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Draw'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Draw'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Draw'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Draw'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Draw'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
LinkedStream
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.Stream
A LinkedStream indicates is automatically linked to plot interactions on a backend via a Renderer. Not all backends may support dynamically supplying stream data.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.LinkedStream'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.LinkedStream'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.LinkedStream'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.LinkedStream'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.LinkedStream'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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.
-
-
class
holoviews.streams.
MouseEnter
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
The x/y-position where the mouse/cursor entered the plot area in data coordinates.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.MouseEnter'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.MouseEnter'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.MouseEnter'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.MouseEnter'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.MouseEnter'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
MouseLeave
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
The x/y-position where the mouse/cursor entered the plot area in data coordinates.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.MouseLeave'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.MouseLeave'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.MouseLeave'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.MouseLeave'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.MouseLeave'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
ParamValues
( obj , **params ) [source] ¶ -
Bases:
holoviews.streams.Stream
A Stream based on the parameter values of some other parameterized object, whether it is a parameterized class or a parameterized instance.
The update method enables the stream to update the parameters of the specified object.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.ParamValues'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.ParamValues'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.ParamValues'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.ParamValues'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.ParamValues'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) [source] ¶ -
The update method updates the parameters of the specified object.
If trigger is enabled, the trigger classmethod is invoked on this Stream instance to execute its subscribers.
-
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.
-
-
class
holoviews.streams.
Pipe
( data=None , memoize=False , **params ) [source] ¶ -
Bases:
holoviews.streams.Stream
A Stream used to pipe arbitrary data to a callback. Unlike other streams memoization can be disabled for a Pipe stream (and is disabled by default).
-
param Parameter
data
( allow_None=True, constant=True, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Arbitrary data being streamed to a DynamicMap callback.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Pipe'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Pipe'>) ¶
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Pipe'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
script_repr
( imports=[] , prefix=' ' ) ¶ -
Variant of __repr__ designed for generating a runnable script.
-
send
( data ) [source] ¶ -
A convenience method to send an event with data without supplying a keyword.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Pipe'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Pipe'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Parameter
-
class
holoviews.streams.
PlotReset
( *args , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A stream signalling when a plot reset event has been triggered.
-
param Boolean
reset
( allow_None=False, bounds=(0, 1), constant=True, default=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Whether a reset event is being signalled.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.PlotReset'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.PlotReset'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.PlotReset'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.PlotReset'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.PlotReset'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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.streams.
PlotSize
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
Returns the dimensions of a plot once it has been displayed.
-
param Integer
width
( allow_None=True, bounds=None, constant=True, default=None, inclusive_bounds=(True, True), instantiate=True, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - The width of the plot in pixels
-
param Integer
height
( allow_None=True, bounds=None, constant=True, default=None, inclusive_bounds=(True, True), instantiate=True, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - The height of the plot in pixels
-
param Number
scale
( allow_None=False, bounds=None, constant=True, default=1.0, inclusive_bounds=(True, True), instantiate=True, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> ) - Scale factor to scale width and height values reported by the stream
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.PlotSize'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.PlotSize'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.PlotSize'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.PlotSize'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.PlotSize'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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.streams.
PointerX
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A pointer position along the x-axis in data coordinates which may be a numeric or categorical dimension.
With the appropriate plotting backend, this corresponds to the position of the mouse/trackpad cursor. If the pointer is outside the plot bounds, the position is set to None.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.PointerX'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.PointerX'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.PointerX'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.PointerX'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.PointerX'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
PointerXY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A pointer position along the x- and y-axes in data coordinates which may numeric or categorical dimensions.
With the appropriate plotting backend, this corresponds to the position of the mouse/trackpad pointer. If the pointer is outside the plot bounds, the position values are set to None.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.PointerXY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.PointerXY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.PointerXY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.PointerXY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.PointerXY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
PointerY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A pointer position along the y-axis in data coordinates which may be a numeric or categorical dimension.
With the appropriate plotting backend, this corresponds to the position of the mouse/trackpad pointer. If the pointer is outside the plot bounds, the position is set to None.
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.PointerY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.PointerY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.PointerY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.PointerY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.PointerY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
RangeX
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
Axis range along x-axis in data coordinates.
-
param Tuple
x_range
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Range of the x-axis of a plot in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.RangeX'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.RangeX'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.RangeX'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.RangeX'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.RangeX'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
RangeXY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
Axis ranges along x- and y-axis in data coordinates.
-
param Tuple
x_range
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Range of the x-axis of a plot in data coordinates
-
param Tuple
y_range
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Range of the y-axis of a plot in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.RangeXY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.RangeXY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.RangeXY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.RangeXY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.RangeXY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
RangeY
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
Axis range along y-axis in data coordinates.
-
param Tuple
y_range
( allow_None=True, constant=True, default=None, instantiate=True, length=2, pickle_default_value=True, precedence=None, readonly=False ) - Range of the y-axis of a plot in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.RangeY'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.RangeY'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.RangeY'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.RangeY'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.RangeY'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 Tuple
-
class
holoviews.streams.
Selection1D
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.LinkedStream
A stream representing a 1D selection of objects by their index.
-
param List
index
( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False ) - Indices into a 1D datastructure.
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Selection1D'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Selection1D'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Selection1D'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Selection1D'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Selection1D'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 List
-
class
holoviews.streams.
SingleTap
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
The x/y-position of a single tap or click in data coordinates.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.SingleTap'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.SingleTap'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.SingleTap'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.SingleTap'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.SingleTap'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
class
holoviews.streams.
Stream
( rename={} , source=None , subscribers=[] , linked=False , transient=False , **params ) [source] ¶ -
Bases:
param.parameterized.Parameterized
A Stream is simply a parameterized object with parameters that change over time in response to update events and may trigger downstream events on its subscribers. The Stream parameters can be updated using the update method, which will optionally trigger the stream. This will notify the subscribers which may be supplied as a list of callables or added later using the add_subscriber method. The subscribers will be passed a dictionary mapping of the parameters of the stream, which are available on the instance as the
contents
.Depending on the plotting backend certain streams may interactively subscribe to events and changes by the plotting backend. For this purpose use the LinkedStream baseclass, which enables the linked option by default. A source for the linking may be supplied to the constructor in the form of another viewable object specifying which part of a plot the data should come from.
The transient option allows treating stream events as discrete updates, resetting the parameters to their default after the stream has been triggered. A downstream callback can therefore determine whether a stream is active by checking whether the stream values match the default (usually None).
The Stream class is meant for subclassing and subclasses should generally add one or more parameters but may also override the transform and reset method to preprocess parameters before they are passed to subscribers and reset them using custom logic respectively.
-
add_subscriber
( subscriber , precedence=0 ) [source] ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) [source] ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
classmethod
define
( name , **kwargs ) [source] ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Stream'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Stream'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Stream'>) ¶
-
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.
-
rename
( **mapping ) [source] ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Stream'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Stream'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) [source] ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
classmethod
trigger
( streams ) [source] ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) [source] ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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.
-
-
class
holoviews.streams.
Tap
( linked=True , **params ) [source] ¶ -
Bases:
holoviews.streams.PointerXY
The x/y-position of a tap or click in data coordinates.
-
param ClassSelector
x
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the x-axis in data coordinates
-
param ClassSelector
y
( allow_None=True, constant=True, default=None, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False ) - Pointer position along the y-axis in data coordinates
-
add_subscriber
( subscriber , precedence=0 ) ¶ -
Register a callable subscriber to this stream which will be invoked either when event is called or when this stream is passed to the trigger classmethod.
Precedence allows the subscriber ordering to be controlled. Users should only add subscribers with precedence between zero and one while HoloViews itself reserves the use of higher precedence values. Subscribers with high precedence are invoked later than ones with low precedence.
-
clear
( policy='all' ) ¶ -
Clear all subscribers registered to this stream.
The default policy of ‘all’ clears all subscribers. If policy is set to ‘user’, only subscribers defined by the user are cleared (precedence between zero and one). A policy of ‘internal’ clears subscribers with precedence greater than unity used internally by HoloViews.
-
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.
-
define
( name , **kwargs ) ¶ -
Utility to quickly and easily declare Stream classes. Designed for interactive use such as notebooks and shouldn’t replace parameterized class definitions in source code that is imported.
Takes a stream class name and a set of keywords where each keyword becomes a parameter. If the value is already a parameter, it is simply used otherwise the appropriate parameter type is inferred and declared, using the value as the default.
Supported types: bool, int, float, str, dict, tuple and list
-
event
( **kwargs ) ¶ -
Update the stream parameters and trigger an event.
-
force_new_dynamic_value
= functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.streams.Tap'>) ¶
-
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(<function Parameterized.get_value_generator>, <class 'holoviews.streams.Tap'>) ¶
-
hashkey
¶ -
The object the memoization hash is computed from. By default returns the stream contents but can be overridden to provide a custom hash key.
-
inspect_value
= functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.streams.Tap'>) ¶
-
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.
-
rename
( **mapping ) ¶ -
The rename method allows stream parameters to be allocated to new names to avoid clashes with other stream parameters of the same name. Returns a new clone of the stream instance with the specified name mapping.
-
reset
( ) ¶ -
Resets stream parameters to their defaults.
-
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(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.streams.Tap'>) ¶
-
set_param
= functools.partial(<function Parameterized.set_param>, <class 'holoviews.streams.Tap'>) ¶
-
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.
-
subscribers
¶ -
Property returning the subscriber list
-
transform
( ) ¶ -
Method that can be overwritten by subclasses to process the parameter values before renaming is applied. Returns a dictionary of transformed parameters.
-
trigger
( streams ) ¶ -
Given a list of streams, collect all the stream parameters into a dictionary and pass it to the union set of subscribers.
Passing multiple streams at once to trigger can be useful when a subscriber may be set multiple times across streams but only needs to be called once.
-
update
( **kwargs ) ¶ -
The update method updates the stream parameters (without any renaming applied) in response to some event. If the stream has a custom transform method, this is applied to transform the parameter values accordingly.
To update and trigger, use the event method.
-
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 ClassSelector
-
holoviews.streams.
triggering_streams
( streams ) [source] ¶ -
Temporarily declares the streams as being in a triggered state. Needed by DynamicMap to determine whether to memoize on a Callable, i.e. if a stream has memoization disabled and is in triggered state Callable should disable lookup in the memoization cache. This is done by the dynamicmap_memoization context manager.
Subpackages ¶
- holoviews.core Package
- holoviews.element Package
- holoviews.interface Package
- holoviews.ipython Package
- holoviews.operation Package
- holoviews.plotting Package
- holoviews.util Package