holoviews.core Package


core Package

class holoviews.core. Operation ( **params ) [source]

Bases: param.parameterized.ParameterizedFunction

An Operation 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 Operation may turn overlays in new elements or vice versa.

An Operation can be set to be dynamic, which will return a DynamicMap with a callback that will apply the operation dynamically. An Operation may also supply a list of Stream classes on a streams parameter, which can allow dynamic control over the parameters on the operation.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=False, default=Operation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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, names=None, objects=[‘default’, True, False], pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
param ClassSelector input_ranges ( allow_None=True, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean link_inputs ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
If the operation is dynamic, whether or not linked streams should be transferred from the operation inputs for backends that support linked streams. For example if an operation is applied to a DynamicMap with an RangeXY, this switch determines whether the corresponding visualization should update this stream with range changes originating from the newly generated axes.
param List streams ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
List of streams that are applied if dynamic=True, allowing for dynamic interaction with the plot.
debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
classmethod get_overlay_bounds ( overlay ) [source]

Returns the extents if all the elements of an overlay agree on a consistent extents, otherwise raises an exception.

classmethod get_overlay_label ( overlay , default_label='' ) [source]

Returns a label if all the elements of an overlay agree on a consistent label, otherwise returns the default label.

get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
instance = functools.partial(<function ParameterizedFunction.instance>, <class 'holoviews.core.operation.Operation'>)
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

params ( *args , **kwargs )

Inspect .param.params method for the full docstring

pprint ( imports=None , prefix='\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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

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

classmethod search ( element , pattern ) [source]

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 ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.operation.Operation'>)
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. CompositeOverlay ( data , kdims=None , vdims=None , **params ) [source]

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

CompositeOverlay provides a common baseclass for Overlay classes.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=ViewableElement, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , index=0 , **kwargs ) [source]

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram index (int, optional): Index of layer to apply hist to
Returns:
AdjointLayout of element and histogram or just the histogram
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.CompositeOverlay'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

Bases: holoviews.core.dimension.Dimensioned

An AdjointLayout provides a convenient container to lay out some marginal plots next to a primary plot. This is often useful to display the marginal distributions of a plot next to the primary plot. AdjointLayout accepts a list of up to three elements, which are laid out as follows with the names ‘main’, ‘top’ and ‘right’:

3 | |

|___________|___| | | | 1: main | | | 2: right | 1 | 2 | 3: top | | | |___________|___|

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Dimensioned, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘AdjointLayout’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Applies to the main object in the AdjointLayout.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
get ( key , default=None ) [source]

Returns the viewable corresponding to the supplied string or integer based key.

Args:
key: Numeric or string index: 0) ‘main’ 1) ‘right’ 2) ‘top’ default: Value returned if key not found
Returns:
Indexed value or supplied default
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
group

Group inherited from main element

inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
label

Label inherited from main element

main

Returns the main element in the AdjointLayout

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

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
relabel ( label=None , group=None , depth=1 ) [source]

Clone object and apply new group and/or label.

Applies relabeling to child up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
right

Returns the right marginal element in the AdjointLayout

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.AdjointLayout'>)
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.

top

Returns the top marginal element in the AdjointLayout

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

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

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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[Dimension(‘Element’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
List of dimensions the NdOverlay can be indexed by.
param List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , index=0 , **kwargs )

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram index (int, optional): Index of layer to apply hist to
Returns:
AdjointLayout of element and histogram or just the histogram
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
items ( )

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

keys ( )

Returns the keys of all the elements.

label

Label inherited from items

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 )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.NdOverlay'>)
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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

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

A ViewableTree is an AttrTree with Viewable objects as its leaf nodes. It combines the tree like data structure of a tree while extending it with the deep indexable properties of Dimensioned and LabelledData objects.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=ViewableTree, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Concatenates values on all nodes with requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
classmethod from_values ( vals ) [source]

Deprecated method to construct tree from list of objects

get ( identifier , default=None )

Get a node of the AttrTree using its path string.

Args:
identifier: Path string of the node to return default: Value to return if no node is found
Returns:
The indexed node of the AttrTree
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
items ( )

Keys and nodes of the AttrTree

keys ( )

Keys of nodes in the AttrTree

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

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
merge ( trees )

Merge a collection of AttrTree objects.

message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

path

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

pop ( identifier , default=None )

Pop a node of the AttrTree using its path string.

Args:
identifier: Path string of the node to return default: Value to return if no node is found
Returns:
The node that was removed from the AttrTree
pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
regroup ( group ) [source]

Deprecated method to apply new group to items.

Equivalent functionality possible using:

ViewableTree(tree.relabel(group=’Group’).values())
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableTree'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
uniform

Whether items in tree have uniform dimensions

update ( other )

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

values ( )

Nodes of the AttrTree

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. ViewableElement ( data , kdims=None , vdims=None , **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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=ViewableElement, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.ViewableElement'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. Dimensioned ( data , kdims=None , vdims=None , **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.

  • 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.

  • 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.

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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Dimensioned, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False ) [source]

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
get_dimension ( dimension , default=None , strict=False ) [source]

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension ) [source]

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim ) [source]

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs ) [source]

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True ) [source]

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

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

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimensioned'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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 arbitrary 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. NdLayout ( initial_items=None , kdims=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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with 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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( *args , **overrides ) [source]

Clones the NdLayout, overriding data and parameters.

Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to * args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor
Returns:
Cloned NdLayout object
cols ( ncols ) [source]

Sets the maximum number of columns in the NdLayout.

Any items beyond the set number of cols will flow onto a new row. The number of columns control the indexing and display semantics of the NdLayout.

Args:
ncols (int): Number of columns to set on the NdLayout
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
grid_items ( ) [source]

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

group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
items ( )

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

keys ( )

Returns the keys of all the elements.

label

Label inherited from items

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 )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.NdLayout'>)
shape

Tuple indicating the number of rows and columns in the NdLayout.

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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. GridMatrix ( initial_items=None , kdims=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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
items ( )

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

keys ( full_grid=False )

Returns the keys of the GridSpace

Args:
full_grid (bool, optional): Return full cross-product of keys
Returns:
List of keys
label

Label inherited from items

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 )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridMatrix'>)
shape

Returns the 2D shape of the GridSpace as (rows, cols).

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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. Dataset ( data , kdims=None , vdims=None , **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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Dataset, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘xarray’, ‘dask’, ‘array’, ‘multitabular’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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).
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs ) [source]

Adds a dimension and its values to the Dataset

Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or array of values, matching the length o shape of the Dataset.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
aggregate ( dimensions=None , function=None , spreadfn=None , **kwargs ) [source]

Aggregates data on the supplied dimensions.

Aggregates over the supplied key dimensions with the defined function.

Args:
dimensions: Dimension(s) to aggregate on
Default to all key dimensions

function: Aggregation function to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.

** kwargs: Keyword arguments passed to the aggregation function

Returns:
Returns the aggregated Dataset
array ( dimensions=None )

Convert dimension values to columnar array.

Args:
dimensions: List of dimensions to return
Returns:
Array of columns corresponding to each dimension
clone ( data=None , shared_data=True , new_type=None , *args , **overrides ) [source]

Clones the object, overriding data and parameters.

Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to * args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor
Returns:
Cloned object
closest ( coords=[] , **kwargs ) [source]

Snaps coordinate(s) to closest coordinate in Dataset

Args:
coords: List of coordinates expressed as tuples ** kwargs: Coordinates defined as keyword pairs
Returns:
List of tuples of the snapped coordinates
Raises:
NotImplementedError: Raised if snapping is not supported
collapse_data ( data , function=None , kdims=None , **kwargs )

Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns ( dimensions=None ) [source]

Convert dimension values to a dictionary.

Returns a dictionary of column arrays along each dimension of the element.

Args:
dimensions: Dimensions to return as columns
Returns:
Dictionary of arrays for each dimension
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False ) [source]

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True ) [source]

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim ) [source]

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs ) [source]

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , **kwargs )

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram
Returns:
AdjointLayout of element and histogram or just the histogram
iloc

Returns iloc indexer with support for columnar indexing.

Returns an iloc object providing a convenient interface to slice and index into the Dataset using row and column indices. Allow selection by integer index, slice and list of integer indices and boolean arrays.

Examples:

  • Index the first row and column:

    dataset.iloc[0, 0]

  • Select rows 1 and 2 with a slice:

    dataset.iloc[1:3, :]

  • Select with a list of integer coordinates:

    dataset.iloc[[0, 2, 3]]

inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
mapping ( kdims=None , vdims=None , **kwargs )

Deprecated method to convert data to dictionary

matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

ndloc

Returns ndloc indexer with support for gridded indexing.

Returns an ndloc object providing nd-array like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multi-dimensional arrays using integer indices. The order of array indices is inverted relative to the Dataset key dimensions, e.g. an Image with key dimensions ‘x’ and ‘y’ can be indexed with image.ndloc[iy, ix] , where iy and ix are integer indices along the y and x dimensions.

Examples:

  • Index value in 2D array:

    dataset.ndloc[3, 1]

  • Slice along y-axis of 2D array:

    dataset.ndloc[2:5, :]

  • Vectorized (non-orthogonal) indexing along x- and y-axes:

    dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dim , data_range=True , dimension_range=True ) [source]

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reduce ( dimensions=[] , function=None , spreadfn=None , **reductions ) [source]

Applies reduction along the specified dimension(s).

Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:

Reducing with a list of dimensions, e.g.:

ds.reduce([‘x’], np.mean)

Defining a reduction using keywords, e.g.:

ds.reduce(x=np.mean)
Args:
dimensions: Dimension(s) to apply reduction on
Defaults to all key dimensions

function: Reduction operation to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.
** reductions: Keyword argument defining reduction
Allows reduction to be defined as keyword pair of dimension and function
Returns:
The Dataset after reductions have been applied.
reindex ( kdims=None , vdims=None ) [source]

Reindexes Dataset dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying key dimensions.x

Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
sample ( samples=[] , bounds=None , closest=True , **kwargs ) [source]

Samples values at supplied coordinates.

Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:

Sampling with a list of coordinates, e.g.:

ds.sample([(0, 0), (0.1, 0.2), …])

Sampling a range or grid of coordinates, e.g.:

1D: ds.sample(3) 2D: ds.sample((3, 3))

Sampling by keyword, e.g.:

ds.sample(x=0)
Args:

samples: List of nd-coordinates to sample bounds: Bounds of the region to sample

Defined as two-tuple for 1D sampling and four-tuple for 2D sampling.

closest: Whether to snap to closest coordinates ** kwargs: Coordinates specified as keyword pairs

Keywords of dimensions and scalar coordinates
Returns:
Element containing the sampled coordinates
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

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

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.data.Dataset'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False ) [source]

Sorts the data by the values along the supplied dimensions.

Args:
by: Dimension(s) to sort by reverse (bool, optional): Reverse sort order
Returns:
Sorted Dataset
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 )

Deprecated method to convert any Element to a Table.

to

Returns the conversion interface with methods to convert Dataset

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

Bases: holoviews.core.dimension.ViewableTree , holoviews.core.overlay.CompositeOverlay

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

Overlays along with elements 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).

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=ViewableTree, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
collapse ( function ) [source]

Deprecated method to collapse layers in the Overlay.

collate ( ) [source]

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

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Concatenates values on all nodes with requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
from_values ( vals )

Deprecated method to construct tree from list of objects

get ( identifier , default=None ) [source]

Get a layer in the Overlay.

Get a particular layer in the Overlay using its path string or an integer index.

Args:
identifier: Index or path string of the item to return default: Value to return if no item is found
Returns:
The indexed layer of the Overlay
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , index=0 , **kwargs )

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram index (int, optional): Index of layer to apply hist to
Returns:
AdjointLayout of element and histogram or just the histogram
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
items ( )

Keys and nodes of the AttrTree

keys ( )

Keys of nodes in the AttrTree

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

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
merge ( trees )

Merge a collection of AttrTree objects.

message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

path

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

pop ( identifier , default=None )

Pop a node of the AttrTree using its path string.

Args:
identifier: Path string of the node to return default: Value to return if no node is found
Returns:
The node that was removed from the AttrTree
pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
regroup ( group )

Deprecated method to apply new group to items.

Equivalent functionality possible using:

ViewableTree(tree.relabel(group=’Group’).values())
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.overlay.Overlay'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
uniform

Whether items in tree have uniform dimensions

update ( other )

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

values ( )

Nodes of the AttrTree

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. Element ( data , kdims=None , vdims=None , **params ) [source]

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

Element is the atomic datastructure used to wrap some data with an associated visual representation, e.g. an element may represent a set of points, an image or a curve. Elements provide a common API for interacting with data of different types and define how the data map to a set of dimensions and how those map to the visual representation.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Element, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
array ( dimensions=None ) [source]

Convert dimension values to columnar array.

Args:
dimensions: List of dimensions to return
Returns:
Array of columns corresponding to each dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
closest ( coords , **kwargs ) [source]

Snap list or dict of coordinates to closest position.

Args:
coords: List of 1D or 2D coordinates ** kwargs: Coordinates specified as keyword pairs
Returns:
List of tuples of the snapped coordinates
Raises:
NotImplementedError: Raised if snapping is not supported
classmethod collapse_data ( data , function=None , kdims=None , **kwargs ) [source]

Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False ) [source]

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , **kwargs ) [source]

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram
Returns:
AdjointLayout of element and histogram or just the histogram
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
mapping ( kdims=None , vdims=None , **kwargs ) [source]

Deprecated method to convert data to dictionary

matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reduce ( dimensions=[] , function=None , spreadfn=None , **reduction ) [source]

Applies reduction along the specified dimension(s).

Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:

Reducing with a list of dimensions, e.g.:

ds.reduce([‘x’], np.mean)

Defining a reduction using keywords, e.g.:

ds.reduce(x=np.mean)
Args:
dimensions: Dimension(s) to apply reduction on
Defaults to all key dimensions

function: Reduction operation to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.
** reductions: Keyword argument defining reduction
Allows reduction to be defined as keyword pair of dimension and function
Returns:
The element after reductions have been applied.
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
sample ( samples=[] , bounds=None , closest=False , **sample_values ) [source]

Samples values at supplied coordinates.

Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:

Sampling with a list of coordinates, e.g.:

ds.sample([(0, 0), (0.1, 0.2), …])

Sampling a range or grid of coordinates, e.g.:

1D: ds.sample(3) 2D: ds.sample((3, 3))

Sampling by keyword, e.g.:

ds.sample(x=0)
Args:

samples: List of nd-coordinates to sample bounds: Bounds of the region to sample

Defined as two-tuple for 1D sampling and four-tuple for 2D sampling.

closest: Whether to snap to closest coordinates ** kwargs: Coordinates specified as keyword pairs

Keywords of dimensions and scalar coordinates
Returns:
Element containing the sampled coordinates
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)
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]

Deprecated method to convert any Element to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

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

A HoloMap is an n-dimensional mapping of viewable elements or overlays. Each item in a HoloMap has an tuple key defining the values along each of the declared key dimensions, defining the discretely sampled space of values.

The visual representation of a HoloMap consists of the viewable objects inside the HoloMap which can be explored by varying one or more widgets mapping onto the key dimensions of the HoloMap.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with 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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
collapse ( dimensions=None , function=None , spreadfn=None , **kwargs ) [source]

Concatenates and aggregates along supplied dimensions

Useful to collapse stacks of objects into a single object, e.g. to average a stack of Images or Curves.

Args:
dimensions: Dimension(s) to collapse
Defaults to all key dimensions

function: Aggregation function to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.

** kwargs: Keyword arguments passed to the aggregation function

Returns:
Returns the collapsed element or HoloMap of collapsed elements
collate ( merge_type=None , drop=[] , drop_constant=False ) [source]

Collate allows reordering nested containers

Collation allows collapsing nested mapping types by merging their dimensions. In simple terms in merges nested containers into a single merged type.

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.

Args:
merge_type: Type of the object to merge with drop: List of dimensions to drop drop_constant: Drop constant dimensions automatically
Returns:
Collated Layout or HoloMap
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
grid ( dimensions=None , **kwargs ) [source]

Group by supplied dimension(s) and lay out groups in grid

Groups data by supplied dimension(s) laying the groups along the dimension(s) out in a GridSpace.

Args: dimensions: Dimension/str or list

Dimension or list of dimensions to group by
Returns:
GridSpace with supplied dimensions
group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs ) [source]

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram
Returns:
AdjointLayout of HoloMap and histograms or just the histograms
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
items ( )

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

keys ( )

Returns the keys of all the elements.

label

Label inherited from items

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

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

Group by supplied dimension(s) and lay out groups

Groups data by supplied dimension(s) laying the groups along the dimension(s) out in a NdLayout.

Args:
dimensions: Dimension(s) to group by
Returns:
NdLayout with supplied dimensions
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs ) [source]

Applies simplified option definition returning a new object

Applies options defined in a flat format to the objects returned by the DynamicMap. If the options are to be set directly on the objects in the HoloMap a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})
Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
overlay ( dimensions=None , **kwargs ) [source]

Group by supplied dimension(s) and overlay each group

Groups data by supplied dimension(s) overlaying the groups along the dimension(s).

Args:
dimensions: Dimension(s) of dimensions to group by
Returns:
NdOverlay object(s) with supplied dimensions
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reduce ( dimensions=None , function=None , spread_fn=None , **reduce_map ) [source]

Applies reduction to elements along the specified dimension(s).

Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:

Reducing with a list of dimensions, e.g.:

ds.reduce([‘x’], np.mean)

Defining a reduction using keywords, e.g.:

ds.reduce(x=np.mean)
Args:
dimensions: Dimension(s) to apply reduction on
Defaults to all key dimensions

function: Reduction operation to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.
** reductions: Keyword argument defining reduction
Allows reduction to be defined as keyword pair of dimension and function
Returns:
The Dataset after reductions have been applied.
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=1 ) [source]

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
sample ( samples=[] , bounds=None , **sample_values ) [source]

Samples element values at supplied coordinates.

Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:

Sampling with a list of coordinates, e.g.:

ds.sample([(0, 0), (0.1, 0.2), …])

Sampling a range or grid of coordinates, e.g.:

1D: ds.sample(3) 2D: ds.sample((3, 3))

Sampling by keyword, e.g.:

ds.sample(x=0)
Args:

samples: List of nd-coordinates to sample bounds: Bounds of the region to sample

Defined as two-tuple for 1D sampling and four-tuple for 2D sampling.

closest: Whether to snap to closest coordinates ** kwargs: Coordinates specified as keyword pairs

Keywords of dimensions and scalar coordinates
Returns:
A Table containing the sampled coordinates
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.HoloMap'>)
split_overlays ( ) [source]

Deprecated method to split overlays inside the HoloMap.

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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

holoviews.core. Columns

alias of holoviews.core.data.Dataset

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

Bases: holoviews.core.dimension.ViewableTree

A Layout is an ViewableTree with ViewableElement objects as leaf values. Unlike ViewableTree, a Layout supports a rich display, displaying leaf items in a grid style layout. In addition to the usual ViewableTree 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.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Layout, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( *args , **overrides ) [source]

Clones the Layout, overriding data and parameters.

Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to * args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor
Returns:
Cloned Layout object
cols ( ncols ) [source]

Sets the maximum number of columns in the NdLayout.

Any items beyond the set number of cols will flow onto a new row. The number of columns control the indexing and display semantics of the NdLayout.

Args:
ncols (int): Number of columns to set on the NdLayout
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Concatenates values on all nodes with requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
from_values ( vals )

Deprecated method to construct tree from list of objects

get ( identifier , default=None )

Get a node of the AttrTree using its path string.

Args:
identifier: Path string of the node to return default: Value to return if no node is found
Returns:
The indexed node of the AttrTree
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
items ( )

Keys and nodes of the AttrTree

keys ( )

Keys of nodes in the AttrTree

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

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
merge ( trees )

Merge a collection of AttrTree objects.

message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

path

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

pop ( identifier , default=None )

Pop a node of the AttrTree using its path string.

Args:
identifier: Path string of the node to return default: Value to return if no node is found
Returns:
The node that was removed from the AttrTree
pprint ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
regroup ( group )

Deprecated method to apply new group to items.

Equivalent functionality possible using:

ViewableTree(tree.relabel(group=’Group’).values())
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Layout'>)
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.

shape

Tuple indicating the number of rows and columns in the Layout.

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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
uniform

Whether items in tree have uniform dimensions

update ( other )

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

values ( )

Nodes of the AttrTree

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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. Dimension ( spec , **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, with a descriptive label ‘Height of adult males’.

All dimensions object have a name that identifies them and a label containing a suitable description. If the label is not explicitly specified it matches the name.

These two parameters define the core identity of the dimension object and must match if two dimension objects are to be considered equivalent. All other parameters are considered optional metadata and are not used when testing for equality.

Unlike all the other parameters, these core parameters can be used to construct a Dimension object from a tuple. This format is sufficient to define an identical Dimension:

Dimension(‘a’, label=’Dimension A’) == Dimension((‘a’, ‘Dimension A’))

Everything else about a dimension is considered to reflect non-semantic preferences. Examples include the default value (which may be used in a visualization to set an initial slider position), how the value is to rendered as text (which may be used to specify the printed floating point precision) or a suitable range of values to consider for a particular analysis.

Full unit support with automated conversions are on the HoloViews roadmap. Once rich unit objects are supported, the unit (or more specifically the type of unit) will be part of the core dimension specification used to establish equality.

Until this feature is implemented, there are two auxiliary parameters that hold some partial information about the unit: the name of the unit and whether or not it is cyclic. The name of the unit is used as part of the pretty-printed representation and knowing whether it is cyclic is important for certain operations.

param String label ( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
Unrestricted label used to describe the dimension. A label should succinctly describe the dimension and may contain any characters, including Unicode and LaTeX expression.
param Boolean cyclic ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Callable value_format ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Formatting function applied to each value before display.
param Tuple range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Specifies the minimum and maximum allowed values for a Dimension. None is used to represent an unlimited bound.
param Tuple soft_range ( allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Specifies a minimum and maximum reference value, which may be overridden by the data.
param Parameter type ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Parameter default ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Default value of the Dimension which may be useful for widget or other situations that require an initial or default value.
param Number step ( allow_None=True, bounds=None, constant=False, default=None, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
Optional floating point step specifying how frequently the underlying space should be sampled. May be used to define a discrete sampling over the range.
param String unit ( allow_None=True, basestring=<class ‘str’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 List values ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Optional specification of the allowed value set for the dimension that may also be used to retain a categorical ordering.
clone ( spec=None , **overrides ) [source]

Clones the Dimension with new parameters

Derive a new Dimension that inherits existing parameters except for the supplied, explicit overrides

Args:
spec (tuple, optional): Dimension tuple specification ** overrides: Dimension parameter overrides
Returns:
Cloned Dimension object
debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

params ( *args , **kwargs )

Inspect .param.params method for the full docstring

pprint_label

The pretty-printed label string for the Dimension

pprint_value ( value ) [source]

Applies the applicable formatter to the value.

Args:
value: Dimension value to format
Returns:
Formatted dimension value
pprint_value_string ( value ) [source]

Pretty print the dimension value and unit.

Args:
value: Dimension value to format
Returns:
Formatted dimension value string with unit
print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

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

Variant of __repr__ designed for generating a runnable script.

set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.dimension.Dimension'>)
spec

“Returns the Dimensions tuple specification

Returns:
tuple: Dimension tuple specification
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. GridSpace ( initial_items=None , kdims=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 String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
items ( )

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

keys ( full_grid=False ) [source]

Returns the keys of the GridSpace

Args:
full_grid (bool, optional): Return full cross-product of keys
Returns:
List of keys
label

Label inherited from items

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 )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.spaces.GridSpace'>)
shape

Returns the 2D shape of the GridSpace as (rows, cols).

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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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. Tabular ( data , kdims=None , vdims=None , **params ) [source]

Bases: holoviews.core.element.Element

Baseclass to give an elements providing an API to generate a tabular representation of the object.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Element, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
array ( dimensions=None )

Convert dimension values to columnar array.

Args:
dimensions: List of dimensions to return
Returns:
Array of columns corresponding to each dimension
cell_type ( row , col ) [source]

Type of the table cell, either ‘data’ or ‘heading’

Args:
row (int): Integer index of table row col (int): Integer index of table column
Returns:
Type of the table cell, either ‘data’ or ‘heading’
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
closest ( coords , **kwargs )

Snap list or dict of coordinates to closest position.

Args:
coords: List of 1D or 2D coordinates ** kwargs: Coordinates specified as keyword pairs
Returns:
List of tuples of the snapped coordinates
Raises:
NotImplementedError: Raised if snapping is not supported
collapse_data ( data , function=None , kdims=None , **kwargs )

Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

cols

Number of columns in table

ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False )

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
hist ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , **kwargs )

Computes and adjoins histogram along specified dimension(s).

Defaults to first value dimension if present otherwise falls back to first key dimension.

Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram
Returns:
AdjointLayout of element and histogram or just the histogram
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
mapping ( kdims=None , vdims=None , **kwargs )

Deprecated method to convert data to dictionary

matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

pprint_cell ( row , col ) [source]

Formatted contents of table cell.

Args:
row (int): Integer index of table row col (int): Integer index of table column
Returns:
Formatted table cell contents
print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reduce ( dimensions=[] , function=None , spreadfn=None , **reduction )

Applies reduction along the specified dimension(s).

Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:

Reducing with a list of dimensions, e.g.:

ds.reduce([‘x’], np.mean)

Defining a reduction using keywords, e.g.:

ds.reduce(x=np.mean)
Args:
dimensions: Dimension(s) to apply reduction on
Defaults to all key dimensions

function: Reduction operation to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread

Useful for computing a confidence interval, spread, or standard deviation.
** reductions: Keyword argument defining reduction
Allows reduction to be defined as keyword pair of dimension and function
Returns:
The element after reductions have been applied.
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
rows

Number of rows in table (including header)

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

Samples values at supplied coordinates.

Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:

Sampling with a list of coordinates, e.g.:

ds.sample([(0, 0), (0.1, 0.2), …])

Sampling a range or grid of coordinates, e.g.:

1D: ds.sample(3) 2D: ds.sample((3, 3))

Sampling by keyword, e.g.:

ds.sample(x=0)
Args:

samples: List of nd-coordinates to sample bounds: Bounds of the region to sample

Defined as two-tuple for 1D sampling and four-tuple for 2D sampling.

closest: Whether to snap to closest coordinates ** kwargs: Coordinates specified as keyword pairs

Keywords of dimensions and scalar coordinates
Returns:
Element containing the sampled coordinates
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Tabular'>)
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 )

Deprecated method to convert any Element to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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 String group ( allow_None=False, basestring=<class ‘str’>, constant=False, default=Empty, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

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

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
get_dimension ( dimension , default=None , strict=False )

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
inspect_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
map ( map_fn , specs=None , clone=True )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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

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

print_param_defaults ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.layout.Empty'>)
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=None , specs=None , full_breadth=True )

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

class holoviews.core. UniformNdMapping ( initial_items=None , kdims=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 Element’s dimensions. Subclasses should implement the appropriate slicing, sampling and reduction methods for their Dimensioned type.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=NdMapping, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with 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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, 0), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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 Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , new_type=None , link=True , *args , **overrides ) [source]

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( dimensions=None , multi_index=False ) [source]

Convert dimension values to DataFrame.

Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.

Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi-)index
Returns:
DataFrame of columns corresponding to each dimension
dimension_values ( dimension , expanded=True , flat=True )

Return the values along the requested dimension.

Args:

dimension: The dimension to return values for expanded (bool, optional): Whether to expand values

Whether to return the expanded values, behavior depends on the type of data:

  • Columnar: If false returns unique values
  • Geometry: If false returns scalar values per geometry
  • Gridded: If false returns 1D coordinates

flat (bool, optional): Whether to flatten array

Returns:
NumPy array of values along the requested dimension
dimensions ( selection='all' , label=False )

Lists the available dimensions on the object

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.

Args:
selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns:
List of Dimension objects or their names or labels
drop_dimension ( dimensions )

Drops dimension(s) from keys

Args:
dimensions: Dimension(s) to drop
Returns:
Clone of object with with dropped dimension(s)
force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
get ( key , default=None )

Standard get semantics for all mapping types

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

Get a Dimension object by name or index.

Args:
dimension: Dimension to look up by name or integer index default (optional): Value returned if Dimension not found strict (bool, optional): Raise a KeyError if not found
Returns:
Dimension object for the requested dimension or default
get_dimension_index ( dimension )

Get the index of the requested dimension.

Args:
dimension: Dimension to look up by name or by index
Returns:
Integer index of the requested dimension
get_dimension_type ( dim )

Get the type of the requested dimension.

Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.

Args:
dimension: Dimension to look up by name or by index
Returns:
Declared type of values along the dimension
get_param_values = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
group

Group inherited from items

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

Groups object by one or more dimensions

Applies groupby operation over the specified dimensions returning an object of type container_type (expected to be dictionary-like) containing the groups.

Args:
dimensions: Dimension(s) to group by container_type: Type to cast group container to group_type: Type to cast each group to dynamic: Whether to return a DynamicMap ** kwargs: Keyword arguments to pass to each group
Returns:
Returns object of supplied container_type containing the groups. If dynamic=True returns a DynamicMap instead.
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(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
items ( )

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

keys ( )

Returns the keys of all the elements.

label

Label inherited from items

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 )

Map a function to all objects matching the specs

Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:

dmap.map(fn, hv.Curve)
Args:

map_fn: Function to apply to each object specs: List of specs to match

List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.

clone: Whether to clone the object or transform inplace

Returns:
Returns the object after the map_fn has been applied
matches ( spec )

Whether the spec applies to this object.

Args:
spec: A function, spec or type to check for a match
  • A ‘type[[.group].label]’ string which is compared against the type, group and label of this object
  • A function which is given the object and returns a boolean.
  • An object type matched using isinstance.
Returns:
bool: Whether the spec matched this object.
message ( *args , **kwargs )

Inspect .param.message method for the full docstring

options ( *args , **kwargs )

Applies simplified option definition returning a new object.

Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:

obj.options(cmap=’viridis’, show_title=False)

If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:

obj.options(‘Image’, cmap=’viridis’, show_title=False)

or using:

obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})

Identical to the .opts method but returns a clone of the object by default.

Args:
* args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
backend (optional): Backend to apply options to
Defaults to current selected backend
clone (bool, optional): Whether to clone object
Options can be applied inplace with clone=False
** kwargs: Keywords of options
Set of options to apply to the object
Returns:
Returns the cloned object with the options applied
params ( *args , **kwargs )

Inspect .param.params method for the full docstring

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 ( *args , **kwargs )

Inspect .param.print_param_defaults method for the full docstring

print_param_values ( *args , **kwargs )

Inspect .param.print_param_values method for the full docstring

range ( dimension , data_range=True , dimension_range=True )

Return the lower and upper bounds of values along dimension.

Args:

dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges

Whether to include Dimension range and soft_range in range calculation
Returns:
Tuple containing the lower and upper bound
reindex ( kdims=[] , force=False )

Reindexes object dropping static or supplied kdims

Creates a new object with a reordered or reduced set of key dimensions. By default drops all non-varying 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.

Args:
kdims (optional): New list of key dimensions after reindexing force (bool, optional): Whether to drop non-unique items
Returns:
Reindexed object
relabel ( label=None , group=None , depth=0 )

Clone object and apply new group and/or label.

Applies relabeling to children up to the supplied depth.

Args:

label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied

If applied to container allows applying relabeling to contained objects up to the specified depth
Returns:
Returns relabelled object
script_repr ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

Applies selection by dimension name

Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.

Selections may select a specific value, slice or set of values:

  • value: Scalar values will select rows along with an exact

    match, e.g.:

    ds.select(x=3)

  • slice: Slices may be declared as tuples of the upper and

    lower bound, e.g.:

    ds.select(x=(0, 3))

  • values: A list of values may be selected using a list or

    set, e.g.:

    ds.select(x=[0, 1, 2])

Args:
selection_specs: List of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
** selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns:
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.ndmapping.UniformNdMapping'>)
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 )

Deprecated method to convert an MultiDimensionalMapping of Elements to a Table.

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

Traverses object returning matching items

Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function.

Args:

fn (function, optional): Function applied to matched objects specs: List of specs to match

Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
Returns:
list: List of objects that matched
type

The type of elements stored in the mapping.

update ( other )

Merges other item with this object

Args:
other: Object containing items to merge into this object
Must be a dictionary or NdMapping type
values ( )

Returns the values of all the elements.

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

Bases: holoviews.core.ndmapping.NdMapping

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 String group ( allow_None=False, basestring=<class ‘str’>, constant=False, default=Collator, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
A string describing the data wrapped by the object.
param String label ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with 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, watchers={} )
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 List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Collator operates on HoloViews objects, if vdims are specified a value_transform function must also be supplied.
param Boolean sort ( allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether the items should be sorted in the constructor.
param List drop ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
List of dimensions to drop when collating data, specified as strings.
param Boolean drop_constant ( allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Whether to demote any non-varying key dimensions to constant dimensions.
param List filters ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
List of paths to drop when collating data, specified as strings or tuples.
param Parameter progress_bar ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The progress bar instance used to report progress. Set to None to disable progress bars.

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, watchers={} )

param Callable value_transform ( allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
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.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Adds a dimension and its values to the object

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.

Args:
dimension: Dimension or dimension spec to add dim_pos (int) Integer index to insert dimension at dim_val (scalar or ndarray): Dimension value(s) to add vdim: Disabled, this type does not have value dimensions ** kwargs: Keyword arguments passed to the cloned element
Returns:
Cloned object containing the new dimension
clone ( data=None , shared_data=True , *args , **overrides )

Clones the object, overriding data and parameters.

Args:

data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked

Determines whether Streams and Links attached to original object will be inherited.

* args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor

Returns:
Cloned object
ddims

The list of deep dimensions

debug ( *args , **kwargs )

Inspect .param.debug method for the full docstring

defaults ( *args , **kwargs )

Inspect .param.defaults method for the full docstring

dframe ( )

Deprecated method to convert a MultiDimensionalMapping to a pandas DataFrame. Conversion to a dataframe now only supported by specific subclasses such as UniformNdMapping types.

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

Return the values along the requested dimension.

Args:

dimension: The dimension