holoviews.element Package¶
element
Package¶
digraph inheritance144c62051f {
fontsize=18;
rankdir=LR;
size="12.0, 12.0";
"holoviews.core.data.DataConversion" [URL="holoviews.core.data.html#holoviews.core.data.DataConversion",fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",target="_top",tooltip="DataConversion is a very simple container object which can be"];
"holoviews.element.ElementConversion" [fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5)",tooltip="ElementConversion is a subclass of DataConversion providing"];
"holoviews.core.data.DataConversion" > "holoviews.element.ElementConversion" [arrowsize=0.5,style="setlinewidth(0.5)"];
}

class
holoviews.element.
Slope
(slope, y_intercept, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.element.annotation.Annotation
A line drawn with arbitrary slope and yintercept
group
= param.String(default=’Annotation’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
slope
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))y_intercept
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))
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)¶ 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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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 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.Slope'>)¶

classmethod
from_scatter
(element, **kwargs)[source]¶ Returns a Slope element given an element of x/ycoordinates
Computes the slope and yintercept from an element containing x and ycoordinates.
 Args:
element: Element to compute slope from kwargs: Keyword arguments to pass to the Slope element
 Returns:
Slope element

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

get_dimension_index
(dimension)¶ Get the index of the requested dimension.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Integer index of the requested dimension

get_dimension_type
(dim)¶ Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Declared type of values along the dimension

get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Slope'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Slope'>)¶

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.Slope'>)¶

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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Slope'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
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.Slope'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Slope'>)¶

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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
VectorField
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.selection.Selection2DExpr
,holoviews.element.geom.Geometry
A VectorField represents a set of vectors in 2D space with an associated angle, as well as an optional magnitude and any number of other value dimensions. The angles are assumed to be defined in radians and by default the magnitude is assumed to be normalized to be between 0 and 1.
group
= param.String(default=’VectorField’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(1, None), default=[Dimension(‘Angle’), Dimension(‘Magnitude’)])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.geom.VectorField'>)¶

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
(**kwargs)¶ 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.geom.VectorField'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.VectorField'>)¶

groupby
(**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 dictionarylike) 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

property
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.geom.VectorField'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.VectorField'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.geom.VectorField'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.VectorField'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Graph
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.core.data.Dataset
,holoviews.core.element.Element2D
Graph is highlevel Element representing both nodes and edges. A Graph may be defined in an abstract form representing just the abstract edges between nodes and optionally may be made concrete by supplying a Nodes Element defining the concrete positions of each node. If the node positions are supplied the EdgePaths (defining the concrete edges) can be inferred automatically or supplied explicitly.
The constructor accepts regular columnar data defining the edges or a tuple of the abstract edges and nodes, or a tuple of the abstract edges, nodes, and edgepaths.
group
= param.String(default=’Graph’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘start’), Dimension(‘end’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, link=True, *args, **overrides)[source]¶ Clones the object, overriding data and parameters.
 Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked
Determines whether Streams and Links attached to original object will be inherited.
*args: Additional arguments to pass to constructor **overrides: New keyword arguments to pass to constructor
 Returns:
Cloned object

closest
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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

property
edgepaths
¶ Returns the fixed EdgePaths or computes direct connections between supplied nodes.

force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Graph'>)¶

classmethod
from_networkx
(G, positions, nodes=None, **kwargs)[source]¶ Generate a HoloViews Graph from a networkx.Graph object and networkx layout function or dictionary of node positions. Any keyword arguments will be passed to the layout function. By default it will extract all node and edge attributes from the networkx.Graph but explicit node information may also be supplied. Any nonscalar attributes, such as lists or dictionaries will be ignored.
 Args:
G (networkx.Graph): Graph to convert to Graph element positions (dict or callable): Node positions
Node positions defined as a dictionary mapping from node id to (x, y) tuple or networkx layout function which computes a positions dictionary
kwargs (dict): Keyword arguments for layout function
 Returns:
Graph element

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

get_dimension_index
(dimension)¶ Get the index of the requested dimension.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Integer index of the requested dimension

get_dimension_type
(**kwargs)¶ 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.graphs.Graph'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Graph'>)¶

groupby
(**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 dictionarylike) 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

property
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.graphs.Graph'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

property
nodes
¶ Computes the node positions the first time they are requested if no explicit node information was supplied.

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Graph'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

reduce
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**kwargs)¶ 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.
Selecting by a node dimensions selects all edges and nodes that are connected to the selected nodes. To select only edges between the selected nodes set the selection_mode to ‘nodes’.

classmethod
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.graphs.Graph'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Graph'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Polygons
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.element.path.Contours
The Polygons element represents one or more polygon geometries with associated scalar values. Each polygon geometry may be split into subgeometries on NaNvalues and may be associated with scalar values. In analogy to GEOS geometry types a Polygons element is a collection of Polygon and MultiPolygon geometries. Polygon geometries are defined as a set of coordinates describing the exterior bounding ring and any number of interior holes.
Like all other elements a Polygons element may be defined through an extensible list of interfaces. Natively HoloViews provides the MultiInterface which allows representing paths as lists of regular columnar data objects including arrays, dataframes and dictionaries of column arrays and scalars.
The canonical representation is a list of dictionaries storing the x and ycoordinates, a listoflists of arrays representing the holes, along with any other values:
[{‘x’: 1darray, ‘y’: 1darray, ‘holes’: listoflistsofarrays, ‘value’: scalar}, …]
Alternatively Polygons also supports a single columnar datastructure to specify an individual polygon:
{‘x’: 1darray, ‘y’: 1darray, ‘holes’: listoflistsofarrays, ‘value’: scalar}
The listoflists format of the holes corresponds to the potential for each coordinate array to be split into a multigeometry through NaNseparators. Each subgeometry separated by the NaNs therefore has an unambiguous mapping to a list of holes. If a (multi)polygon has no holes, the ‘holes’ key may be ommitted.
Any value dimensions stored on a Polygons geometry must be scalar, just like the Contours element. Since not all formats allow storing scalar values as actual scalars arrays which are the same length as the coordinates but have only one unique value are also considered scalar.
The easiest way of accessing the individual geometries is using the Polygons.split method, which returns each path geometry as a separate entity, while the other methods assume a flattened representation where all paths are separated by NaN values.
group
= param.String(default=’Polygons’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(0, None), default=[])Polygons optionally accept a value dimension, corresponding to the supplied value.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.ObjectSelector(default=[‘multitabular’, ‘spatialpandas’], objects=[])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).
level
= param.Number(inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Optional level associated with the set of Contours.

add_dimension
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data_list, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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

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.Polygons'>)¶

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
(**kwargs)¶ 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.Polygons'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Polygons'>)¶

groupby
(**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 dictionarylike) 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.

property
has_holes
¶ Detects whether any polygon in the Polygons element defines holes. Useful to avoid expanding Polygons unless necessary.

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

holes
(**kwargs)¶ Returns a listoflistsoflists of hole arrays. The three levels of nesting reflects the structure of the polygons:
The first level of nesting corresponds to the list of geometries
The second level corresponds to each Polygon in a MultiPolygon
The third level of nesting allows for multiple holes per Polygon

property
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.Polygons'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Polygons'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.Polygons'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Polygons'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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
(**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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
TriMesh
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.element.graphs.Graph
A TriMesh represents a mesh of triangles represented as the simplices and nodes. The simplices represent a indices into the nodes array. The mesh therefore follows a datastructure very similar to a graph, with the abstract connectivity between nodes stored on the TriMesh element itself, the node positions stored on a Nodes element and the concrete paths making up each triangle generated when required by accessing the edgepaths.
Unlike a Graph each simplex is represented as the node indices of the three corners of each triangle.
group
= param.String(default=’TriMesh’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(3, 3), default=[‘node1’, ‘node2’, ‘node3’])Dimensions declaring the node indices of each triangle.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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

property
edgepaths
¶ Returns the EdgePaths by generating a triangle for each simplex.

force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.TriMesh'>)¶

classmethod
from_networkx
(G, positions, nodes=None, **kwargs)¶ Generate a HoloViews Graph from a networkx.Graph object and networkx layout function or dictionary of node positions. Any keyword arguments will be passed to the layout function. By default it will extract all node and edge attributes from the networkx.Graph but explicit node information may also be supplied. Any nonscalar attributes, such as lists or dictionaries will be ignored.
 Args:
G (networkx.Graph): Graph to convert to Graph element positions (dict or callable): Node positions
Node positions defined as a dictionary mapping from node id to (x, y) tuple or networkx layout function which computes a positions dictionary
kwargs (dict): Keyword arguments for layout function
 Returns:
Graph element

classmethod
from_vertices
(data)[source]¶ Uses Delauney triangulation to compute triangle simplices for each point.

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
(**kwargs)¶ 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.graphs.TriMesh'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.TriMesh'>)¶

groupby
(**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 dictionarylike) 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

property
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.graphs.TriMesh'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

property
nodes
¶ Computes the node positions the first time they are requested if no explicit node information was supplied.

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.TriMesh'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

point_type
¶ alias of
holoviews.element.geom.Points

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

reduce
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**kwargs)¶ 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.

classmethod
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.graphs.TriMesh'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.TriMesh'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Spline
(spline_points, **params)[source]¶ Bases:
holoviews.element.annotation.Annotation
Draw a spline using the given handle coordinates and handle codes. The constructor accepts a tuple in format (coords, codes).
Follows format of matplotlib spline definitions as used in matplotlib.path.Path with the following codes:
Path.STOP : 0 Path.MOVETO : 1 Path.LINETO : 2 Path.CURVE3 : 3 Path.CURVE4 : 4 Path.CLOSEPLOY: 79
group
= param.String(default=’Spline’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple 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, *args, **overrides)[source]¶ Clones the object, overriding data and parameters.

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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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.Spline'>)¶

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.Spline'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Spline'>)¶

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.Spline'>)¶

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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Spline'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
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.Spline'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Spline'>)¶

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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
QuadMesh
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.element.selection.Selection2DExpr
,holoviews.core.data.Dataset
,holoviews.core.element.Element2D
A QuadMesh represents 2D rectangular grid expressed as x and ycoordinates defined as 1D or 2D arrays. Unlike the Image type a QuadMesh may be regularly or irregularly spaced and contain either bin edges or bin centers. If bin edges are supplied the shape of the x/ycoordinate arrays should be one greater than the shape of the value array.
The default interface expects data to be specified in the form:
QuadMesh((X, Y, Z))
where X and Y may be 1D or 2D arrays of the shape N(+1) and M(+1) respectively or N(+1)xM(+1) and the Z value array should be of shape NxM. Other gridded formats such as xarray are also supported if installed.
The grid orientation follows the standard matrix convention: An array Z with shape (nrows, ncolumns) is plotted with the column number as X and the row number as Y.
group
= param.String(default=’QuadMesh’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(1, None), default=[Dimension(‘z’)])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.raster.QuadMesh'>)¶

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
(**kwargs)¶ 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.QuadMesh'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.QuadMesh'>)¶

groupby
(**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 dictionarylike) 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

property
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.raster.QuadMesh'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.QuadMesh'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.QuadMesh'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.QuadMesh'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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

trimesh
(**kwargs)¶ Converts a QuadMesh into a TriMesh.

verbose
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**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.
group
= param.String(default=’Bars’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(1, 3), default=[Dimension(‘x’)])The key dimension(s) of a Chart represent the independent variable(s).
vdims
= param.List(bounds=(1, None), default=[Dimension(‘y’)])The value dimensions of the Chart, usually corresponding to a number of dependent variables.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ 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
(**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 dictionarylike) 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

property
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
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

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

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Rectangles
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.selection.SelectionGeomExpr
,holoviews.element.geom.Geometry
Rectangles represent a collection of axisaligned rectangles in 2D space.
group
= param.String(default=’Rectangles’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(4, 4), default=[Dimension(‘x0’), Dimension(‘y0’), Dimension(‘x1’), Dimension(‘y1’)])The key dimensions of the Rectangles element represent the bottomleft (x0, y0) and top right (x1, y1) coordinates of each box.
vdims
= param.List(bounds=(0, None), default=[])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.geom.Rectangles'>)¶

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
(**kwargs)¶ 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.geom.Rectangles'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Rectangles'>)¶

groupby
(**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 dictionarylike) 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

property
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.geom.Rectangles'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Rectangles'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.geom.Rectangles'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Rectangles'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
RGB
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.element.raster.Image
RGB represents a regularly spaced 2D grid of an underlying continuous space of RGB(A) (red, green, blue and alpha) color space values. The definition of the grid closely matches the semantics of an Image and in the simplest case the grid may be specified as a NxMx3 or NxMx4 array of values along with a bounds, but it may also be defined through explicit and regularly spaced x/ycoordinate arrays. The two most basic supported constructors of an RGB element therefore include:
RGB((X, Y, R, G, B))
where X is a 1D array of shape M, Y is a 1D array of shape N and R/G/B are 2D array of shape NxM, or equivalently:
RGB(Z, bounds=(x0, y0, x1, y1))
where Z is a 3D array of stacked R/G/B arrays with shape NxMx3/4 and the bounds define the (left, bottom, top, right) edges of the four corners of the grid. Other gridded formats which support declaring of explicit x/ycoordinate arrays such as xarray are also supported.
Note that the interpretation of the orientation changes depending on whether bounds or explicit coordinates are used.
group
= param.String(default=’RGB’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The label of the x and ydimension of the Raster in the form of a string or dimension object.
vdims
= param.List(bounds=(3, 4), default=[Dimension(‘R’), Dimension(‘G’), Dimension(‘B’)])The dimension description of the data held in the matrix. If an alpha channel is supplied, the defined alpha_dimension is automatically appended to this list.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘grid’, ‘xarray’, ‘image’, ‘cube’, ‘dataframe’, ‘dictionary’])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).
bounds
= param.ClassSelector(class_=<class ‘holoviews.core.boundingregion.BoundingRegion’>, default=BoundingBox(radius=0.5))The bounding region in sheet coordinates containing the data.
rtol
= param.Number(inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))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.
alpha_dimension
= param.ClassSelector(class_=<class ‘holoviews.core.dimension.Dimension’>, default=Dimension(‘A’))The alpha dimension definition to add the value dimensions if an alpha channel is supplied.

add_dimension
(**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 or 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
(**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.

classmethod
collapse_data
(data_list, function, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.raster.RGB'>)¶

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
(**kwargs)¶ 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.RGB'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.RGB'>)¶

groupby
(**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 dictionarylike) 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

property
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.raster.RGB'>)¶

classmethod
load_image
(filename, height=1, array=False, bounds=None, bare=False, **kwargs)[source]¶ Returns an raster element or raw numpy array from a PNG image file, using matplotlib.
The specified height determines the bounds of the raster object in sheet coordinates: by default the height is 1 unit with the width scaled appropriately by the image aspect ratio.
Note that as PNG images are encoded as RGBA, the red component maps to the first channel, the green component maps to the second component etc. For RGB elements, this mapping is trivial but may be important for subclasses e.g. for HSV elements.
Setting bare=True will apply options disabling axis labels displaying just the bare image. Any additional keyword arguments will be passed to the Image object.

map
(**kwargs)¶ 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 floatingpoint 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.RGB'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

reduce
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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

property
rgb
¶ Returns the corresponding RGB element.
Other than the updating parameter definitions, this is the only change needed to implemented an arbitrary colorspace as a subclass of RGB.

sample
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**kwargs)¶ 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.

classmethod
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.RGB'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.RGB'>)¶

property
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 xcenter of each matrix cell, and y represents the corresponding ycenter of the cell.

sort
(**kwargs)¶ 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 shortterm 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
(**kwargs)¶ 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’.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

property
xdensity
¶ The spacing between elements in an underlying matrix representation, in the x direction.

property
ydensity
¶ The spacing between elements in an underlying matrix representation, in the y direction.

class
holoviews.element.
Annotation
(data, **params)[source]¶ Bases:
holoviews.core.element.Element2D
An Annotation is a special type of element that is designed to be overlaid on top of any arbitrary 2D element. Annotations have neither key nor value dimensions allowing them to be overlaid over any type of data.
Note that one or more Annotations can be displayed without being overlaid on top of any other data. In such instances (by default) they will be displayed using the unit axis limits (0.01.0 in both directions) unless an explicit ‘extents’ parameter is supplied. The extents of the bottom Annotation in the Overlay is used when multiple Annotations are displayed together.
group
= param.String(default=’Annotation’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple 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
(*args, **overrides)[source]¶ Clones the object, overriding data and parameters.
 Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked
Determines whether Streams and Links attached to original object will be inherited.
*args: Additional arguments to pass to constructor **overrides: New keyword arguments to pass to constructor
 Returns:
Cloned object

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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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.Annotation'>)¶

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.Annotation'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Annotation'>)¶

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.Annotation'>)¶

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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Annotation'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
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.Annotation'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Annotation'>)¶

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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Nodes
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.geom.Points
Nodes is a simple Element representing Graph nodes as a set of Points. Unlike regular Points, Nodes must define a third key dimension corresponding to the node index.
group
= param.String(default=’Nodes’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(3, 3), default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘index’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(0, None), default=[])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.graphs.Nodes'>)¶

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
(**kwargs)¶ 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.graphs.Nodes'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Nodes'>)¶

groupby
(**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 dictionarylike) 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

property
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.graphs.Nodes'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Nodes'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.graphs.Nodes'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Nodes'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Chord
(data, kdims=None, vdims=None, compute=True, **params)[source]¶ Bases:
holoviews.element.graphs.Graph
Chord is a special type of Graph which computes the locations of each node on a circle and the chords connecting them. The amount of radial angle devoted to each node and the number of chords are scaled by a weight supplied as a value dimension.
If the values are integers then the number of chords is directly scaled by the value, if the values are floats then the number of chords are apportioned such that the lowest value edge is given one chord and all other nodes are given nodes proportional to their weight.
group
= param.String(default=’Chord’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘start’), Dimension(‘end’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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

property
edgepaths
¶ Returns the fixed EdgePaths or computes direct connections between supplied nodes.

force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Chord'>)¶

classmethod
from_networkx
(G, positions, nodes=None, **kwargs)¶ Generate a HoloViews Graph from a networkx.Graph object and networkx layout function or dictionary of node positions. Any keyword arguments will be passed to the layout function. By default it will extract all node and edge attributes from the networkx.Graph but explicit node information may also be supplied. Any nonscalar attributes, such as lists or dictionaries will be ignored.
 Args:
G (networkx.Graph): Graph to convert to Graph element positions (dict or callable): Node positions
Node positions defined as a dictionary mapping from node id to (x, y) tuple or networkx layout function which computes a positions dictionary
kwargs (dict): Keyword arguments for layout function
 Returns:
Graph element

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

get_dimension_index
(dimension)¶ Get the index of the requested dimension.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Integer index of the requested dimension

get_dimension_type
(**kwargs)¶ 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.graphs.Chord'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Chord'>)¶

groupby
(**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 dictionarylike) 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

property
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.graphs.Chord'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

property
nodes
¶ Computes the node positions the first time they are requested if no explicit node information was supplied.

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Chord'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

reduce
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**kwargs)¶ 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.
Selecting by a node dimensions selects all edges and nodes that are connected to the selected nodes. To select only edges between the selected nodes set the selection_mode to ‘nodes’.

classmethod
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.graphs.Chord'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.graphs.Chord'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Spread
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.chart.ErrorBars
Spread is a Chart element representing a spread of values or confidence band in a 1D coordinate system. The key dimension(s) corresponds to the location along the xaxis and the value dimensions define the location along the yaxis as well as the symmetric or assymetric spread.
group
= param.String(default=’Spread’)A string describing the quantity measured by the ErrorBars object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(1, 2), default=[Dimension(‘x’)])The key dimension(s) of a Chart represent the independent variable(s).
vdims
= param.List(bounds=(1, None), default=[Dimension(‘y’), Dimension(‘yerror’)])The value dimensions of the Chart, usually corresponding to a number of dependent variables.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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).
horizontal
= param.Boolean(bounds=(0, 1), default=False)Whether the errors are along yaxis (vertical) or xaxis.

add_dimension
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.Spread'>)¶

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
(**kwargs)¶ 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.Spread'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Spread'>)¶

groupby
(**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 dictionarylike) 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

property
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.Spread'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Spread'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ Return the lower and upper bounds of values along dimension.
Range of the ydimension includes the symmetric or assymetric error.
 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.Spread'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.chart.Spread'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Segments
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.selection.SelectionGeomExpr
,holoviews.element.geom.Geometry
Segments represent a collection of lines in 2D space.
group
= param.String(default=’Segments’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(4, 4), default=[Dimension(‘x0’), Dimension(‘y0’), Dimension(‘x1’), Dimension(‘y1’)])Segments represent lines given by x and y coordinates in 2D space.
vdims
= param.List(bounds=(0, None), default=[])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.geom.Segments'>)¶

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
(**kwargs)¶ 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.geom.Segments'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Segments'>)¶

groupby
(**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 dictionarylike) 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

property
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.geom.Segments'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Segments'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.geom.Segments'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.geom.Segments'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Ellipse
(x, y, spec, **params)[source]¶ Bases:
holoviews.element.path.BaseShape
Draw an axisaligned 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.
group
= param.String(default=’Ellipse’)The assigned group name.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(0, None), default=[])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.ObjectSelector(default=[‘multitabular’, ‘spatialpandas’], objects=[])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).
x
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The xposition of the ellipse center.
y
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The yposition of the ellipse center.
width
= param.Number(default=1, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The width of the ellipse.
height
= param.Number(default=1, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The height of the ellipse.
orientation
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Orientation in the Cartesian coordinate system, the counterclockwise angle in radians between the first axis and the horizontal.
aspect
= param.Number(default=1.0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Optional multiplier applied to the diameter to compute the width in cases where only the diameter value is set.
samples
= param.Number(default=100, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The sample count used to draw the ellipse.

add_dimension
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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
(**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

classmethod
collapse_data
(data_list, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.Ellipse'>)¶

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
(**kwargs)¶ 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.Ellipse'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Ellipse'>)¶

groupby
(**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 dictionarylike) 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

property
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.Ellipse'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Ellipse'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.Ellipse'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Ellipse'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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
(**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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Div
(data, **params)[source]¶ Bases:
holoviews.core.element.Element
The Div element represents a div DOM node in an HTML document defined as a string containing valid HTML.
group
= param.String(default=’Div’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(0, None), default=[])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.

array
(dimensions=None)¶ Convert dimension values to columnar array.
 Args:
dimensions: List of dimensions to return
 Returns:
Array of columns corresponding to each dimension

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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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.annotation.Div'>)¶

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.Div'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Div'>)¶

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.Div'>)¶

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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Div'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
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.Div'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.Div'>)¶

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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Element
(data, kdims=None, vdims=None, **params)[source]¶ Bases:
holoviews.core.dimension.ViewableElement
,holoviews.core.layout.Composable
,holoviews.core.overlay.Overlayable
Element is the atomic datastructure used to wrap some data with an associated visual representation, e.g. an element may represent a set of points, an image or a curve. Elements provide a common API for interacting with data of different types and define how the data map to a set of dimensions and how those map to the visual representation.
group
= param.String(default=’Element’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(0, None), default=[])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.

array
(dimensions=None)[source]¶ Convert dimension values to columnar array.
 Args:
dimensions: List of dimensions to return
 Returns:
Array of columns corresponding to each dimension

clone
(data=None, shared_data=True, new_type=None, link=True, *args, **overrides)¶ Clones the object, overriding data and parameters.
 Args:
data: New data replacing the existing data shared_data (bool, optional): Whether to use existing data new_type (optional): Type to cast object to link (bool, optional): Whether clone should be linked
Determines whether Streams and Links attached to original object will be inherited.
*args: Additional arguments to pass to constructor **overrides: New keyword arguments to pass to constructor
 Returns:
Cloned object

closest
(coords, **kwargs)[source]¶ Snap list or dict of coordinates to closest position.
 Args:
coords: List of 1D or 2D coordinates **kwargs: Coordinates specified as keyword pairs
 Returns:
List of tuples of the snapped coordinates
 Raises:
NotImplementedError: Raised if snapping is not supported

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)[source]¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(dimensions=None, multi_index=False)[source]¶ Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.
 Args:
dimensions: Dimensions to return as columns multi_index: Convert key dimensions to (multi)index
 Returns:
DataFrame of columns corresponding to each dimension

dimension_values
(dimension, expanded=True, flat=True)¶ Return the values along the requested dimension.
 Args:
dimension: The dimension to return values for expanded (bool, optional): Whether to expand values
Whether to return the expanded values, behavior depends on the type of data:
Columnar: If false returns unique values
Geometry: If false returns scalar values per geometry
Gridded: If false returns 1D coordinates
flat (bool, optional): Whether to flatten array
 Returns:
NumPy array of values along the requested dimension

dimensions
(selection='all', label=False)¶ Lists the available dimensions on the object
Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.
 Args:
 selection: Type of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
 label: Whether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
 Returns:
List of Dimension objects or their names or labels

force_new_dynamic_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

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

get_dimension_index
(dimension)¶ Get the index of the requested dimension.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Integer index of the requested dimension

get_dimension_type
(dim)¶ Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.
 Args:
dimension: Dimension to look up by name or by index
 Returns:
Declared type of values along the dimension

get_param_values
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

hist
(dimension=None, num_bins=20, bin_range=None, adjoin=True, **kwargs)[source]¶ Computes and adjoins histogram along specified dimension(s).
Defaults to first value dimension if present otherwise falls back to first key dimension.
 Args:
dimension: Dimension(s) to compute histogram on num_bins (int, optional): Number of bins bin_range (tuple optional): Lower and upper bounds of bins adjoin (bool, optional): Whether to adjoin histogram
 Returns:
AdjointLayout of element and histogram or just the histogram

inspect_value
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

map
(map_fn, specs=None, clone=True)¶ Map a function to all objects matching the specs
Recursively replaces elements using a map function when the specs apply, by default applies to all objects, e.g. to apply the function to all contained Curve objects:
dmap.map(fn, hv.Curve)
 Args:
map_fn: Function to apply to each object specs: List of specs to match
List of types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
clone: Whether to clone the object or transform inplace
 Returns:
Returns the object after the map_fn has been applied

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

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(dimension, data_range=True, dimension_range=True)¶ Return the lower and upper bounds of values along dimension.
 Args:
dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges
Whether to include Dimension range and soft_range in range calculation
 Returns:
Tuple containing the lower and upper bound

reduce
(dimensions=[], function=None, spreadfn=None, **reduction)[source]¶ Applies reduction along the specified dimension(s).
Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:
Reducing with a list of dimensions, e.g.:
ds.reduce([‘x’], np.mean)
Defining a reduction using keywords, e.g.:
ds.reduce(x=np.mean)
 Args:
 dimensions: Dimension(s) to apply reduction on
Defaults to all key dimensions
function: Reduction operation to apply, e.g. numpy.mean spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **reductions: Keyword argument defining reduction
Allows reduction to be defined as keyword pair of dimension and function
 Returns:
The element after reductions have been applied.

relabel
(label=None, group=None, depth=0)¶ Clone object and apply new group and/or label.
Applies relabeling to children up to the supplied depth.
 Args:
label (str, optional): New label to apply to returned object group (str, optional): New group to apply to returned object depth (int, optional): Depth to which relabel will be applied
If applied to container allows applying relabeling to contained objects up to the specified depth
 Returns:
Returns relabelled object

sample
(samples=[], bounds=None, closest=False, **sample_values)[source]¶ Samples values at supplied coordinates.
Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:
Sampling with a list of coordinates, e.g.:
ds.sample([(0, 0), (0.1, 0.2), …])
Sampling a range or grid of coordinates, e.g.:
1D: ds.sample(3) 2D: ds.sample((3, 3))
Sampling by keyword, e.g.:
ds.sample(x=0)
 Args:
samples: List of ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
set_default
(*args, **kwargs)¶ Inspect .param.set_default method for the full docstring

set_dynamic_time_fn
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.core.element.Element'>)¶

state_pop
()¶ Restore the most recently saved state.
See state_push() for more details.

state_push
()¶ Save this instance’s state.
For Parameterized instances, this includes the state of dynamically generated values.
Subclasses that maintain shortterm state should additionally save and restore that state using state_push() and state_pop().
Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

traverse
(fn=None, specs=None, full_breadth=True)¶ Traverses object returning matching items Traverses the set of children of the object, collecting the all objects matching the defined specs. Each object can be processed with the supplied function. Args:
fn (function, optional): Function applied to matched objects specs: List of specs to match
Specs must be types, functions or type[.group][.label] specs to select objects to return, by default applies to all objects.
 full_breadth: Whether to traverse all objects
Whether to traverse the full set of objects on each container or only the first.
 Returns:
list: List of objects that matched

verbose
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**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.
group
= param.String(default=’Raster’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The label of the x and ydimension of the Raster in form of a string or dimension object.
vdims
= param.List(bounds=(1, None), default=[Dimension(‘z’)])The dimension description of the data held in the matrix.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple 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

classmethod
collapse_data
(data_list, function, kdims=None, **kwargs)[source]¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.raster.Raster'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(dim, data_range=True, dimension_range=True)[source]¶ Return the lower and upper bounds of values along dimension.
 Args:
dimension: The dimension to compute the range on. data_range (bool): Compute range from data values dimension_range (bool): Include Dimension ranges
Whether to include Dimension range and soft_range in range calculation
 Returns:
Tuple containing the lower and upper bound

reduce
(dimensions=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=[], bounds=None, **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

classmethod
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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**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 zaxis while the value dimensions can optionally supply additional information.
group
= param.String(default=’Scatter3D’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(0, None), default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(0, None), default=[])Scatter3D can have optional value dimensions, which may be mapped onto color and size.
extents
= param.Tuple(default=(None, None, None, None, None, None), length=6)Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ 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
(**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 dictionarylike) 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

property
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
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

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

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Box
(x, y, spec, **params)[source]¶ Bases:
holoviews.element.path.BaseShape
Draw a centered box of a given width at the given position with the specified aspect ratio (if any).
group
= param.String(default=’Box’)The assigned group name.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])The key dimensions of a geometry represent the x and y coordinates in a 2D space.
vdims
= param.List(bounds=(0, None), default=[])Value dimensions can be associated with a geometry.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.ObjectSelector(default=[‘multitabular’, ‘spatialpandas’], objects=[])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).
x
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The xposition of the box center.
y
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The yposition of the box center.
width
= param.Number(default=1, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The width of the box.
height
= param.Number(default=1, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))The height of the box.
orientation
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Orientation in the Cartesian coordinate system, the counterclockwise angle in radians between the first axis and the horizontal.
aspect
= param.Number(default=1.0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Optional multiplier applied to the box size to compute the width in cases where only the length value is set.

add_dimension
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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
(**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

classmethod
collapse_data
(data_list, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.Box'>)¶

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
(**kwargs)¶ 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.Box'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Box'>)¶

groupby
(**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 dictionarylike) 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

property
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.Box'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Box'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.Box'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.path.Box'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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
(**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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Violin
(data, kdims=None, vdims=None, **kwargs)[source]¶ Bases:
holoviews.element.stats.BoxWhisker
Violin elements represent data as 1D distributions visualized as a kerneldensity estimate. It may have a single value dimension and any number of key dimensions declaring the grouping of each violin.
group
= param.String(default=’Violin’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(0, None), default=[])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(1, 1), default=[Dimension(‘y’)])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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.Violin'>)¶

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
(**kwargs)¶ 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.Violin'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.Violin'>)¶

groupby
(**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 dictionarylike) 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

property
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.Violin'>)¶

map
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

options
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.Violin'>)¶

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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.Violin'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.stats.Violin'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
VLine
(x, **params)[source]¶ Bases:
holoviews.element.annotation.Annotation
Vertical line annotation at the given position.
group
= param.String(default=’VLine’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
x
= param.ClassSelector(class_=(<class ‘numbers.Number’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), default=0)The xposition 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

clone
(*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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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.VLine'>)¶

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.VLine'>)¶

get_value_generator
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.VLine'>)¶

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.VLine'>)¶

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
(**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
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.VLine'>)¶

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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

classmethod
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.VLine'>)¶

set_param
= functools.partial(<function Parameters.deprecate.<locals>.inner>, <class 'holoviews.element.annotation.VLine'>)¶

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 shortterm 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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**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 xaxis, 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.
group
= param.String(default=’Area’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(1, 2), default=[Dimension(‘x’)])The key dimension(s) of a Chart represent the independent variable(s).
vdims
= param.List(bounds=(1, None), default=[Dimension(‘y’)])The value dimensions of the Chart, usually corresponding to a number of dependent variables.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
datatype
= param.List(bounds=(0, None), default=[‘dataframe’, ‘dictionary’, ‘grid’, ‘spatialpandas’, ‘xarray’, ‘cuDF’, ‘dask’, ‘array’, ‘multitabular’])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
(**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 or 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
(**kwargs)¶ Aggregates data on the supplied dimensions.
Aggregates over the supplied key dimensions with the defined function or dim_transform specified as a tuple of the transformed dimension name and dim transform.
 Args:
 dimensions: Dimension(s) to aggregate on
Default to all key dimensions
 function: Aggregation function or transform to apply
Supports both simple functions and dimension transforms
 spreadfn: Secondary reduction to compute value spread
Useful for computing a confidence interval, spread, or standard deviation.
 **kwargs: Keyword arguments either passed to the aggregation function
or to create new names for the transformed variables
 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, 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
(**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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

columns
(**kwargs)¶ 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

property
dataset
¶ The Dataset that this object was created from

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**kwargs)¶ Inspect .param.defaults method for the full docstring

dframe
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ 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
(**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 dictionarylike) 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

property
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
(**kwargs)¶ 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
(**kwargs)¶ Inspect .param.message method for the full docstring

property
ndloc
¶ Returns ndloc indexer with support for gridded indexing.
Returns an ndloc object providing ndarray like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multidimensional 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]
, whereiy
andix
are integer indices along the y and x dimensions.Examples:
Index value in 2D array:
dataset.ndloc[3, 1]
Slice along yaxis of 2D array:
dataset.ndloc[2:5, :]
Vectorized (nonorthogonal) indexing along x and yaxes:
dataset.ndloc[[1, 2, 3], [0, 2, 3]]

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

property
pipeline
¶ Chain operation that evaluates the sequence of operations that was used to create this object, starting with the Dataset stored in dataset property

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.

classmethod
print_param_defaults
(*args, **kwargs)¶ Inspect .param.print_param_defaults method for the full docstring

print_param_values
(**kwargs)¶ Inspect .param.print_param_values method for the full docstring

range
(**kwargs)¶ 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
(**kwargs)¶ 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
(**kwargs)¶ Reindexes Dataset dropping static or supplied kdims
Creates a new object with a reordered or reduced set of key dimensions. By default drops all nonvarying key dimensions.x
 Args:
kdims (optional): New list of key dimensionsx vdims (optional): New list of value dimensions
 Returns:
Reindexed object

relabel
(**kwargs)¶ 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
(**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 ndcoordinates to sample bounds: Bounds of the region to sample
Defined as twotuple for 1D sampling and fourtuple 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
(**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])
predicate expression: A holoviews.dim expression, e.g.:
from holoviews import dim ds.select(selection_expr=dim(‘x’) % 2 == 0)
 Args:
 selection_expr: holoviews.dim predicate expression
specifying selection.
 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

classmethod
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'>)¶

property
shape
¶ Returns the shape of the data.

sort
(**kwargs)¶ 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 shortterm 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.

property
to
¶ Returns the conversion interface with methods to convert Dataset

transform
(**kwargs)¶ Transforms the Dataset according to a dimension transform.
Transforms may be supplied as tuples consisting of the dimension(s) and the dim transform to apply or keyword arguments mapping from dimension(s) to dim transforms. If the arg or kwarg declares multiple dimensions the dim transform should return a tuple of values for each.
A transform may override an existing dimension or add a new one in which case it will be added as an additional value dimension.
 Args:
 args: Specify the output arguments and transforms as a
tuple of dimension specs and dim transforms
drop (bool): Whether to drop all variables not part of the transform keep_index (bool): Whether to keep indexes
Whether to apply transform on datastructure with index, e.g. pandas.Series or xarray.DataArray, (important for dask datastructures where index may be required to align datasets).
kwargs: Specify new dimensions in the form new_dim=dim_transform
 Returns:
Transformed dataset with new dimensions

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
(**kwargs)¶ Inspect .param.verbose method for the full docstring

warning
(**kwargs)¶ Inspect .param.warning method for the full docstring

class
holoviews.element.
Text
(x, y, text, fontsize=12, halign='center', valign='center', rotation=0, **params)[source]¶ Bases:
holoviews.element.annotation.Annotation
Draw a text annotation at the specified position with custom fontsize, alignment and rotation.
group
= param.String(default=’Text’)A string describing the data wrapped by the object.
label
= param.String(default=’’)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.
cdims
= param.Dict(class_=<class ‘dict’>, default=OrderedDict())The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims
= param.List(bounds=(2, 2), default=[Dimension(‘x’), Dimension(‘y’)])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 multidimensional indexing operation. Aliased with key_dimensions.
vdims
= param.List(bounds=(0, None), default=[])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.
extents
= param.Tuple(default=(None, None, None, None), length=4)Allows overriding the extents of the Element in 2D space defined as fourtuple defining the (left, bottom, right and top) edges.
x
= param.ClassSelector(class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), default=0)The xposition of the arrow which make be numeric or a timestamp.
y
= param.ClassSelector(class_=(<class ‘numbers.Number’>, <class ‘str’>, <class ‘numpy.datetime64’>, <class ‘datetime.datetime’>, <class ‘datetime.date’>, <class ‘datetime.time’>, <class ‘pandas._libs.tslibs.timestamps.Timestamp’>, <class ‘pandas.core.dtypes.dtypes.DatetimeTZDtype’>, <class ‘pandas._libs.tslibs.period.Period’>, <class ‘cftime._cftime.datetime’>), default=0)The yposition of the arrow which make be numeric or a timestamp.
text
= param.String(default=’’)The text to be displayed.
fontsize
= param.Number(default=12, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Font size of the text.
rotation
= param.Number(default=0, inclusive_bounds=(True, True), time_dependent=False, time_fn=Time(label=’Time’, name=’Time00001’, time_type=<class ‘int’>, timestep=1.0, unit=None, until=Infinity()))Text rotation angle in degrees.
halign
= param.ObjectSelector(default=’center’, objects=[‘left’, ‘right’, ‘center’])The horizontal alignment position of the displayed text. Allowed values are ‘left’, ‘right’ and ‘center’.
valign
= param.ObjectSelector(default=’center’, objects=[‘top’, ‘bottom’, ‘center’])The vertical alignment position of the displayed text. Allowed values are ‘center’, ‘top’ and ‘bottom’.

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

classmethod
collapse_data
(data, function=None, kdims=None, **kwargs)¶ Deprecated method to perform collapse operations, which may now be performed through concatenation and aggregation.

property
ddims
¶ The list of deep dimensions

debug
(**kwargs)¶ Inspect .param.debug method for the full docstring

defaults
(**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 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