holoviews.element Package


element Package

Inheritance diagram of holoviews.element
class holoviews.element. Table ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.core.data.Dataset , holoviews.core.element.Tabular

Table is a Dataset type, which gets displayed in a tabular format and is convertible to most other Element types.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Table, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
The group is used to describe the Table.
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 )

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 )

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
cell_type ( row , col )

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 , *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 * args: Additional arguments to pass to constructor ** overrides: New keyword arguments to pass to constructor
Returns:
Cloned object
closest ( coords=[] , **kwargs )

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.

cols

Number of columns in table

columns ( dimensions=None )

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 )

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.element.tabular.Table'>)
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.element.tabular.Table'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.tabular.Table'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.tabular.Table'>)
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.

pprint_cell ( row , col )

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 ( dim , 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 , **reductions )

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 )

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
rows

Number of rows in table (including header)

sample ( samples=[] , bounds=None , closest=True , **kwargs )

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 )

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.element.tabular.Table'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.tabular.Table'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. Curve ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Curve is a Chart element representing a line in a 1D coordinate system where the key dimension maps on the line x-coordinate and the first value dimension represents the height of the line along the y-axis.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Curve, 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’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimension(s) of a Chart represent the independent variable(s).
param List vdims ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart.Curve'>)
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.element.chart.Curve'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Curve'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart.Curve'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart.Curve'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Curve'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. Bars ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Bars is a Chart element representing categorical observations using the height of rectangular bars. The key dimensions represent the categorical groupings of the data, but may also be used to stack the bars, while the first value dimension represents the height of each bar.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Bars, 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, 3), constant=False, default=[Dimension(‘x’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimension(s) of a Chart represent the independent variable(s).
param List vdims ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart.Bars'>)
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.element.chart.Bars'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Bars'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart.Bars'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart.Bars'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Bars'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. Histogram ( data , edges=None , **params ) [source]

Bases: holoviews.element.chart.Chart

Histogram is a Chart element representing a number of bins in a 1D coordinate system. The key dimension represents the binned values, which may be declared as bin edges or bin centers, while the value dimensions usually defines a count, frequency or density associated with each bin.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Histogram, 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, 1), constant=False, default=[Dimension(‘x’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Dimensions on Element2Ds determine the number of indexable dimensions.
param List vdims ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘Frequency’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘grid’], 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 )

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 )

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 )

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 )

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 )

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 )

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
edges

Property to access the Histogram edges provided for backward compatibility

force_new_dynamic_value = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Histogram'>)
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.element.chart.Histogram'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Histogram'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart.Histogram'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart.Histogram'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Histogram'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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
values

Property to access the Histogram values provided for backward compatibility

verbose ( *args , **kwargs )

Inspect .param.verbose method for the full docstring

warning ( *args , **kwargs )

Inspect .param.warning method for the full docstring

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

Bases: holoviews.core.element.Element3D , holoviews.element.path.Path

Path3D is a 3D element representing a line through 3D space. The key dimensions represent the position of each coordinate along the x-, y- and z-axis while the value dimensions can optionally supply additional information.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Path3D, 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=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a geometry represent the x- and y- coordinates in a 2D space.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Path3D can have optional value dimensions.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
param ObjectSelector datatype ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’, ‘dataframe’, ‘dictionary’, ‘dask’, ‘array’], instantiate=True, names=None, objects=[], 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 )

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 )

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 )

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 )

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
columns ( dimensions=None )

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 )

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.element.chart3d.Path3D'>)
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.element.chart3d.Path3D'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Path3D'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart3d.Path3D'>)
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 )

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 )

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 )

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 )

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 )

Bypasses selection on data and sets extents based on selection.

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.element.chart3d.Path3D'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Path3D'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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
split ( start=None , end=None , datatype=None , **kwargs )

The split method allows splitting a Path type into a list of subpaths of the same type. A start and/or end may be supplied to select a subset of paths.

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.element. Trisurface ( *args , **kwargs ) [source]

Bases: holoviews.element.chart3d.TriSurface

Old name for TriSurface. Retaining for backwards compatibility until holoviews 2.0.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Trisurface, 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=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a TriSurface represent the 3D coordinates of each point.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of a TriSurface can provide additional information about each 3D coordinate.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart3d.Trisurface'>)
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.element.chart3d.Trisurface'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Trisurface'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart3d.Trisurface'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart3d.Trisurface'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Trisurface'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. HexTiles ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.core.data.Dataset , holoviews.core.element.Element2D

HexTiles is a statistical element with a visual representation that renders a density map of the data values as a hexagonal grid.

Before display the data is aggregated either by counting the values in each hexagonal bin or by computing aggregates.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=HexTiles, 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=(2, 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, 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 Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 )

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 )

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 )

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 )

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 )

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 )

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.element.stats.HexTiles'>)
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.element.stats.HexTiles'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.HexTiles'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.stats.HexTiles'>)
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 )

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 )

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 )

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 )

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 )

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.element.stats.HexTiles'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.HexTiles'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. TriSurface ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.core.element.Element3D , holoviews.element.geom.Points

TriSurface represents a set of coordinates in 3D space which define a surface via a triangulation algorithm (usually Delauney triangulation). They key dimensions of a TriSurface define the position of each point along the x-, y- and z-axes, while value dimensions can provide additional information about each point.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=TriSurface, 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=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a TriSurface represent the 3D coordinates of each point.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of a TriSurface can provide additional information about each 3D coordinate.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart3d.TriSurface'>)
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.element.chart3d.TriSurface'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.TriSurface'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart3d.TriSurface'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart3d.TriSurface'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.TriSurface'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. HLine ( y , **params ) [source]

Bases: holoviews.element.annotation.Annotation

Horizontal line annotation at the given position.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=HLine, 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=(2, 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, 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 Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ClassSelector y ( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The y-position of the VLine which make be numeric or a timestamp.
array ( dimensions=None )

Convert dimension values to columnar array.

Args:
dimensions: List of dimensions to return
Returns:
Array of columns corresponding to each dimension
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.

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 ) [source]

Return the values along the requested dimension.

Args:
dimension: The dimension to return values for expanded (bool, optional): Whether to expand values 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.element.annotation.HLine'>)
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.element.annotation.HLine'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.HLine'>)
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.element.annotation.HLine'>)
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.

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
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.element.annotation.HLine'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.HLine'>)
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.element. Raster ( data , kdims=None , vdims=None , extents=None , **params ) [source]

Bases: holoviews.core.element.Element2D

Raster is a basic 2D element type for presenting either numpy or dask arrays as two dimensional raster images.

Arrays with a shape of (N,M) are valid inputs for Raster whereas subclasses of Raster (e.g. RGB) may also accept 3D arrays containing channel information.

Raster does not support slicing like the Image or RGB subclasses and the extents are in matrix coordinates if not explicitly specified.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Raster, 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=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The label of the x- and y-dimension of the Raster in form of a string or dimension object.
param List vdims ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The dimension description of the data held in the matrix.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 , 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
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 ( dim , expanded=True , flat=True ) [source]

The set of samples available along a particular 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.element.raster.Raster'>)
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.element.raster.Raster'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.Raster'>)
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.element.raster.Raster'>)
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.

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

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

Reduces the Raster using functions provided via the kwargs, where the keyword is the dimension to be reduced. Optionally a label_prefix can be provided to prepend to the result Element label.

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=[] , **sample_values ) [source]

Sample the Raster along one or both of its dimensions, returning a reduced dimensionality type, which is either a ItemTable, Curve or Scatter. If two dimension samples and a new_xaxis is provided the sample will be the value of the sampled unit indexed by the value in the new_xaxis tuple.

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.element.raster.Raster'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.Raster'>)
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.element. Bounds ( lbrt , **params ) [source]

Bases: holoviews.element.path.BaseShape

An arbitrary axis-aligned bounding rectangle defined by the (left, bottom, right, top) coordinate positions.

If supplied a single real number as input, this value will be treated as the radius of a square, zero-center box which will be used to compute the corresponding lbrt tuple.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Bounds, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
The assigned group name.
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=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a geometry represent the x- and y- coordinates in a 2D space.
param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Value dimensions can be associated with a geometry.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector datatype ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’, ‘dataframe’, ‘dictionary’, ‘dask’, ‘array’], instantiate=True, names=None, objects=[], 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).
param NumericTuple lbrt ( allow_None=False, constant=False, default=(-0.5, -0.5, 0.5, 0.5), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The (left, bottom, right, top) coordinates of the bounding box.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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 )

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

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

closest ( coords=[] , **kwargs )

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
columns ( dimensions=None )

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 )

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.element.path.Bounds'>)
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.element.path.Bounds'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Bounds'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.path.Bounds'>)
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 )

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 )

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 )

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 )

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 )

Bypasses selection on data and sets extents based on selection.

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.element.path.Bounds'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Bounds'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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
split ( start=None , end=None , datatype=None , **kwargs )

The split method allows splitting a Path type into a list of subpaths of the same type. A start and/or end may be supplied to select a subset of paths.

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.element. BoxWhisker ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.core.data.Dataset , holoviews.core.element.Element2D

BoxWhisker represent data as a distributions highlighting the median, mean and various percentiles. It may have a single value dimension and any number of key dimensions declaring the grouping of each violin.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=BoxWhisker, 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=False, 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=(1, 1), constant=False, default=[Dimension(‘y’)], 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 Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 )

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 )

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 )

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 )

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 )

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 )

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.element.stats.BoxWhisker'>)
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.element.stats.BoxWhisker'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.BoxWhisker'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.stats.BoxWhisker'>)
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 )

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 )

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 )

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 )

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 )

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.element.stats.BoxWhisker'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.BoxWhisker'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. Area ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.element.chart.Curve

Area is a Chart element representing the area under a curve or between two curves in a 1D coordinate system. The key dimension represents the location of each coordinate along the x-axis, while the value dimension(s) represent the height of the area or the lower and upper bounds of the area between curves.

Multiple areas may be stacked by overlaying them an passing them to the stack method.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Area, 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’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimension(s) of a Chart represent the independent variable(s).
param List vdims ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart.Area'>)
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.element.chart.Area'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Area'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart.Area'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart.Area'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Area'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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
classmethod stack ( areas ) [source]

Stacks an (Nd)Overlay of Area or Curve Elements by offsetting their baselines. To stack a HoloMap or DynamicMap use the map method.

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.element. Scatter3D ( data , kdims=None , vdims=None , **kwargs ) [source]

Bases: holoviews.core.element.Element3D , holoviews.element.geom.Points

Scatter3D is a 3D element representing the position of a collection of coordinates in a 3D space. The key dimensions represent the position of each coordinate along the x-, y- and z-axis while the value dimensions can optionally supply additional information.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Scatter3D, 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=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a geometry represent the x- and y- coordinates in a 2D space.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Scatter3D can have optional value dimensions, which may be mapped onto color and size.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
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 )

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 )

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 )

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 )

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 )

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 )

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.element.chart3d.Scatter3D'>)
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.element.chart3d.Scatter3D'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Scatter3D'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart3d.Scatter3D'>)
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 )

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 )

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 )

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 )

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 )

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.element.chart3d.Scatter3D'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Scatter3D'>)
shape

Returns the shape of the data.

sort ( by=None , reverse=False )

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.element. Surface ( data , kdims=None , vdims=None , extents=None , **params ) [source]

Bases: holoviews.element.raster.Image , holoviews.core.element.Element3D

A Surface represents a regularly sampled 2D grid with associated values defining the height along the z-axis. The key dimensions of a Surface represent the 2D coordinates along the x- and y-axes while the value dimension declares the height at each grid location.

The data of a Surface is usually defined as a 2D array of values and either a bounds tuple defining the extent in the 2D space or explicit x- and y-coordinate arrays.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Surface, 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=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The Surface x and y dimensions of the space defined by the supplied extent.
param List vdims ( allow_None=False, bounds=(1, 1), constant=False, default=[Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The Surface height dimension.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘grid’, ‘xarray’, ‘image’, ‘cube’, ‘dataframe’, ‘dictionary’], 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).
param ClassSelector bounds ( allow_None=False, constant=False, default=BoundingBox(radius=0.5), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The bounding region in sheet coordinates containing the data.
param Number rtol ( 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={} )
The tolerance used to enforce regular sampling for regular, gridded data where regular sampling is expected. Expressed as the maximal allowable sampling difference between sample locations.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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
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 , link=True , *args , **overrides )

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

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

closest ( coords=[] , **kwargs )

Given a single coordinate or multiple coordinates as a tuple or list of tuples or keyword arguments matching the dimension closest will find the closest actual x/y coordinates.

closest_cell_center ( x , y )

Given arbitrary sheet coordinates, return the sheet coordinates of the center of the closest unit.

columns ( dimensions=None )

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 )

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.element.chart3d.Surface'>)
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.element.chart3d.Surface'>)
get_value_generator = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Surface'>)
groupby ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **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 , **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.element.chart3d.Surface'>)
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.
matrix2sheet ( float_row , float_col )

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 )

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.

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

reduce ( dimensions=[] , function=None , spreadfn=None , **reductions )

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 )

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=[] , **kwargs )

Allows sampling of an Image as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. On an Image the coordinates are continuously indexed and will always snap to the nearest coordinate.

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **selection )

Allows selecting data by the slices, sets and scalar values along a particular dimension. The indices should be supplied as keywords mapping between the selected dimension and value. Additionally selection_specs (taking the form of a list of type.group.label strings, types or functions) may be supplied, which will ensure the selection is only applied if the specs match the selected object.

set_default ( *args , **kwargs )

Inspect .param.set_default method for the full docstring

set_dynamic_time_fn = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Surface'>)
set_param = functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart3d.Surface'>)
shape

Returns the shape of the data.

sheet2matrix ( x , y )

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 )

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 ( )

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.

sort ( by=None , reverse=False )

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 )

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

to

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

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.element. Ellipse ( x , y , spec , **params ) [source]

Bases: holoviews.element.path.BaseShape

Draw an axis-aligned ellipse at the specified x,y position with the given orientation.

The simplest (default) Ellipse is a circle, specified using:

Ellipse(x,y, diameter)

A circle is a degenerate ellipse where the width and height are equal. To specify these explicitly, you can use:

Ellipse(x,y, (width, height))

There is also an aspect parameter allowing you to generate an ellipse by specifying a multiplicating factor that will be applied to the height only.

Note that as a subclass of Path, internally an Ellipse is a sequence of (x,y) sample positions. Ellipse could also be implemented as an annotation that uses a dedicated ellipse artist.

param String group ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Ellipse, instantiate=True, pickle_default_value=True, precedence=None, readonly=False, regex=None, watchers={} )
The assigned group name.
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=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
The key dimensions of a geometry represent the x- and y- coordinates in a 2D space.
param List vdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Value dimensions can be associated with a geometry.
param Tuple extents ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False, watchers={} )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector datatype ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’, ‘dataframe’, ‘dictionary’, ‘dask’, ‘array’], instantiate=True, names=None, objects=[], 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).
param Number x ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
The x-position of the ellipse center.
param Number y ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
The y-position of the ellipse center.
param Number width ( allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
The width of the ellipse.
param Number height ( allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
The height of the ellipse.
param Number orientation ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
Orientation in the Cartesian coordinate system, the counterclockwise angle in radians between the first axis and the horizontal.
param Number aspect ( allow_None=False, bounds=None, constant=False, default=1.0, 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 multiplier applied to the diameter to compute the width in cases where only the diameter value is set.
param Number samples ( allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001>, watchers={} )
The sample count used to draw the ellipse.
add_dimension ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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 )

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

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

closest ( coords=[] , **kwargs )

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
columns ( dimensions=None )

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 )

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 (