streams Module#
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, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A stream representing the bounds of a box selection as an tuple of the left and right coordinates.
boundsx
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Boundsx’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301408590>)Bounds defined as (left, right) tuple.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.BoundsXY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A stream representing the bounds of a box selection as an tuple of the left, bottom, right and top coordinates.
bounds
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Bounds’, length=4, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3013ec210>)Bounds defined as (left, bottom, right, top) tuple.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.BoundsY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A stream representing the bounds of a box selection as an tuple of the bottom and top coordinates.
boundsy
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Boundsy’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301444490>)Bounds defined as (bottom, top) tuple.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.BoxEdit(empty_value=None, num_objects=0, styles=None, tooltip=None, **params)[source]#
Bases:
CDSStream
Attaches a BoxEditTool and syncs the datasource.
- empty_value: int/float/string/None
The value to insert on non-position columns when adding a new box
- num_objects: int
The number of boxes that can be drawn before overwriting the oldest drawn box.
- styles: dict
A dictionary specifying lists of styles to cycle over whenever a new box glyph is drawn.
- tooltip: str
An optional tooltip to override the default
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3014602d0>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Buffer(data, length=1000, index=True, following=True, **params)[source]#
Bases:
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.
The
following
argument determines whether any plot which is subscribed to this stream will update the axis ranges when an update is pushed. This makes it possible to control whether zooming is allowed while streaming.data
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30147f510>)Arbitrary data being streamed to a DynamicMap callback.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.CDSStream(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A Stream that syncs a bokeh ColumnDataSource with python.
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3014bedd0>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Counter(rename=None, source=None, subscribers=None, linked=False, transient=False, **params)[source]#
Bases:
Stream
Simple stream that automatically increments an integer counter parameter every time it is updated.
counter
= param.Integer(allow_refs=False, bounds=(0, None), constant=True, default=0, inclusive_bounds=(True, True), label=’Counter’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3014fafd0>)- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.CrossFilterSet(selection_streams=(), mode='intersection', index_cols=None, **params)[source]#
Bases:
Derived
selection_expr
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Selection expr’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30151e890>)- 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.
- property constants#
Dict of constants for this instance that should be passed to transform_function
Constant values must not change in response to changes in the values of the input streams. They may, however, change in response to other stream property updates. For example, these values may change if the Stream’s source element changes
- 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
- property 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.
- 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.
- property 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 transform_function(stream_values, constants)[source]#
Pure function that transforms input stream param values into the param values of this Derived stream.
- Args:
- stream_values: list of dict
Current values of the stream params for each input_stream
- constants: dict
Constants as returned by the constants property of an instance of this stream type.
- Returns: dict
dict of new Stream values where the keys match this stream’s params
- 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.
- class holoviews.streams.CurveEdit(style=None, tooltip=None, **params)[source]#
Bases:
PointDraw
Attaches a PointDraw to the plot which allows editing the Curve when selected.
- style: dict
A dictionary specifying the style of the vertices.
- tooltip: str
An optional tooltip to override the default
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015614d0>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Derived(input_streams, exclusive=False, **params)[source]#
Bases:
Stream
A Stream that watches the parameters of one or more input streams and produces a result that is a pure function of the input stream values.
If exclusive=True, then all streams except the most recently updated are cleared.
- 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.
- property constants#
Dict of constants for this instance that should be passed to transform_function
Constant values must not change in response to changes in the values of the input streams. They may, however, change in response to other stream property updates. For example, these values may change if the Stream’s source element changes
- 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
- property 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.
- 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.
- property 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 transform_function(stream_values, constants)[source]#
Pure function that transforms input stream param values into the param values of this Derived stream.
- Args:
- stream_values: list of dict
Current values of the stream params for each input_stream
- constants: dict
Constants as returned by the constants property of an instance of this stream type.
- Returns: dict
dict of new Stream values where the keys match this stream’s params
- 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.
- class holoviews.streams.DoubleTap(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y-position of a double-tap or -click in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015719d0>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015be690>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Draw(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
A series of updating x/y-positions when drawing, together with the current stroke count
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015f9910>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015fb1d0>)Pointer position along the y-axis in data coordinates
stroke_count
= param.Integer(allow_refs=False, constant=True, default=0, inclusive_bounds=(True, True), label=’Stroke count’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015fb510>)The current drawing stroke count. Increments every time a new stroke is started.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.FreehandDraw(empty_value=None, num_objects=0, styles=None, tooltip=None, **params)[source]#
Bases:
CDSStream
Attaches a FreehandDrawTool and syncs the datasource.
- empty_value: int/float/string/None
The value to insert on non-position columns when adding a new polygon
- num_objects: int
The number of polygons that can be drawn before overwriting the oldest polygon.
- styles: dict
A dictionary specifying lists of styles to cycle over whenever a new freehand glyph is drawn.
- tooltip: str
An optional tooltip to override the default
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3015f0790>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.History(input_stream, **params)[source]#
Bases:
Stream
A Stream that maintains a history of the values of a single input stream
values
= param.List(allow_refs=False, bounds=(0, None), constant=True, default=[], label=’Values’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3016431d0>)List containing the historical values of the input stream
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Lasso(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A stream representing a lasso selection in 2D space as a two-column array of coordinates.
geometry
= param.Array(allow_None=True, allow_refs=False, class_=<class ‘numpy.ndarray’>, constant=True, label=’Geometry’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301087910>)The coordinates of the lasso geometry as a two-column array.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.LinkedStream(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
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)[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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.MouseEnter(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y-position where the mouse/cursor entered the plot area in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3016bf950>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3016c1250>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.MouseLeave(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y-position where the mouse/cursor entered the plot area in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3016ebdd0>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3016fd6d0>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.MultiAxisTap(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
The x/y-positions of a tap or click in data coordinates.
xs
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Xs’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301724090>)Pointer positions along the x-axes in data coordinates
ys
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Ys’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301725990>)Pointer positions along the y-axes in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PanEnd(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y position of a the end of a pan event in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301760790>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301762050>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.ParamMethod(parameterized, parameters=None, watch=True, **params)[source]#
Bases:
Params
A Stream that watches the parameter dependencies on a method of a parameterized class and triggers when one of the parameters change.
parameterized
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘param.parameterized.Parameterized’>, <class ‘param.parameterized.ParameterizedMetaclass’>), constant=True, label=’Parameterized’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301784a90>)Parameterized instance to watch for parameter changes.
parameters
= param.List(allow_refs=False, bounds=(0, None), constant=True, default=[], label=’Parameters’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301786350>)Parameters on the parameterized to watch.
- 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.
- 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
- classmethod from_params(params, **kwargs)[source]#
Returns Params streams given a dictionary of parameters
- Args:
params (dict): Dictionary of parameters
- Returns:
List of Params streams
- property 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.
- 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.
- property 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.
- class holoviews.streams.Params(parameterized=None, parameters=None, watch=True, watch_only=False, **params)[source]#
Bases:
Stream
A Stream that watches the changes in the parameters of the supplied Parameterized objects and triggers when they change.
parameterized
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘param.parameterized.Parameterized’>, <class ‘param.parameterized.ParameterizedMetaclass’>), constant=True, label=’Parameterized’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3017b8d90>)Parameterized instance to watch for parameter changes.
parameters
= param.List(allow_refs=False, bounds=(0, None), constant=True, default=[], label=’Parameters’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3017bb7d0>)Parameters on the parameterized to watch.
- 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.
- 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
- classmethod from_params(params, **kwargs)[source]#
Returns Params streams given a dictionary of parameters
- Args:
params (dict): Dictionary of parameters
- Returns:
List of Params streams
- property 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.
- 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.
- property 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.
- class holoviews.streams.Pipe(data=None, memoize=False, **params)[source]#
Bases:
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).
data
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3017e86d0>)Arbitrary data being streamed to a DynamicMap callback.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PlotReset(*args, **params)[source]#
Bases:
LinkedStream
A stream signalling when a plot reset event has been triggered.
resetting
= param.Boolean(allow_refs=False, constant=True, default=False, label=’Resetting’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3010f2550>)Whether a reset event is being signalled.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PlotSize(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
Returns the dimensions of a plot once it has been displayed.
width
= param.Integer(allow_None=True, allow_refs=False, constant=True, inclusive_bounds=(True, True), label=’Width’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30184a710>)The width of the plot in pixels
height
= param.Integer(allow_None=True, allow_refs=False, constant=True, inclusive_bounds=(True, True), label=’Height’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301854550>)The height of the plot in pixels
scale
= param.Number(allow_refs=False, constant=True, default=1.0, inclusive_bounds=(True, True), label=’Scale’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301849ed0>)Scale factor to scale width and height values reported by the stream
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PointDraw(empty_value=None, add=True, drag=True, num_objects=0, styles=None, tooltip=None, **params)[source]#
Bases:
CDSStream
Attaches a PointDrawTool and syncs the datasource.
- add: boolean
Whether to allow adding new Points
- drag: boolean
Whether to enable dragging of Points
- empty_value: int/float/string/None
The value to insert on non-position columns when adding a new polygon
- num_objects: int
The number of polygons that can be drawn before overwriting the oldest polygon.
- styles: dict
A dictionary specifying lists of styles to cycle over whenever a new Point glyph is drawn.
- tooltip: str
An optional tooltip to override the default
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30187ec10>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PointerX(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
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.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3018af790>)Pointer position along the x-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PointerXY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
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.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3018d7c50>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3018c5510>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PointerY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
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.
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301908490>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PolyDraw(empty_value=None, drag=True, num_objects=0, show_vertices=False, vertex_style=None, styles=None, tooltip=None, **params)[source]#
Bases:
CDSStream
Attaches a PolyDrawTool and syncs the datasource.
- drag: boolean
Whether to enable dragging of polygons and paths
- empty_value: int/float/string/None
The value to insert on non-position columns when adding a new polygon
- num_objects: int
The number of polygons that can be drawn before overwriting the oldest polygon.
- show_vertices: boolean
Whether to show the vertices when a polygon is selected
- styles: dict
A dictionary specifying lists of styles to cycle over whenever a new Poly glyph is drawn.
- tooltip: str
An optional tooltip to override the default
- vertex_style: dict
A dictionary specifying the style options for the vertices. The usual bokeh style options apply, e.g. fill_color, line_alpha, size, etc.
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x30192c810>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PolyEdit(vertex_style=None, shared=True, **params)[source]#
Bases:
PolyDraw
Attaches a PolyEditTool and syncs the datasource.
- shared: boolean
Whether PolyEditTools should be shared between multiple elements
- tooltip: str
An optional tooltip to override the default
- vertex_style: dict
A dictionary specifying the style options for the vertices. The usual bokeh style options apply, e.g. fill_color, line_alpha, size, etc.
data
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Data’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301965550>)Data synced from Bokeh ColumnDataSource supplied as a dictionary of columns, where each column is a list of values (for point-like data) or list of lists of values (for path-like data).
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.PressUp(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y position of a mouse pressup event in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301991f10>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301993810>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.RangeX(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
Axis range along x-axis in data coordinates.
x_range
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’X range’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3019c2350>)Range of the x-axis of a plot in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.RangeXY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
Axis ranges along x- and y-axis in data coordinates.
x_range
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’X range’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3019ea490>)Range of the x-axis of a plot in data coordinates
y_range
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Y range’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x3019ebc90>)Range of the y-axis of a plot in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.RangeY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
Axis range along y-axis in data coordinates.
y_range
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Y range’, length=2, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301a1aa50>)Range of the y-axis of a plot in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.SelectMode(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
mode
= param.ObjectSelector(allow_refs=False, constant=True, default=’replace’, label=’Mode’, names={}, nested_refs=False, objects=[‘replace’, ‘append’, ‘intersect’, ‘subtract’], rx=<param.reactive.reactive_ops object at 0x301a4ea90>)Defines what should happen when a new selection is made. The default is to replace the existing selection. Other options are to append to theselection, intersect with it or subtract from it.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Selection1D(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
LinkedStream
A stream representing a 1D selection of objects by their index.
index
= param.List(allow_None=True, allow_refs=False, bounds=(0, None), constant=True, default=[], label=’Index’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301a72ad0>)Indices into a 1D datastructure.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.SelectionExpr(source, include_region=True, **params)[source]#
Bases:
Derived
selection_expr
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Selection expr’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301a9ea10>)bbox
= param.Dict(allow_None=True, allow_refs=False, class_=<class ‘dict’>, constant=True, label=’Bbox’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301a90350>)region_element
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Region element’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301a9ea10>)- 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.
- property constants#
Dict of constants for this instance that should be passed to transform_function
Constant values must not change in response to changes in the values of the input streams. They may, however, change in response to other stream property updates. For example, these values may change if the Stream’s source element changes
- 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
- property 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.
- 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.
- property 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 transform_function(stream_values, constants)[source]#
Pure function that transforms input stream param values into the param values of this Derived stream.
- Args:
- stream_values: list of dict
Current values of the stream params for each input_stream
- constants: dict
Constants as returned by the constants property of an instance of this stream type.
- Returns: dict
dict of new Stream values where the keys match this stream’s params
- 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.
- class holoviews.streams.SelectionExprSequence(source, mode='overwrite', include_region=True, **params)[source]#
Bases:
Derived
selection_expr
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Selection expr’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301ae5810>)region_element
= param.Parameter(allow_None=True, allow_refs=False, constant=True, label=’Region element’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301ae6f50>)- 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.
- property constants#
Dict of constants for this instance that should be passed to transform_function
Constant values must not change in response to changes in the values of the input streams. They may, however, change in response to other stream property updates. For example, these values may change if the Stream’s source element changes
- 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
- property 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.
- 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.
- property 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 transform_function(stream_values, constants)[source]#
Pure function that transforms input stream param values into the param values of this Derived stream.
- Args:
- stream_values: list of dict
Current values of the stream params for each input_stream
- constants: dict
Constants as returned by the constants property of an instance of this stream type.
- Returns: dict
dict of new Stream values where the keys match this stream’s params
- 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.
- class holoviews.streams.SelectionXY(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
BoundsXY
A stream representing the selection along the x-axis and y-axis. Unlike a BoundsXY stream, this stream returns range or categorical selections.
bounds
= param.Tuple(allow_None=True, allow_refs=False, constant=True, label=’Bounds’, length=4, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301ae8790>)Bounds defined as (left, bottom, right, top) tuple.
x_selection
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘tuple’>, <class ‘list’>), constant=True, label=’X selection’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301b233d0>)The current selection along the x-axis, either a numerical range defined as a tuple or a list of categories.
y_selection
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘tuple’>, <class ‘list’>), constant=True, label=’Y selection’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301b217d0>)The current selection along the y-axis, either a numerical range defined as a tuple or a list of categories.
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.SingleTap(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y-position of a single tap or click in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301b4e190>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301b4fa90>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Stream(rename=None, source=None, subscribers=None, linked=False, transient=False, **params)[source]#
Bases:
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.
- 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
- property 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.
- 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.
- property 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.
- class holoviews.streams.Tap(linked=True, popup=None, popup_position='top_right', popup_anchor=None, **params)[source]#
Bases:
PointerXY
The x/y-position of a tap or click in data coordinates.
x
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’X’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301baa950>)Pointer position along the x-axis in data coordinates
y
= param.ClassSelector(allow_None=True, allow_refs=False, class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘tuple’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), constant=True, label=’Y’, nested_refs=False, rx=<param.reactive.reactive_ops object at 0x301ba4290>)Pointer position along the y-axis in data coordinates
- 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.
- 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
- property 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.
- 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.
- property 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.
- holoviews.streams.streams_list_from_dict(streams)[source]#
Converts a streams dictionary into a streams list
- 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.