holoviews.core Package


core Package

class holoviews.core. HoloMap ( initial_items=None , group=None , label=None , **params ) [source]

Bases: holoviews.core.ndmapping.UniformNdMapping

A HoloMap can hold any number of DataLayers indexed by a list of dimension values. It also has a number of properties, which can find the x- and y-dimension limits and labels.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

collapse ( dimensions=None , function=None , spreadfn=None , **kwargs ) [source]

Allows collapsing one of any number of key dimensions on the HoloMap. Homogenous Elements may be collapsed by supplying a function, inhomogenous elements are merged.

collate ( merge_type=None , drop=[] , drop_constant=False ) [source]

Collation allows collapsing nested HoloMaps by merging their dimensions. In the simple case a HoloMap containing other HoloMaps can easily be joined in this way. However collation is particularly useful when the objects being joined are deeply nested, e.g. you want to join multiple Layouts recorded at different times, collation will return one Layout containing HoloMaps indexed by Time. Changing the merge_type will allow merging the outer Dimension into any other UniformNdMapping type.

Specific dimensions may be dropped if they are redundant by supplying them in a list. Enabling drop_constant allows ignoring any non-varying dimensions during collation.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
grid ( dimensions=None , **kwargs ) [source]

GridSpace takes a list of one or two dimensions, and lays out the containing Views along these axes in a GridSpace.

Shows all HoloMap data When no dimensions are specified.

groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

layout ( dimensions=None , **kwargs ) [source]

GridSpace takes a list of one or two dimensions, and lays out the containing Views along these axes in a GridSpace.

Shows all HoloMap data When no dimensions are specified.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

overlay ( dimensions=None , **kwargs ) [source]

Splits the UniformNdMapping along a specified number of dimensions and overlays items in the split out Maps.

Shows all HoloMap data When no dimensions are specified.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=None , function=None , **reduce_map ) [source]

Reduce each Element in the HoloMap using a function supplied via the kwargs, where the keyword has to match a particular dimension in the Elements.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

sample ( samples=[] , bounds=None , **sample_values ) [source]

Sample each Element in the UniformNdMapping by passing either a list of samples or a tuple specifying the number of regularly spaced samples per dimension. Alternatively, a single sample may be requested using dimension-value pairs. Optionally, the bounds argument can be used to specify the bounding extent from which the coordinates are to regularly sampled. Regular sampling assumes homogenous and regularly sampled data.

For 1D sampling, the shape is simply as the desired number of samples (and not a tuple). The bounds format for 1D sampling is the tuple (lower, upper) and the tuple (left, bottom, right, top) for 2D sampling.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
split_overlays ( ) [source]

Given a UniformNdMapping of Overlays of N layers, split out the layers into N separate Maps.

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Empty [source]

Bases: holoviews.core.dimension.Dimensioned , holoviews.core.layout.Composable

Empty may be used to define an empty placeholder in a Layout. It can be placed in a Layout just like any regular Element and container type via the + operator or by passing it to the Layout constructor as a part of a list.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Empty, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Layout ( items=None , identifier=None , parent=None , **kwargs ) [source]

Bases: holoviews.core.tree.AttrTree , holoviews.core.dimension.Dimensioned

A Layout is an AttrTree with ViewableElement objects as leaf values. Unlike AttrTree, a Layout supports a rich display, displaying leaf items in a grid style layout. In addition to the usual AttrTree indexing, Layout supports indexing of items by their row and column index in the layout.

The maximum number of columns in such a layout may be controlled with the cols method and the display policy is set with the display method. A display policy of ‘auto’ may use the string repr of the tree for large trees that would otherwise take a long time to display wheras a policy of ‘all’ will always display all the available leaves. The detailed settings for the ‘auto’ policy may be set using the max_branches option of the %output magic.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Layout, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( *args , **overrides ) [source]

Clone method for Layout matches Dimensioned.clone except the display mode is also propagated.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True ) [source]

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

display ( option ) [source]

Sets the display policy of the Layout before returning self

filter ( path_filters )

Filters the loaded AttrTree using the supplied path_filters.

fixed

If fixed, no new paths can be created via attribute access

force_new_dynamic_value = <functools.partial object>
classmethod from_values ( val ) [source]

Returns a Layout given a list (or tuple) of viewable elements or just a single viewable element.

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

merge ( trees )

Merge a collection of AttrTree objects.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

path

Returns the path up to the root for the current node.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

regroup ( group ) [source]

Assign a new group string to all the elements and return a new Layout.

classmethod relabel_item_paths ( items ) [source]

Given a list of path items (list of tuples where each element is a (path, element) pair), generate a new set of path items that guarantees that no paths clash. This uses the element labels as appropriate and automatically generates roman numeral identifiers if necessary.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
set_path ( path , val )

Set the given value at the supplied path where path is either a tuple of strings or a string in A.B.C format.

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

update ( other )

Updated the contents of the current AttrTree with the contents of a second AttrTree.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Overlay ( items=None , group=None , label=None , **params ) [source]

Bases: holoviews.core.layout.Layout , holoviews.core.overlay.CompositeOverlay

An Overlay consists of multiple Views (potentially of heterogeneous type) presented one on top each other with a particular z-ordering.

Overlays along with Views constitute the only valid leaf types of a Layout and in fact extend the Layout structure. Overlays are constructed using the * operator (building an identical structure to the + operator) and are the only objects that inherit both from Layout and CompositeOverlay.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Layout, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( *args , **overrides )

Clone method for Layout matches Dimensioned.clone except the display mode is also propagated.

collapse ( function ) [source]

Collapses all the Elements in the Overlay using the supplied function if they share a common type and group.

collate ( ) [source]

Collates any objects in the Overlay resolving any issues the recommended nesting structure.

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

display ( option )

Sets the display policy of the Layout before returning self

filter ( path_filters )

Filters the loaded AttrTree using the supplied path_filters.

fixed

If fixed, no new paths can be created via attribute access

force_new_dynamic_value = <functools.partial object>
from_values ( val )

Returns a Layout given a list (or tuple) of viewable elements or just a single viewable element.

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

merge ( trees )

Merge a collection of AttrTree objects.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

path

Returns the path up to the root for the current node.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

regroup ( group )

Assign a new group string to all the elements and return a new Layout.

relabel_item_paths ( items )

Given a list of path items (list of tuples where each element is a (path, element) pair), generate a new set of path items that guarantees that no paths clash. This uses the element labels as appropriate and automatically generates roman numeral identifiers if necessary.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
set_path ( path , val )

Set the given value at the supplied path where path is either a tuple of strings or a string in A.B.C format.

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

update ( other )

Updated the contents of the current AttrTree with the contents of a second AttrTree.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. GridMatrix ( initial_items=None , **params ) [source]

Bases: holoviews.core.spaces.GridSpace

GridMatrix is container type for heterogeneous Element types laid out in a grid. Unlike a GridSpace the axes of the Grid must not represent an actual coordinate space, but may be used to plot various dimensions against each other. The GridMatrix is usually constructed using the gridmatrix operation, which will generate a GridMatrix plotting each dimension in an Element against each other.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(1, 2), constant=False, default=[Dimension(‘X’), Dimension(‘Y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( full_grid=False )

Returns a complete set of keys on a GridSpace, even when GridSpace isn’t fully populated. This makes it easier to identify missing elements in the GridSpace.

last

The last of a GridSpace is another GridSpace constituted of the last of the individual elements. To access the elements by their X,Y position, either index the position directly or use the items() method.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. GridSpace ( initial_items=None , **params ) [source]

Bases: holoviews.core.ndmapping.UniformNdMapping

Grids are distinct from Layouts as they ensure all contained elements to be of the same type. Unlike Layouts, which have integer keys, Grids usually have floating point keys, which correspond to a grid sampling in some two-dimensional space. This two-dimensional space may have to arbitrary dimensions, e.g. for 2D parameter spaces.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(1, 2), constant=False, default=[Dimension(‘X’), Dimension(‘Y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( full_grid=False ) [source]

Returns a complete set of keys on a GridSpace, even when GridSpace isn’t fully populated. This makes it easier to identify missing elements in the GridSpace.

last

The last of a GridSpace is another GridSpace constituted of the last of the individual elements. To access the elements by their X,Y position, either index the position directly or use the items() method.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

holoviews.core. Columns

alias of Dataset

class holoviews.core. Collator ( data=None , **params ) [source]

Bases: holoviews.core.element.NdElement

Collator is an NdMapping type which can merge any number of HoloViews components with whatever level of nesting by inserting the Collators key dimensions on the HoloMaps. If the items in the Collator do not contain HoloMaps they will be created. Collator also supports filtering of Tree structures and dropping of constant dimensions.

param ClassSelector merge_type ( allow_None=False, constant=False, default=<class ‘holoviews.core.spaces.HoloMap’>, instantiate=False, is_instance=False, pickle_default_value=True, precedence=None, readonly=False )

param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Collator operates on HoloViews objects, if vdims are specified a value_transform function must also be supplied.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Collator, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The group is used to describe the NdElement.
param Boolean drop_constant ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether to demote any non-varying key dimensions to constant dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param Parameter progress_bar ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The progress bar instance used to report progress. Set to None to disable progress bars.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param List filters ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
List of paths to drop when collating data, specified as strings or tuples.
param Callable value_transform ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
If supplied the function will be applied on each Collator value during collation. This may be used to apply an operation to the data or load references from disk before they are collated into a displayable HoloViews object.
param List drop ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
List of dimensions to drop when collating data, specified as strings.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

aggregate ( dimensions , function , **kwargs )

Allows aggregating.

cell_type ( row , col )

Returns the cell type given a row and column index. The common basic cell types are ‘data’ and ‘heading’.

clone ( data=None , shared_data=True , *args , **overrides )

Overrides Dimensioned clone to avoid checking items if data is unchanged.

closest ( coords )

Class method that returns the exact keys for a given list of coordinates. The supplied bounds defines the extent within which the samples are drawn and the optional shape argument is the shape of the numpy array (typically the shape of the .data attribute) when applicable.

collapse_data ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Creates a pandas DataFrame from the stored keys and data.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

merge_type

alias of HoloMap

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_cell ( row , col )

Get the formatted cell value for the given row and column indices.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=[] , function=None , **reduce_map )

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

reindex ( kdims=None , vdims=None , force=False )

Create a new object with a re-ordered set of dimensions. Allows converting key dimensions to value dimensions and vice versa.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

sample ( samples=[] )

Allows sampling of the Table with a list of samples.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

static_dimensions

Return all constant dimensions.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Dimension ( name , **params ) [source]

Bases: param.parameterized.Parameterized

Dimension objects are used to specify some important general features that may be associated with a collection of values.

For instance, a Dimension may specify that a set of numeric values actually correspond to ‘Height’ (dimension name), in units of meters, and that allowed values must be floats greater than zero.

In addition, Dimensions can be declared as cyclic, support categorical data using a finite set of allowed, ordered values and support a custom, pretty-printed representation.

param Boolean cyclic ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether the range of this feature is cyclic such that the maximum allowed value (defined by the range parameter) is continuous with the minimum allowed value.
param Tuple soft_range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
Specifies a minimum and maximum reference value, which may be overridden by the data.
param Tuple range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
Specifies the minimum and maximum allowed values for a Dimension. None is used to represent an unlimited bound.
param ClassSelector values ( allow_None=False, constant=False, default=[], instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
Optional set of allowed values for the dimension that can also be used to retain a categorical ordering. Setting values to ‘initial’ indicates that the values will be added during construction.
param Parameter type ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Optional type associated with the Dimension values. The type may be an inbuilt constructor (such as int, str, float) or a custom class object.
param String unit ( allow_None=True, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Optional unit string associated with the Dimension. For instance, the string ‘m’ may be used represent units of meters and ‘s’ to represent units of seconds.
param Callable value_format ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Formatting function applied to each value before display.
debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object>
get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_label

The pretty-printed label string for the Dimension

pprint_value ( value ) [source]

Applies the defined formatting to the value.

pprint_value_string ( value ) [source]

Pretty prints the dimension name and value using the global title_format variable, including the unit string (if set). Numeric types are printed to the stated rounding level.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. AdjointLayout ( data , **params ) [source]

Bases: holoviews.core.dimension.Dimensioned

A AdjointLayout provides a convenient container to lay out a primary plot with some additional supplemental plots, e.g. an image in a Image annotated with a luminance histogram. AdjointLayout accepts a list of three ViewableElement elements, which are laid out as follows with the names ‘main’, ‘top’ and ‘right’:

___________ __

|____ 3_____|__| | | | 1: main | | | 2: right | 1 |2 | 3: top | | | |___________|__|

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Dimensioned, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘AdjointLayout’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. DynamicMap ( callback , initial_items=None , **params ) [source]

Bases: holoviews.core.spaces.HoloMap

A DynamicMap is a type of HoloMap where the elements are dynamically generated by a callback which may be either a callable or a generator. A DynamicMap supports two different modes depending on the type of callable supplied and the dimension declarations.

The ‘bounded’ mode is used when the limits of the parameter space are known upon declaration (as specified by the ranges on the key dimensions) or ‘open’ which allows the continual generation of elements (e.g as data output by a simulator over an unbounded simulated time dimension).

Generators always imply open mode but a callable that has any key dimension unbounded in any direction will also be in open mode. Bounded mode only applied to callables where all the key dimensions are fully bounded.

param Boolean sampled ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Allows defining a DynamicMap in bounded mode without defining the dimension bounds or values. The DynamicMap may then be explicitly sampled via getitem or the sampling is determined during plotting by a HoloMap with fixed sampling.
param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param Parameter callback ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The callable or generator used to generate the elements. In the simplest case where all key dimensions are bounded, this can be a callable that accepts the key dimension values as arguments (in the declared order) and returns the corresponding element. For open mode where there is an unbounded key dimension, the return type can specify a key as well as element as the tuple (key, element). If no key is supplied, a simple counter is used instead. If the callback is a generator, open mode is used and next() is simply called. If the callback is callable and in open mode, the element counter value will be supplied as the single argument. This can be used to avoid issues where multiple elements in a Layout each call next() leading to uncontrolled changes in simulator state (the counter can be used to indicate simulation time across the layout).
param Integer cache_interval ( allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
When the element counter modulo the cache_interval is zero, the element will be cached and therefore accessible when casting to a HoloMap. Applicable in open mode only.
param Integer cache_size ( allow_None=False, bounds=None, constant=False, default=500, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=False, time_fn=<Time Time00001> )
The number of entries to cache for fast access. This is an LRU cache where the least recently used item is overwritten once the cache is full.
param List streams ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
List of Stream instances to associate with the DynamicMap. The set of parameter values across these streams will be supplied as keyword arguments to the callback when the events are received, updating the streams. Note that streams may only be used with callable callbacks (i.e not generators).
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides ) [source]

Clone method to adapt the slightly different signature of DynamicMap that also overrides Dimensioned clone to avoid checking items if data is unchanged.

collapse ( dimensions=None , function=None , spreadfn=None , **kwargs )

Allows collapsing one of any number of key dimensions on the HoloMap. Homogenous Elements may be collapsed by supplying a function, inhomogenous elements are merged.

collate ( merge_type=None , drop=[] , drop_constant=False )

Collation allows collapsing nested HoloMaps by merging their dimensions. In the simple case a HoloMap containing other HoloMaps can easily be joined in this way. However collation is particularly useful when the objects being joined are deeply nested, e.g. you want to join multiple Layouts recorded at different times, collation will return one Layout containing HoloMaps indexed by Time. Changing the merge_type will allow merging the outer Dimension into any other UniformNdMapping type.

Specific dimensions may be dropped if they are redundant by supplying them in a list. Enabling drop_constant allows ignoring any non-varying dimensions during collation.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

event ( trigger=True , **kwargs ) [source]

This method allows any of the available stream parameters to be updated in an event.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions=None , container_type=None , group_type=None , **kwargs ) [source]

Implements a dynamic version of a groupby, which will intelligently expand either the inner or outer dimensions depending on whether the container_type or group_type is dynamic.

To apply a groupby to a DynamicMap the dimensions, which are expanded into a non-dynamic type must define a fixed sampling via the values attribute.

Using the dynamic groupby makes it incredibly easy to generate dynamic views into a high-dimensional space while taking advantage of the capabilities of NdOverlay, GridSpace and NdLayout types to visualize more than one Element at a time.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

next ( ) [source]

Interface for ‘open’ mode. For generators, this simply calls the next() method. For callables callback, the counter is supplied as a single argument.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions ) [source]

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=None , function=None , **reduce_map )

Reduce each Element in the HoloMap using a function supplied via the kwargs, where the keyword has to match a particular dimension in the Elements.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=1 ) [source]

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

reset ( ) [source]

Return a cleared dynamic map with a cleared cached and a reset counter.

sample ( samples=[] , bounds=None , **sample_values )

Sample each Element in the UniformNdMapping by passing either a list of samples or a tuple specifying the number of regularly spaced samples per dimension. Alternatively, a single sample may be requested using dimension-value pairs. Optionally, the bounds argument can be used to specify the bounding extent from which the coordinates are to regularly sampled. Regular sampling assumes homogenous and regularly sampled data.

For 1D sampling, the shape is simply as the desired number of samples (and not a tuple). The bounds format for 1D sampling is the tuple (lower, upper) and the tuple (left, bottom, right, top) for 2D sampling.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs ) [source]

Allows slicing or indexing into the DynamicMap objects by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection and applies to dynamically generated items by wrapping the callback.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
split_overlays ( )

Given a UniformNdMapping of Overlays of N layers, split out the layers into N separate Maps.

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. NdOverlay ( overlays=None , **params ) [source]

Bases: holoviews.core.ndmapping.UniformNdMapping , holoviews.core.overlay.CompositeOverlay , holoviews.core.overlay.Overlayable

An NdOverlay allows a group of NdOverlay to be overlaid together. NdOverlay can be indexed out of an overlay and an overlay is an iterable that iterates over the contained layers.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Element’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
List of dimensions the NdOverlay can be indexed by.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. UniformNdMapping ( initial_items=None , group=None , label=None , **params ) [source]

Bases: holoviews.core.ndmapping.NdMapping

A UniformNdMapping is a map of Dimensioned objects and is itself indexed over a number of specified dimensions. The dimension may be a spatial dimension (i.e., a ZStack), time (specifying a frame sequence) or any other combination of Dimensions.

UniformNdMapping objects can be sliced, sampled, reduced, overlaid and split along its and its containing Views dimensions. Subclasses should implement the appropriate slicing, sampling and reduction methods for their Dimensioned type.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides ) [source]

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( ) [source]

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. BoundingEllipse ( **args ) [source]

Bases: holoviews.core.boundingregion.BoundingBox

Similar to BoundingBox, but the region is the ellipse inscribed within the rectangle.

centroid ( )

Return the coordinates of the center of this BoundingBox

contains_exclusive ( x , y )

Return True if the given point is contained within the bounding box, where the bottom and right boundaries are considered exclusive.

containsbb_exclusive ( x )

Returns true if the given BoundingBox x is contained within the bounding box, where at least one of the boundaries of the box has to be exclusive.

containsbb_inclusive ( x )

Returns true if the given BoundingBox x is contained within the bounding box, including cases of exact match.

lbrt ( )

return left,bottom,right,top values for the BoundingBox.

upperexclusive_contains ( x , y )

Returns true if the given point is contained within the bounding box, where the right and upper boundaries are exclusive, and the left and lower boundaries are inclusive. Useful for tiling a plane into non-overlapping regions.

class holoviews.core. Element ( data , **params ) [source]

Bases: holoviews.core.dimension.ViewableElement , holoviews.core.layout.Composable , holoviews.core.overlay.Overlayable

Element is the baseclass for all ViewableElement types, with an x- and y-dimension. Subclasses should define the data storage in the constructor, as well as methods and properties, which define how the data maps onto the x- and y- and value dimensions.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Element, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

closest ( coords ) [source]

Class method that returns the exact keys for a given list of coordinates. The supplied bounds defines the extent within which the samples are drawn and the optional shape argument is the shape of the numpy array (typically the shape of the .data attribute) when applicable.

classmethod collapse_data ( data , function=None , kdims=None , **kwargs ) [source]

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs ) [source]

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=[] , function=None , **reduce_map ) [source]

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

sample ( samples=[] , **sample_values ) [source]

Base class signature to demonstrate API for sampling Elements. To sample an Element supply either a list of sampels or keyword arguments, where the key should match an existing key dimension on the Element.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None ) [source]

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. NdElement ( data=None , **params ) [source]

Bases: holoviews.core.ndmapping.NdMapping , holoviews.core.element.Tabular

An NdElement is an Element that stores the contained data as an NdMapping. In addition to the usual multi-dimensional keys of NdMappings, NdElements also support multi-dimensional values. The values held in a multi-valued NdElement are tuples, where each component of the tuple maps to a column as described by the value dimensions parameter.

In other words, the data of a NdElement are partitioned into two groups: the columns based on the key and the value columns that contain the components of the value tuple.

One feature of NdElements is that they support an additional level of index over NdMappings: the last index may be a column name or a slice over the column names (using alphanumeric ordering).

param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘Data’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The dimension description(s) of the values held in data tuples that map to the value columns of the table. Note: String values may be supplied in the constructor which will then be promoted to Dimension objects.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdElement, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The group is used to describe the NdElement.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

aggregate ( dimensions , function , **kwargs ) [source]

Allows aggregating.

cell_type ( row , col )

Returns the cell type given a row and column index. The common basic cell types are ‘data’ and ‘heading’.

clone ( data=None , shared_data=True , *args , **overrides )

Overrides Dimensioned clone to avoid checking items if data is unchanged.

closest ( coords )

Class method that returns the exact keys for a given list of coordinates. The supplied bounds defines the extent within which the samples are drawn and the optional shape argument is the shape of the numpy array (typically the shape of the .data attribute) when applicable.

collapse_data ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Creates a pandas DataFrame from the stored keys and data.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_cell ( row , col )

Get the formatted cell value for the given row and column indices.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=[] , function=None , **reduce_map )

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

reindex ( kdims=None , vdims=None , force=False ) [source]

Create a new object with a re-ordered set of dimensions. Allows converting key dimensions to value dimensions and vice versa.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

sample ( samples=[] ) [source]

Allows sampling of the Table with a list of samples.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( ) [source]

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. NdLayout ( initial_items=None , **params ) [source]

Bases: holoviews.core.ndmapping.UniformNdMapping

NdLayout is a UniformNdMapping providing an n-dimensional data structure to display the contained Elements and containers in a layout. Using the cols method the NdLayout can be rearranged with the desired number of columns.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Gets a dframe for each Element in the HoloMap, appends the dimensions of the HoloMap as series and concatenates the dframes.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
grid_items ( ) [source]

Compute a dict of {(row,column): (key, value)} elements from the current set of items and specified number of columns.

groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns another NdLayout constituted of the last views of the individual elements (if they are maps).

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

type

The type of elements stored in the map.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. CompositeOverlay ( data , **params ) [source]

Bases: holoviews.core.dimension.ViewableElement , holoviews.core.layout.Composable

CompositeOverlay provides a common baseclass for Overlay classes.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=ViewableElement, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. NdMapping ( initial_items=None , **params ) [source]

Bases: holoviews.core.ndmapping.MultiDimensionalMapping

NdMapping supports the same indexing semantics as MultiDimensionalMapping but also supports slicing semantics.

Slicing semantics on an NdMapping is dependent on the ordering semantics of the keys. As MultiDimensionalMapping sort the keys, a slice on an NdMapping is effectively a way of filtering out the keys that are outside the slice range.

param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

clone ( data=None , shared_data=True , *args , **overrides )

Overrides Dimensioned clone to avoid checking items if data is unchanged.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( )

Creates a pandas DataFrame from the stored keys and data.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

drop_dimension ( dimensions )

Returns a new mapping with the named dimension(s) removed.

force_new_dynamic_value = <functools.partial object>
get ( key , default=None )

Standard get semantics for all mapping types

get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions , container_type=None , group_type=None , **kwargs )

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map.

info

Prints information about the Dimensioned object, including the number and type of objects contained within it and information about its dimensions.

inspect_value = <functools.partial object>
items ( )

Returns all elements as a list in (key,value) format.

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reindex ( kdims=[] , force=False )

Create a new object with a re-ordered or reduced set of key dimensions.

Reducing the number of key dimensions will discard information from the keys. All data values are accessible in the newly created object as the new labels must be sufficient to address each value uniquely.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

update ( other )

Updates the current mapping with some other mapping or OrderedDict instance, making sure that they are indexed along the same set of dimensions. The order of key dimensions remains unchanged after the update.

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. SheetCoordinateSystem ( bounds , xdensity , ydensity=None ) [source]

Bases: object

Provides methods to allow conversion between sheet and matrix coordinates.

closest_cell_center ( x , y ) [source]

Given arbitary sheet coordinates, return the sheet coordinates of the center of the closest unit.

matrix2sheet ( float_row , float_col ) [source]

Convert a floating-point location (float_row,float_col) in matrix coordinates to its corresponding location (x,y) in sheet coordinates.

Valid for scalar or array float_row and float_col.

Inverse of sheet2matrix().

matrixidx2sheet ( row , col ) [source]

Return (x,y) where x and y are the floating point coordinates of the center of the given matrix cell (row,col). If the matrix cell represents a 0.2 by 0.2 region, then the center location returned would be 0.1,0.1.

NOTE: This is NOT the strict mathematical inverse of sheet2matrixidx(), because sheet2matrixidx() discards all but the integer portion of the continuous matrix coordinate.

Valid only for scalar or array row and col.

sheet2matrix ( x , y ) [source]

Convert a point (x,y) in Sheet coordinates to continuous matrix coordinates.

Returns (float_row,float_col), where float_row corresponds to y, and float_col to x.

Valid for scalar or array x and y.

Note about Bounds For a Sheet with BoundingBox(points=((-0.5,-0.5),(0.5,0.5))) and density=3, x=-0.5 corresponds to float_col=0.0 and x=0.5 corresponds to float_col=3.0. float_col=3.0 is not inside the matrix representing this Sheet, which has the three columns (0,1,2). That is, x=-0.5 is inside the BoundingBox but x=0.5 is outside. Similarly, y=0.5 is inside (at row 0) but y=-0.5 is outside (at row 3) (it’s the other way round for y because the matrix row index increases as y decreases).

sheet2matrixidx ( x , y ) [source]

Convert a point (x,y) in sheet coordinates to the integer row and column index of the matrix cell in which that point falls, given a bounds and density. Returns (row,column).

Note that if coordinates along the right or bottom boundary are passed into this function, the returned matrix coordinate of the boundary will be just outside the matrix, because the right and bottom boundaries are exclusive.

Valid for scalar or array x and y.

sheetcoordinates_of_matrixidx ( ) [source]

Return x,y where x is a vector of sheet coordinates representing the x-center of each matrix cell, and y represents the corresponding y-center of the cell.

xdensity

The spacing between elements in an underlying matrix representation, in the x direction.

ydensity

The spacing between elements in an underlying matrix representation, in the y direction.

class holoviews.core. Dimensioned ( data , **params ) [source]

Bases: holoviews.core.dimension.LabelledData

Dimensioned is a base class that allows the data contents of a class to be associated with dimensions. The contents associated with dimensions may be partitioned into one of three types

  • key dimensions: These are the dimensions that can be indexed via

    the __getitem__ method. Dimension objects supporting key dimensions must support indexing over these dimensions and may also support slicing. This list ordering of dimensions describes the positional components of each multi-dimensional indexing operation.

    For instance, if the key dimension names are ‘weight’ followed by ‘height’ for Dimensioned object ‘obj’, then obj[80,175] indexes a weight of 80 and height of 175.

    Accessed using either kdims or key_dimensions.

  • value dimensions: These dimensions correspond to any data held

    on the Dimensioned object not in the key dimensions. Indexing by value dimension is supported by dimension name (when there are multiple possible value dimensions); no slicing semantics is supported and all the data associated with that dimension will be returned at once. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either vdims or value_dimensions.

  • deep dimensions: These are dynamically computed dimensions that

    belong to other Dimensioned objects that are nested in the data. Objects that support this should enable the _deep_indexable flag. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either ddims or deep_dimensions.

Dimensioned class support generalized methods for finding the range and type of values along a particular Dimension. The range method relies on the appropriate implementation of the dimension_values methods on subclasses.

The index of an arbitrary dimension is its positional index in the list of all dimensions, starting with the key dimensions, followed by the value dimensions and ending with the deep dimensions.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Dimensioned, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True ) [source]

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False ) [source]

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False ) [source]

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim ) [source]

Returns the index of the requested dimension.

get_dimension_type ( dim ) [source]

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True ) [source]

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions ) [source]

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs ) [source]

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. AttrTree ( items=None , identifier=None , parent=None , dir_mode='default' ) [source]

Bases: object

An AttrTree offers convenient, multi-level attribute access for collections of objects. AttrTree objects may also be combined together using the update method or merge classmethod. Here is an example of adding a ViewableElement to an AttrTree and accessing it:

>>> t = AttrTree()
>>> t.Example.Path = 1
>>> t.Example.Path                             
1
filter ( path_filters ) [source]

Filters the loaded AttrTree using the supplied path_filters.

fixed

If fixed, no new paths can be created via attribute access

classmethod merge ( trees ) [source]

Merge a collection of AttrTree objects.

path

Returns the path up to the root for the current node.

set_path ( path , val ) [source]

Set the given value at the supplied path where path is either a tuple of strings or a string in A.B.C format.

update ( other ) [source]

Updated the contents of the current AttrTree with the contents of a second AttrTree.

class holoviews.core. ViewableElement ( data , **params ) [source]

Bases: holoviews.core.dimension.Dimensioned

A ViewableElement is a dimensioned datastructure that may be associated with a corresponding atomic visualization. An atomic visualization will display the data on a single set of axes (i.e. excludes multiple subplots that are displayed at once). The only new parameter introduced by ViewableElement is the title associated with the object for display.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=ViewableElement, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Dataset ( data , **kwargs ) [source]

Bases: holoviews.core.element.Element

Dataset provides a general baseclass for Element types that contain structured data and supports a range of data formats.

The Dataset class supports various methods offering a consistent way of working with the stored data regardless of the storage format used. These operations include indexing, selection and various ways of aggregating or collapsing the data with a supplied function.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Element, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs ) [source]

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

aggregate ( dimensions=None , function=None , spreadfn=None , **kwargs ) [source]

Aggregates over the supplied key dimensions with the defined function.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

closest ( coords ) [source]

Given single or multiple samples along the first key dimension will return the closest actual sample coordinates.

collapse_data ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dframe ( dimensions=None ) [source]

Returns the data in the form of a DataFrame.

dimension_values ( dim , expanded=True , flat=True ) [source]

Returns the values along a particular dimension. If unique values are requested will return only unique values.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim ) [source]

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs ) [source]

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True ) [source]

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

redim ( specs=None , **dimensions ) [source]

Replace dimensions on the dataset and allows renaming dimensions in the dataset. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=[] , function=None , spreadfn=None , **reduce_map ) [source]

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

reindex ( kdims=None , vdims=None ) [source]

Create a new object with a re-ordered set of dimensions. Allows converting key dimensions to value dimensions and vice versa.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

sample ( samples=[] ) [source]

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **selection ) [source]

Allows selecting data by the slices, sets and scalar values along a particular dimension. The indices should be supplied as keywords mapping between the selected dimension and value. Additionally selection_specs (taking the form of a list of type.group.label strings, types or functions) may be supplied, which will ensure the selection is only applied if the specs match the selected object.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] ) [source]

Sorts the data by the values along the supplied dimensions.

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

to

Property to create a conversion interface with methods to convert to other Element types.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. Tabular ( data , **params ) [source]

Bases: holoviews.core.element.Element

Baseclass to give an NdMapping objects an API to generate a table representation.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Element, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
cell_type ( row , col ) [source]

Returns the cell type given a row and column index. The common basic cell types are ‘data’ and ‘heading’.

clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

closest ( coords )

Class method that returns the exact keys for a given list of coordinates. The supplied bounds defines the extent within which the samples are drawn and the optional shape argument is the shape of the numpy array (typically the shape of the .data attribute) when applicable.

collapse_data ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True )

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

inspect_value = <functools.partial object>
map ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

matches ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_cell ( row , col ) [source]

Get the formatted cell value for the given row and column indices.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

redim ( specs=None , **dimensions )

Replaces existing dimensions in an object with new dimensions or changing specific attributes of a dimensions. Dimension mapping should map between the old dimension name and a dictionary of the new attributes, a completely new dimension or a new string name.

reduce ( dimensions=[] , function=None , **reduce_map )

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

relabel ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

sample ( samples=[] , **sample_values )

Base class signature to demonstrate API for sampling Elements. To sample an Element supply either a list of sampels or keyword arguments, where the key should match an existing key dimension on the Element.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

table ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

traverse ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core. BoundingBox ( **args ) [source]

Bases: holoviews.core.boundingregion.BoundingRegion

A rectangular bounding box defined either by two points forming an axis-aligned rectangle (or simply a radius for a square).

centroid ( )

Return the coordinates of the center of this BoundingBox

contains ( x , y ) [source]

Returns true if the given point is contained within the bounding box, where all boundaries of the box are considered to be inclusive.

contains_exclusive ( x , y ) [source]

Return True if the given point is contained within the bounding box, where the bottom and right boundaries are considered exclusive.

containsbb_exclusive ( x ) [source]

Returns true if the given BoundingBox x is contained within the bounding box, where at least one of the boundaries of the box has to be exclusive.

containsbb_inclusive ( x ) [source]

Returns true if the given BoundingBox x is contained within the bounding box, including cases of exact match.

lbrt ( ) [source]

return left,bottom,right,top values for the BoundingBox.

upperexclusive_contains ( x , y ) [source]

Returns true if the given point is contained within the bounding box, where the right and upper boundaries are exclusive, and the left and lower boundaries are inclusive. Useful for tiling a plane into non-overlapping regions.

class holoviews.core. ElementOperation ( **params ) [source]

Bases: holoviews.core.operation.Operation

An ElementOperation process an Element or HoloMap at the level of individual elements or overlays. If a holomap is passed in as input, a processed holomap is returned as output where the individual elements have been transformed accordingly. An ElementOperation may turn overlays in new elements or vice versa.

An ElementOperation can be set to be dynamic, which will return a DynamicMap with a callback that will apply the operation dynamically. An ElementOperation may also supply a list of Stream classes on a streams parameter, which can allow dynamic control over the parameters on the operation.

param ClassSelector input_ranges ( allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
Ranges to be used for input normalization (if applicable) in a format appropriate for the Normalization.ranges parameter. By default, no normalization is applied. If key-wise normalization is required, a 2-tuple may be supplied where the first component is a Normalization.ranges list and the second component is Normalization.keys.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Operation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The group string used to identify the output of the Operation. By default this should match the operation name.
param ObjectSelector dynamic ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=default, instantiate=False, objects=[‘default’, True, False], pickle_default_value=True, precedence=None, readonly=False )
Whether the operation should be applied dynamically when a specific frame is requested, specified as a Boolean. If set to ‘default’ the mode will be determined based on the input type, i.e. if the data is a DynamicMap it will stay dynamic.
debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object>
get_overlay_bounds ( overlay )

Returns the extents if all the elements of an overlay agree on a consistent extents, otherwise raises an exception.

get_overlay_label ( overlay , default_label='' )

Returns a label if all the elements of an overlay agree on a consistent label, otherwise returns the default label.

get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
instance = <functools.partial object>
message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix='\n ' , unknown_value='<?>' , qualify=False , separator='' )

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

process_element ( element , key , **params ) [source]

The process_element method allows a single element to be operated on given an externally supplied key.

script_repr ( imports=[] , prefix=' ' )

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

search ( element , pattern )

Helper method that returns a list of elements that match the given path pattern of form {type}.{group}.{label}.

The input may be a Layout, an Overlay type or a single Element.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.


boundingregion Module

Inheritance diagram of holoviews.core.boundingregion

Bounding regions and bounding boxes.

File originally part of the Topographica project.

class holoviews.core.boundingregion. AARectangle ( *points ) [source]

Bases: object

Axis-aligned rectangle class.

Defines the smallest axis-aligned rectangle that encloses a set of points.

Usage: aar = AARectangle( (x1,y1),(x2,y2), ... , (xN,yN) )

bottom ( ) [source]

Return the y-coordinate of the bottom of the rectangle.

centroid ( ) [source]

Return the centroid of the rectangle.

lbrt ( ) [source]

Return (left,bottom,right,top) as a tuple.

left ( ) [source]

Return the x-coordinate of the left side of the rectangle.

right ( ) [source]

Return the x-coordinate of the right side of the rectangle.

top ( ) [source]

Return the y-coordinate of the top of the rectangle.

class holoviews.core.boundingregion. BoundingBox ( **args ) [source]

Bases: holoviews.core.boundingregion.BoundingRegion

A rectangular bounding box defined either by two points forming an axis-aligned rectangle (or simply a radius for a square).

centroid ( )

Return the coordinates of the center of this BoundingBox

contains ( x , y ) [source]

Returns true if the given point is contained within the bounding box, where all boundaries of the box are considered to be inclusive.

contains_exclusive ( x , y ) [source]

Return True if the given point is contained within the bounding box, where the bottom and right boundaries are considered exclusive.

containsbb_exclusive ( x ) [source]

Returns true if the given BoundingBox x is contained within the bounding box, where at least one of the boundaries of the box has to be exclusive.

containsbb_inclusive ( x ) [source]

Returns true if the given BoundingBox x is contained within the bounding box, including cases of exact match.

lbrt ( ) [source]

return left,bottom,right,top values for the BoundingBox.

upperexclusive_contains ( x , y ) [source]

Returns true if the given point is contained within the bounding box, where the right and upper boundaries are exclusive, and the left and lower boundaries are inclusive. Useful for tiling a plane into non-overlapping regions.

class holoviews.core.boundingregion. BoundingEllipse ( **args ) [source]

Bases: holoviews.core.boundingregion.BoundingBox

Similar to BoundingBox, but the region is the ellipse inscribed within the rectangle.

centroid ( )

Return the coordinates of the center of this BoundingBox

contains_exclusive ( x , y )

Return True if the given point is contained within the bounding box, where the bottom and right boundaries are considered exclusive.

containsbb_exclusive ( x )

Returns true if the given BoundingBox x is contained within the bounding box, where at least one of the boundaries of the box has to be exclusive.

containsbb_inclusive ( x )

Returns true if the given BoundingBox x is contained within the bounding box, including cases of exact match.

lbrt ( )

return left,bottom,right,top values for the BoundingBox.

upperexclusive_contains ( x , y )

Returns true if the given point is contained within the bounding box, where the right and upper boundaries are exclusive, and the left and lower boundaries are inclusive. Useful for tiling a plane into non-overlapping regions.

class holoviews.core.boundingregion. BoundingRegion [source]

Bases: object

Abstract bounding region class, for any portion of a 2D plane.

Only subclasses can be instantiated directly.

centroid ( ) [source]

Return the coordinates of the center of this BoundingBox

holoviews.core.boundingregion. BoundingRegionParameter [source]

Parameter whose value can be any BoundingRegion instance, enclosing a region in a 2D plane.


dimension Module

Inheritance diagram of holoviews.core.dimension

Provides Dimension objects for tracking the properties of a value, axis or map dimension. Also supplies the Dimensioned abstract baseclass for classes that accept Dimension values.

class holoviews.core.dimension. Dimension ( name , **params ) [source]

Bases: param.parameterized.Parameterized

Dimension objects are used to specify some important general features that may be associated with a collection of values.

For instance, a Dimension may specify that a set of numeric values actually correspond to ‘Height’ (dimension name), in units of meters, and that allowed values must be floats greater than zero.

In addition, Dimensions can be declared as cyclic, support categorical data using a finite set of allowed, ordered values and support a custom, pretty-printed representation.

param Boolean cyclic ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Whether the range of this feature is cyclic such that the maximum allowed value (defined by the range parameter) is continuous with the minimum allowed value.
param Tuple soft_range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
Specifies a minimum and maximum reference value, which may be overridden by the data.
param Tuple range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False )
Specifies the minimum and maximum allowed values for a Dimension. None is used to represent an unlimited bound.
param ClassSelector values ( allow_None=False, constant=False, default=[], instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
Optional set of allowed values for the dimension that can also be used to retain a categorical ordering. Setting values to ‘initial’ indicates that the values will be added during construction.
param Parameter type ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Optional type associated with the Dimension values. The type may be an inbuilt constructor (such as int, str, float) or a custom class object.
param String unit ( allow_None=True, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Optional unit string associated with the Dimension. For instance, the string ‘m’ may be used represent units of meters and ‘s’ to represent units of seconds.
param Callable value_format ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Formatting function applied to each value before display.
debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object>
get_param_values ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object>
inspect_value = <functools.partial object>
message ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

params ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_label

The pretty-printed label string for the Dimension

pprint_value ( value ) [source]

Applies the defined formatting to the value.

pprint_value_string ( value ) [source]

Pretty prints the dimension name and value using the global title_format variable, including the unit string (if set). Numeric types are printed to the stated rounding level.

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class holoviews.core.dimension. Dimensioned ( data , **params ) [source]

Bases: holoviews.core.dimension.LabelledData

Dimensioned is a base class that allows the data contents of a class to be associated with dimensions. The contents associated with dimensions may be partitioned into one of three types

  • key dimensions: These are the dimensions that can be indexed via

    the __getitem__ method. Dimension objects supporting key dimensions must support indexing over these dimensions and may also support slicing. This list ordering of dimensions describes the positional components of each multi-dimensional indexing operation.

    For instance, if the key dimension names are ‘weight’ followed by ‘height’ for Dimensioned object ‘obj’, then obj[80,175] indexes a weight of 80 and height of 175.

    Accessed using either kdims or key_dimensions.

  • value dimensions: These dimensions correspond to any data held

    on the Dimensioned object not in the key dimensions. Indexing by value dimension is supported by dimension name (when there are multiple possible value dimensions); no slicing semantics is supported and all the data associated with that dimension will be returned at once. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either vdims or value_dimensions.

  • deep dimensions: These are dynamically computed dimensions that

    belong to other Dimensioned objects that are nested in the data. Objects that support this should enable the _deep_indexable flag. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either ddims or deep_dimensions.

Dimensioned class support generalized methods for finding the range and type of values along a particular Dimension. The range method relies on the appropriate implementation of the dimension_values methods on subclasses.

The index of an arbitrary dimension is its positional index in the list of all dimensions, starting with the key dimensions, followed by the value dimensions and ending with the deep dimensions.

param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Dimensioned, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
clone ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

dimension_values ( dimension , expanded=True , flat=True ) [source]

Returns the values along the specified dimension. This method must be implemented for all Dimensioned type.

dimensions ( selection=u'all' , label=False ) [source]

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

force_new_dynamic_value = <functools.partial object>
get_dimension ( dimension <