# holoviews.element Package ¶

##  element  Package ¶

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

Scatter is a Element2D type which gets displayed as a number of disconnected points.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Scatter, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(1, 2), constant=False, default=[Dimension(‘x’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart.Scatter'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart.Scatter'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart.Scatter'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart.Scatter'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart.Scatter'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   Ellipse  ( x , y , spec , **params ) [source]

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

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

Ellipse(x,y, diameter)

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

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

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

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

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Ellipse, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The assigned group name.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Image in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector  datatype  ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’], instantiate=True, objects=[], pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param Number  x  ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
The x-position of the ellipse center.
param Number  y  ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
The y-position of the ellipse center.
param Number  width  ( allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
The width of the ellipse.
param Number  height  ( allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
The height of the ellipse.
param Number  orientation  ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
Orientation in the Cartesian coordinate system, the counterclockwise angle in radians between the first axis and the horizontal.
param Number  aspect  ( allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
Optional multiplier applied to the diameter to compute the width in cases where only the diameter value is set.
param Number  samples  ( allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
The sample count used to draw the ellipse.
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

 clone  ( *args , **overrides )

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

 closest  ( coords=[] , **kwargs )

Given a single coordinate or multiple coordinates as a tuple or list of tuples or keyword arguments matching the dimension closest will find the closest actual x/y coordinates. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.path.Ellipse'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.path.Ellipse'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.path.Ellipse'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

Bypasses selection on data and sets extents based on selection.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.path.Ellipse'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.path.Ellipse'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 split  ( start=None , end=None , datatype=None , **kwargs )

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

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

An RGB element is a Image containing channel data for the the red, green, blue and (optionally) the alpha channels. The values of each channel must be in the range 0.0 to 1.0.

In input array may have a shape of NxMx4 or NxMx3. In the latter case, the defined alpha dimension parameter is appended to the list of value dimensions.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=RGB, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Raster in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(3, 4), constant=False, default=[Dimension(‘R’), Dimension(‘G’), Dimension(‘B’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
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.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘image’, ‘grid’, ‘xarray’, ‘cube’, ‘dataframe’, ‘dictionary’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param ClassSelector  bounds  ( allow_None=False, constant=False, default=BoundingBox(radius=0.5), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The bounding region in sheet coordinates containing the data.
param ClassSelector  alpha_dimension  ( allow_None=False, constant=False, default=A, instantiate=False, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The alpha dimension definition to add the value dimensions if an alpha channel is supplied.
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

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

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

 closest  ( coords=[] , **kwargs )

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

 closest_cell_center  ( x , y )

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.raster.RGB'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.raster.RGB'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <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  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 matrix2sheet  ( float_row , float_col )

Convert a floating-point location (float_row,float_col) in matrix coordinates to its corresponding location (x,y) in sheet coordinates.

Valid for scalar or array float_row and float_col.

Inverse of sheet2matrix().

 matrixidx2sheet  ( row , col )

Return (x,y) where x and y are the floating point coordinates of the center of the given matrix cell (row,col). If the matrix cell represents a 0.2 by 0.2 region, then the center location returned would be 0.1,0.1.

NOTE: This is NOT the strict mathematical inverse of sheet2matrixidx(), because sheet2matrixidx() discards all but the integer portion of the continuous matrix coordinate.

Valid only for scalar or array row and col.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.raster.RGB'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.raster.RGB'>)
 shape 

Returns the shape of the data.

 sheet2matrix  ( x , y )

Convert a point (x,y) in Sheet coordinates to continuous matrix coordinates.

Returns (float_row,float_col), where float_row corresponds to y, and float_col to x.

Valid for scalar or array x and y.

Note about Bounds For a Sheet with BoundingBox(points=((-0.5,-0.5),(0.5,0.5))) and density=3, x=-0.5 corresponds to float_col=0.0 and x=0.5 corresponds to float_col=3.0. float_col=3.0 is not inside the matrix representing this Sheet, which has the three columns (0,1,2). That is, x=-0.5 is inside the BoundingBox but x=0.5 is outside. Similarly, y=0.5 is inside (at row 0) but y=-0.5 is outside (at row 3) (it’s the other way round for y because the matrix row index increases as y decreases).

 sheet2matrixidx  ( x , y )

Convert a point (x,y) in sheet coordinates to the integer row and column index of the matrix cell in which that point falls, given a bounds and density. Returns (row,column).

Note that if coordinates along the right or bottom boundary are passed into this function, the returned matrix coordinate of the boundary will be just outside the matrix, because the right and bottom boundaries are exclusive.

Valid for scalar or array x and y.

 sheetcoordinates_of_matrixidx  ( )

Return x,y where x is a vector of sheet coordinates representing the x-center of each matrix cell, and y represents the corresponding y-center of the cell.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

 xdensity 

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

 ydensity 

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

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

Bases:  holoviews.core.element.Element3D  ,  holoviews.element.chart.Scatter 

Scatter3D object represents a number of coordinates in 3D-space. Additionally Scatter3D points may have any number of value dimensions. The data may therefore be supplied as NxD matrix where N represents the number of samples, and D the number of key and value dimensions.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Scatter3D, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Scatter3D can have optional value dimensions, which may be mapped onto color and size.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart3d.Scatter3D'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart3d.Scatter3D'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart3d.Scatter3D'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart3d.Scatter3D'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart3d.Scatter3D'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

EdgePaths is a simple Element representing the paths of edges connecting nodes in a graph.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=EdgePaths, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Image in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector  datatype  ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’], instantiate=True, objects=[], pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.graphs.EdgePaths'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.graphs.EdgePaths'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.graphs.EdgePaths'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

Bypasses selection on data and sets extents based on selection.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.graphs.EdgePaths'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.graphs.EdgePaths'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 split  ( start=None , end=None , datatype=None , **kwargs )

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

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   Image  ( data , kdims=None , vdims=None , bounds=None , extents=None , xdensity=None , ydensity=None , **params ) [source]

Image is the atomic unit as which 2D data is stored, along with its bounds object. The input data may be a numpy.matrix object or a two-dimensional numpy array.

Allows slicing operations of the data in sheet coordinates or direct access to the data, via the .data attribute.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Image, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Raster in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(1, 1), constant=False, default=[Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The dimension description of the data held in the matrix.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘image’, ‘grid’, ‘xarray’, ‘cube’, ‘dataframe’, ‘dictionary’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param ClassSelector  bounds  ( allow_None=False, constant=False, default=BoundingBox(radius=0.5), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The bounding region in sheet coordinates containing the data.
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

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

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

 closest  ( coords=[] , **kwargs ) [source]

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.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.raster.Image'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.raster.Image'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.raster.Image'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 matrix2sheet  ( float_row , float_col )

Convert a floating-point location (float_row,float_col) in matrix coordinates to its corresponding location (x,y) in sheet coordinates.

Valid for scalar or array float_row and float_col.

Inverse of sheet2matrix().

 matrixidx2sheet  ( row , col )

Return (x,y) where x and y are the floating point coordinates of the center of the given matrix cell (row,col). If the matrix cell represents a 0.2 by 0.2 region, then the center location returned would be 0.1,0.1.

NOTE: This is NOT the strict mathematical inverse of sheet2matrixidx(), because sheet2matrixidx() discards all but the integer portion of the continuous matrix coordinate.

Valid only for scalar or array row and col.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.raster.Image'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.raster.Image'>)
 shape 

Returns the shape of the data.

 sheet2matrix  ( x , y )

Convert a point (x,y) in Sheet coordinates to continuous matrix coordinates.

Returns (float_row,float_col), where float_row corresponds to y, and float_col to x.

Valid for scalar or array x and y.

Note about Bounds For a Sheet with BoundingBox(points=((-0.5,-0.5),(0.5,0.5))) and density=3, x=-0.5 corresponds to float_col=0.0 and x=0.5 corresponds to float_col=3.0. float_col=3.0 is not inside the matrix representing this Sheet, which has the three columns (0,1,2). That is, x=-0.5 is inside the BoundingBox but x=0.5 is outside. Similarly, y=0.5 is inside (at row 0) but y=-0.5 is outside (at row 3) (it’s the other way round for y because the matrix row index increases as y decreases).

 sheet2matrixidx  ( x , y )

Convert a point (x,y) in sheet coordinates to the integer row and column index of the matrix cell in which that point falls, given a bounds and density. Returns (row,column).

Note that if coordinates along the right or bottom boundary are passed into this function, the returned matrix coordinate of the boundary will be just outside the matrix, because the right and bottom boundaries are exclusive.

Valid for scalar or array x and y.

 sheetcoordinates_of_matrixidx  ( )

Return x,y where x is a vector of sheet coordinates representing the x-center of each matrix cell, and y represents the corresponding y-center of the cell.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None ) [source]

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

 xdensity 

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

 ydensity 

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

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

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

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Table, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The group is used to describe the Table.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

 cell_type  ( row , col )

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

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.tabular.Table'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.tabular.Table'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.tabular.Table'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 pprint_cell  ( row , col )

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.tabular.Table'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.tabular.Table'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.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.0-1.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.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Annotation, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
 closest  ( coords )

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

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.annotation.Annotation'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.annotation.Annotation'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

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

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.annotation.Annotation'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

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

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

 sample  ( samples=[] , **sample_values )

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.annotation.Annotation'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <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 short-term state should additionally save and restore that state using state_push() and state_pop().

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

 table  ( datatype=None )

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

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

Bases:  holoviews.core.element.Element3D  ,  holoviews.element.chart.Scatter 

TriSurface object represents a number of coordinates in 3D-space, represented as a Surface of triangular polygons.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=TriSurface, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
TriSurface can have optional value dimensions, which may be mapped onto color and size.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart3d.TriSurface'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart3d.TriSurface'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart3d.TriSurface'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart3d.TriSurface'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart3d.TriSurface'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

QuadMesh is a Raster type to hold x- and y- bin values with associated values. The x- and y-values of the QuadMesh may be supplied either as the edges of each bin allowing uneven sampling or as the bin centers, which will be converted to evenly sampled edges.

As a secondary but less supported mode QuadMesh can contain a mesh of quadrilateral coordinates that is not laid out in a grid. The data should then be supplied as three separate 2D arrays for the x-/y-coordinates and grid values.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=QuadMesh, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Raster in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(1, 1), constant=False, default=[Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The dimension description of the data held in the matrix.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
 clone  ( data=None , shared_data=True , new_type=None , *args , **overrides )

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

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

 closest  ( coords )

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

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

Allows collapsing the data of a number of QuadMesh Elements with a function.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.raster.QuadMesh'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.raster.QuadMesh'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

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

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.raster.QuadMesh'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

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

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 )

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

 sample  ( samples=[] , **sample_values )

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 )

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.raster.QuadMesh'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.raster.QuadMesh'>)
 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   Text  ( x , y , text , fontsize=12 , halign='center' , valign='center' , rotation=0 , **params ) [source]

Draw a text annotation at the specified position with custom fontsize, alignment and rotation.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Text, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ClassSelector  x  ( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The x-position of the arrow which make be numeric or a timestamp.
param ClassSelector  y  ( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The y-position of the arrow which make be numeric or a timestamp.
param String  text  ( allow_None=False, basestring=<class ‘str’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
The text to be displayed.
param Number  fontsize  ( allow_None=False, bounds=None, constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
Font size of the text.
param Number  rotation  ( allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
Text rotation angle in degrees.
param ObjectSelector  halign  ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=center, instantiate=False, objects=[‘left’, ‘right’, ‘center’], pickle_default_value=True, precedence=None, readonly=False )
The horizontal alignment position of the displayed text. Allowed values are ‘left’, ‘right’ and ‘center’.
param ObjectSelector  valign  ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=center, instantiate=False, objects=[‘top’, ‘bottom’, ‘center’], pickle_default_value=True, precedence=None, readonly=False )
The vertical alignment position of the displayed text. Allowed values are ‘center’, ‘top’ and ‘bottom’.
 closest  ( coords )

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

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.annotation.Text'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.annotation.Text'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

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

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.annotation.Text'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

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

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

 sample  ( samples=[] , **sample_values )

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.annotation.Text'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.annotation.Text'>)
 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

An Area Element represents the area under a Curve and is specified in the same format as a regular Curve, with the key dimension corresponding to a column of x-values and the value dimension corresponding to a column of y-values. Optionally a second value dimension may be supplied to shade the region between the curves.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Area, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(1, 2), constant=False, default=[Dimension(‘x’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart.Area'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart.Area'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart.Area'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart.Area'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart.Area'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

classmethod  stack  ( areas ) [source]

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

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   Bounds  ( lbrt , **params ) [source]

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

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

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Bounds, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The assigned group name.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Image in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector  datatype  ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’], instantiate=True, objects=[], pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param NumericTuple  lbrt  ( allow_None=False, constant=False, default=(-0.5, -0.5, 0.5, 0.5), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
The (left, bottom, right, top) coordinates of the bounding box.
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

 clone  ( *args , **overrides )

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

 closest  ( coords=[] , **kwargs )

Given a single coordinate or multiple coordinates as a tuple or list of tuples or keyword arguments matching the dimension closest will find the closest actual x/y coordinates. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.path.Bounds'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.path.Bounds'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.path.Bounds'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

Bypasses selection on data and sets extents based on selection.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.path.Bounds'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.path.Bounds'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 split  ( start=None , end=None , datatype=None , **kwargs )

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

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   ItemTable  ( data , **params ) [source]

A tabular element type to allow convenient visualization of either a standard Python dictionary, an OrderedDict or a list of tuples (i.e. input suitable for an OrderedDict constructor). If an OrderedDict is used, the headings will be kept in the correct order. Tables store heterogeneous data with different labels.

Dimension objects are also accepted as keys, allowing dimensional information (e.g type and units) to be associated per heading.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=ItemTable, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(0, 0), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
ItemTables hold an index Dimension for each value they contain, i.e. they are equivalent to the keys.
param List  vdims  ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘Default’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
ItemTables should have only index Dimensions.
 cell_type  ( row , col ) [source]

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

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

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

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

 closest  ( coords )

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( ) [source]

Generates a Pandas dframe from the ItemTable.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.tabular.ItemTable'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.tabular.ItemTable'>)
 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.tabular.ItemTable'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 pprint_cell  ( row , col ) [source]

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.tabular.ItemTable'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.tabular.ItemTable'>)
 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

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

Surface Element represents a 3D surface in space. The data should be supplied as a dense NxM matrix.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Surface, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The Surface x and y dimensions of the space defined by the supplied extent.
param List  vdims  ( allow_None=False, bounds=(1, 1), constant=False, default=[Dimension(‘z’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The Surface height dimension.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None, None, None), instantiate=False, length=6, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘image’, ‘grid’, ‘xarray’, ‘cube’, ‘dataframe’, ‘dictionary’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param ClassSelector  bounds  ( allow_None=False, constant=False, default=BoundingBox(radius=0.5), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The bounding region in sheet coordinates containing the data.
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

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

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

 closest  ( coords=[] , **kwargs )

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

 closest_cell_center  ( x , y )

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart3d.Surface'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart3d.Surface'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart3d.Surface'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 matrix2sheet  ( float_row , float_col )

Convert a floating-point location (float_row,float_col) in matrix coordinates to its corresponding location (x,y) in sheet coordinates.

Valid for scalar or array float_row and float_col.

Inverse of sheet2matrix().

 matrixidx2sheet  ( row , col )

Return (x,y) where x and y are the floating point coordinates of the center of the given matrix cell (row,col). If the matrix cell represents a 0.2 by 0.2 region, then the center location returned would be 0.1,0.1.

NOTE: This is NOT the strict mathematical inverse of sheet2matrixidx(), because sheet2matrixidx() discards all but the integer portion of the continuous matrix coordinate.

Valid only for scalar or array row and col.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

 sample  ( samples=[] , **kwargs )

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart3d.Surface'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart3d.Surface'>)
 shape 

Returns the shape of the data.

 sheet2matrix  ( x , y )

Convert a point (x,y) in Sheet coordinates to continuous matrix coordinates.

Returns (float_row,float_col), where float_row corresponds to y, and float_col to x.

Valid for scalar or array x and y.

Note about Bounds For a Sheet with BoundingBox(points=((-0.5,-0.5),(0.5,0.5))) and density=3, x=-0.5 corresponds to float_col=0.0 and x=0.5 corresponds to float_col=3.0. float_col=3.0 is not inside the matrix representing this Sheet, which has the three columns (0,1,2). That is, x=-0.5 is inside the BoundingBox but x=0.5 is outside. Similarly, y=0.5 is inside (at row 0) but y=-0.5 is outside (at row 3) (it’s the other way round for y because the matrix row index increases as y decreases).

 sheet2matrixidx  ( x , y )

Convert a point (x,y) in sheet coordinates to the integer row and column index of the matrix cell in which that point falls, given a bounds and density. Returns (row,column).

Note that if coordinates along the right or bottom boundary are passed into this function, the returned matrix coordinate of the boundary will be just outside the matrix, because the right and bottom boundaries are exclusive.

Valid for scalar or array x and y.

 sheetcoordinates_of_matrixidx  ( )

Return x,y where x is a vector of sheet coordinates representing the x-center of each matrix cell, and y represents the corresponding y-center of the cell.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

 xdensity 

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

 ydensity 

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

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

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.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Nodes, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(3, 3), constant=False, default=[Dimension(‘x’), Dimension(‘y’), Dimension(‘index’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Points in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.graphs.Nodes'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.graphs.Nodes'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.graphs.Nodes'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.graphs.Nodes'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.graphs.Nodes'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

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

Allows sets of points to be positioned over a sheet coordinate system. Each points may optionally be associated with a chosen numeric value.

The input data can be a Nx2 or Nx3 Numpy array where the first two columns corresponds to the X,Y coordinates in sheet coordinates, within the declared bounding region. For Nx3 arrays, the third column corresponds to the magnitude values of the points. Any additional columns will be ignored (use VectorFields instead).

The input data may be also be passed as a tuple of elements that may be numpy arrays or values that can be cast to arrays. When such a tuple is supplied, the elements are joined column-wise into a single array, allowing the magnitudes to be easily supplied separately.

Note that if magnitudes are to be rendered correctly by default, they should lie in the range [0,1].

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Points, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Points in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

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

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

Aggregates over the supplied key dimensions with the defined function.

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

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

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

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

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

Returns the values along a particular dimension. If unique values are requested will return only unique values.

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart.Points'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart.Points'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

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

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

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart.Points'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 ndloc 

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

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

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

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

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

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

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

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

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

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

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.chart.Points'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.chart.Points'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None )

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

 to 

Property to create a conversion interface with methods to convert to other Element types.

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.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 baseclass for all ViewableElement types, with an x- and y-dimension. Subclasses should define the data storage in the constructor, as well as methods and properties, which define how the data maps onto the x- and y- and value dimensions.

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

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

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

 closest  ( coords ) [source]

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

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

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

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

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.core.element.Element'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

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

 get_param_values  ( onlychanged=False )

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

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

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.core.element.Element'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs ) [source]

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

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.core.element.Element'>)
 map  ( map_fn , specs=None , clone=True )

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

 matches  ( spec )

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

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

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

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

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

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

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.core.element.Element'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.core.element.Element'>)
 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

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

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

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

 table  ( datatype=None ) [source]

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

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

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

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

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

 warning  ( msg , *args , **kw )

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

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

class  holoviews.element.   Spline  ( spline_points , **params ) [source]

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

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Spline, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
 closest  ( coords )

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

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

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

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

 defaults  ( )

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

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

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

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

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.annotation.Spline'>)
 get_dimension  ( dimension , default=None , strict=False )

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

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

 get_param_values  ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.annotation.Spline'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.annotation.Spline'>)
 map  ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

 matches  ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

 pprint  ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

 reduce  ( dimensions=[] , function=None , **reduce_map )

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

 relabel  ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

 sample  ( samples=[] , **sample_values )

Base class signature to demonstrate API for sampling Elements. To sample an Element supply either a list of samples or keyword arguments, where the key should match an existing key dimension on the Element.

 script_repr  ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.annotation.Spline'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <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 short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

 table  ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

 traverse  ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

 warning  ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class  holoviews.element.   Path  ( data , kdims=None , vdims=None , **params ) [source]

Bases:  holoviews.core.data.Dataset  ,  holoviews.core.element.Element2D 

The Path Element contains a list of Paths stored as tabular data types including arrays, dataframes and dictionary of column arrays. In addition a number of convenient constructors are supported:

1. A list of lists containing x/y coordinate tuples.
2. A tuple containing an array of length N with the x-values and a second array of shape NxP, where P is the number of paths.
3. A list of tuples each containing arrays x and y values.

A Path can be split into subpaths using the split method or combined into a flat view using the dimension_values, table, and dframe methods, where each path is separated by a NaN value.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Path, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=True, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The label of the x- and y-dimension of the Image in form of a string or dimension object.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ObjectSelector  datatype  ( allow_None=False, check_on_set=False, compute_default_fn=None, constant=False, default=[‘multitabular’], instantiate=True, objects=[], pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

 aggregate  ( dimensions=None , function=None , spreadfn=None , **kwargs )

Aggregates over the supplied key dimensions with the defined function.

 clone  ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

 defaults  ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

 dimension_values  ( dim , expanded=True , flat=True )

Returns the values along a particular dimension. If unique values are requested will return only unique values.

 dimensions  ( selection='all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.path.Path'>)
 get_dimension  ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

 get_param_values  ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.path.Path'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.path.Path'>)
 map  ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

 matches  ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

 ndloc 

Returns an ndloc object providing nd-array like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multi-dimensional arrays using integer indices. The order of array indices is inverted relative to the Dataset key dimensions, e.g. an Image with key dimensions ‘x’ and ‘y’ can be indexed with  image.ndloc[iy, ix]  , where  iy  and  ix  are integer indices along the y and x dimensions.

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

• Vectorized (non-orthogonal) indexing along x- and y-axes:

dataset.ndloc[[1, 2, 3], [0, 2, 3]]

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

 pprint  ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dim , data_range=True )

Computes the range of values along a supplied dimension, taking into account the range and soft_range defined on the Dimension object.

 reduce  ( dimensions=[] , function=None , spreadfn=None , **reduce_map )

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

Create a new object with a re-ordered set of dimensions. Allows converting key dimensions to value dimensions and vice versa.

 relabel  ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

 sample  ( samples=[] , closest=True , **kwargs )

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

 script_repr  ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs ) [source]

Bypasses selection on data and sets extents based on selection.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.path.Path'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.path.Path'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 split  ( start=None , end=None , datatype=None , **kwargs ) [source]

The split method allows splitting a Path type into a list of subpaths of the same type. A start and/or end may be supplied to select a subset of paths.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

 table  ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

 to 

Property to create a conversion interface with methods to convert to other Element types.

 traverse  ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

 warning  ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class  holoviews.element.   Distribution  ( data , kdims=None , vdims=None , **params ) [source]

Bases:  holoviews.element.stats.StatisticsElement 

Distribution elements provides a representation for a one-dimensional distribution which can be visualized as a kernel density estimate. The data should be supplied in a tabular format and will use the first column.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Distribution, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(1, 1), constant=False, default=[Dimension(‘Value’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(0, 1), constant=False, default=[Dimension(‘Density’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

 aggregate  ( dimensions=None , function=None , spreadfn=None , **kwargs )

Aggregates over the supplied key dimensions with the defined function.

 clone  ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 collapse_data  ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

 defaults  ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

 dimension_values  ( dim , expanded=True , flat=True )

Returns the values along a particular dimension. If unique values are requested will return only unique values.

 dimensions  ( selection='all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.stats.Distribution'>)
 get_dimension  ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

 get_param_values  ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.stats.Distribution'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.stats.Distribution'>)
 map  ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

 matches  ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

 ndloc 

Returns an ndloc object providing nd-array like indexing for gridded datasets. Follows NumPy array indexing conventions, allowing for indexing, slicing and selecting a list of indices on multi-dimensional arrays using integer indices. The order of array indices is inverted relative to the Dataset key dimensions, e.g. an Image with key dimensions ‘x’ and ‘y’ can be indexed with  image.ndloc[iy, ix]  , where  iy  and  ix  are integer indices along the y and x dimensions.

Examples:

• Index value in 2D array:

dataset.ndloc[3, 1]

• Slice along y-axis of 2D array:

dataset.ndloc[2:5, :]

• Vectorized (non-orthogonal) indexing along x- and y-axes:

dataset.ndloc[[1, 2, 3], [0, 2, 3]]

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

 pprint  ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 reduce  ( dimensions=[] , function=None , spreadfn=None , **reduce_map )

Allows reducing the values along one or more key dimension with the supplied function. The dimensions may be supplied as a list and a function to apply or a mapping between the dimensions and functions to apply along each dimension.

 reindex  ( kdims=None , vdims=None )

Create a new object with a re-ordered set of dimensions. Allows converting key dimensions to value dimensions and vice versa.

 relabel  ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

 sample  ( samples=[] , closest=True , **kwargs )

Allows sampling of Dataset as an iterator of coordinates matching the key dimensions, returning a new object containing just the selected samples. Alternatively may supply kwargs to sample a coordinate on an object. By default it will attempt to snap to the nearest coordinate if the Element supports it, snapping may be disabled with the closest argument.

 script_repr  ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **selection )

Allows selecting data by the slices, sets and scalar values along a particular dimension. The indices should be supplied as keywords mapping between the selected dimension and value. Additionally selection_specs (taking the form of a list of type.group.label strings, types or functions) may be supplied, which will ensure the selection is only applied if the specs match the selected object.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.stats.Distribution'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.stats.Distribution'>)
 shape 

Returns the shape of the data.

 sort  ( by=[] , reverse=False )

Sorts the data by the values along the supplied dimensions.

 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

 table  ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

 to 

Property to create a conversion interface with methods to convert to other Element types.

 traverse  ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

 warning  ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class  holoviews.element.   Arrow  ( x , y , text='' , direction='<' , points=40 , arrowstyle='->' , **params ) [source]

Draw an arrow to the given xy position with optional text at distance ‘points’ away. The direction of the arrow may be specified as well as the arrow head style.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Arrow, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(2, 2), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param List  vdims  ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions defined as the list of dimensions used to describe the components of the data. If multiple value dimensions are supplied, a particular value dimension may be indexed by name after the key dimensions. Aliased with value_dimensions.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param ClassSelector  x  ( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The x-position of the arrow which make be numeric or a timestamp.
param ClassSelector  y  ( allow_None=False, constant=False, default=0, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The y-position of the arrow which make be numeric or a timestamp.
param String  text  ( allow_None=False, basestring=<class ‘str’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Text associated with the arrow.
param ObjectSelector  direction  ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=<, instantiate=False, objects=[‘<’, ‘^’, ‘>’, ‘v’], pickle_default_value=True, precedence=None, readonly=False )
The cardinal direction in which the arrow is pointing. Accepted arrow directions are ‘<’, ‘^’, ‘>’ and ‘v’.
param ObjectSelector  arrowstyle  ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=->, instantiate=False, objects=[‘-‘, ‘->’, ‘-[‘, ‘-|>’, ‘<->’, ‘<|-|>’], pickle_default_value=True, precedence=None, readonly=False )
The arrowstyle used to draw the arrow. Accepted arrow styles are ‘-‘, ‘->’, ‘-[‘, ‘- |>', '<->' and '<| - | >’
param Number  points  ( allow_None=False, bounds=None, constant=False, default=40, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, softbounds=None, time_dependent=False, time_fn=<Time Time00001> )
Font size of arrow text (if any).
 closest  ( coords )

Class method that returns the exact keys for a given list of coordinates. The supplied bounds defines the extent within which the samples are drawn and the optional shape argument is the shape of the numpy array (typically the shape of the .data attribute) when applicable.

 collapse_data  ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

 defaults  ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

 dimensions  ( selection='all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.annotation.Arrow'>)
 get_dimension  ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

 get_param_values  ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.annotation.Arrow'>)
 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

 inspect_value  = functools.partial(<function Parameterized.inspect_value>, <class 'holoviews.element.annotation.Arrow'>)
 map  ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

 matches  ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

 message  ( msg , *args , **kw )

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

 opts  ( options=None , **kwargs )

Apply the supplied options to a clone of the object which is then returned. Note that if no options are supplied at all, all ids are reset.

 params  ( parameter_name=None )

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

 pprint  ( imports=None , prefix=' ' , unknown_value='<?>' , qualify=False , separator='' )

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

 print_param_defaults  ( )

Print the default values of all cls’s Parameters.

 print_param_values  ( )

Print the values of all this object’s Parameters.

 range  ( dimension , data_range=True )

Returns the range of values along the specified dimension.

If data_range is True, the data may be used to try and infer the appropriate range. Otherwise, (None,None) is returned to indicate that no range is defined.

 reduce  ( dimensions=[] , function=None , **reduce_map )

Base class signature to demonstrate API for reducing Elements, using some reduce function, e.g. np.mean, which is applied along a particular Dimension. The dimensions and reduce functions should be passed as keyword arguments or as a list of dimensions and a single function.

 relabel  ( label=None , group=None , depth=0 )

Assign a new label and/or group to an existing LabelledData object, creating a clone of the object with the new settings.

 sample  ( samples=[] , **sample_values )

Base class signature to demonstrate API for sampling Elements. To sample an Element supply either a list of samples or keyword arguments, where the key should match an existing key dimension on the Element.

 script_repr  ( imports=[] , prefix=' ' )

Variant of __repr__ designed for generating a runnable script.

 select  ( selection_specs=None , **kwargs )

Allows slicing or indexing into the Dimensioned object by supplying the dimension and index/slice as key value pairs. Select descends recursively through the data structure applying the key dimension selection. The ‘value’ keyword allows selecting the value dimensions on objects which have any declared.

The selection may also be selectively applied to specific objects by supplying the selection_specs as an iterable of type.group.label specs, types or functions.

 set_default  ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

 set_dynamic_time_fn  = functools.partial(<function Parameterized.set_dynamic_time_fn>, <class 'holoviews.element.annotation.Arrow'>)
 set_param  = functools.partial(<function Parameterized.set_param>, <class 'holoviews.element.annotation.Arrow'>)
 state_pop  ( )

Restore the most recently saved state.

See state_push() for more details.

 state_push  ( )

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

 table  ( datatype=None )

Converts the data Element to a Table, optionally may specify a supported data type. The default data types are ‘numpy’ (for homogeneous data), ‘dataframe’, and ‘dictionary’.

 traverse  ( fn , specs=None , full_breadth=True )

Traverses any nested LabelledData object (i.e LabelledData objects containing LabelledData objects), applying the supplied function to each constituent element if the supplied specifications. The output of these function calls are collected and returned in the accumulator list.

If specs is None, all constituent elements are processed. Otherwise, specs must be a list of type.group.label specs, types, and functions.

 verbose  ( msg , *args , **kw )

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

 warning  ( msg , *args , **kw )

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class  holoviews.element.   Curve  ( data , kdims=None , vdims=None , **kwargs ) [source]

Curve is a simple Chart Element providing 1D indexing along the x-axis.

param String  group  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=Curve, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param String  label  ( allow_None=False, basestring=<class ‘str’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group.
param Dict  cdims  ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param List  kdims  ( allow_None=False, bounds=(1, 2), constant=False, default=[Dimension(‘x’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param List  vdims  ( allow_None=False, bounds=(1, None), constant=False, default=[Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The value dimensions of the Chart, usually corresponding to a number of dependent variables.
param Tuple  extents  ( allow_None=False, constant=False, default=(None, None, None, None), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False )
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
param List  datatype  ( allow_None=False, bounds=(0, None), constant=False, default=[‘dataframe’, ‘dataframe’, ‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’, ‘dask’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
 add_dimension  ( dimension , dim_pos , dim_val , vdim=False , **kwargs )

Create a new object with an additional key dimensions. Requires the dimension name or object, the desired position in the key dimensions and a key value scalar or sequence of the same length as the existing keys.

 aggregate  ( dimensions=None , function=None , spreadfn=None , **kwargs )

Aggregates over the supplied key dimensions with the defined function.

 clone  ( data=None , shared_data=True , new_type=None , *args , **overrides )

Returns a clone of the object with matching parameter values containing the specified args and kwargs.

If shared_data is set to True and no data explicitly supplied, the clone will share data with the original. May also supply a new_type, which will inherit all shared parameters.

 closest  ( coords=[] , **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. Different Element types should implement this appropriately depending on the space they represent, if the Element does not support snapping raise NotImplementedError.

 collapse_data  ( data , function=None , kdims=None , **kwargs )

Class method to collapse a list of data matching the data format of the Element type. By implementing this method HoloMap can collapse multiple Elements of the same type. The kwargs are passed to the collapse function. The collapse function must support the numpy style axis selection. Valid function include: np.mean, np.sum, np.product, np.std, scipy.stats.kurtosis etc. Some data backends also require the key dimensions to aggregate over.

 ddims 

The list of deep dimensions

 debug  ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

 defaults  ( )

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

 dframe  ( dimensions=None )

Returns the data in the form of a DataFrame. Supplying a list of dimensions filters the dataframe. If the data is already a DataFrame a copy is returned.

 dimension_values  ( dim , expanded=True , flat=True )

Returns the values along a particular dimension. If unique values are requested will return only unique values.

 dimensions  ( selection='all' , label=False )

Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.

 force_new_dynamic_value  = functools.partial(<function Parameterized.force_new_dynamic_value>, <class 'holoviews.element.chart.Curve'>)
 get_dimension  ( dimension , default=None , strict=False )

Access a Dimension object by name or index. Returns the default value if the dimension is not found and strict is False. If strict is True, a KeyError is raised instead.

 get_dimension_index  ( dim )

Returns the index of the requested dimension.

 get_dimension_type  ( dim )

Returns the specified Dimension type if specified or if the dimension_values types are consistent otherwise None is returned.

 get_param_values  ( onlychanged=False )

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

 get_value_generator  = functools.partial(<function Parameterized.get_value_generator>, <class 'holoviews.element.chart.Curve'>)
 groupby  ( dimensions=[] , container_type=<class 'holoviews.core.spaces.HoloMap'> , group_type=None , dynamic=False , **kwargs )

Return the results of a groupby operation over the specified dimensions as an object of type container_type (expected to be dictionary-like).

Keys vary over the columns (dimensions) and the corresponding values are collections of group_type (e.g an Element, list, tuple) constructed with kwargs (if supplied).

If dynamic is requested container_type is automatically set to a DynamicMap, allowing dynamic exploration of large datasets. If the data does not represent a full cartesian grid of the requested dimensions some Elements will be empty.

 hist  ( dimension=None , num_bins=20 , bin_range=None , adjoin=True , individually=True , **kwargs )

The hist method generates a histogram to be adjoined to the Element in an AdjointLayout. By default the histogram is computed along the first value dimension of the Element, however any dimension may be selected. The number of bins and the bin_ranges and any kwargs to be passed to the histogram operation may also be supplied.

 iloc 

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 Parameterized.inspect_value>, <class 'holoviews.element.chart.Curve'>)
 map  ( map_fn , specs=None , clone=True )

Recursively replaces elements using a map function when the specification applies.

 matches  ( spec )

A specification may be a class, a tuple or a string. Equivalent to isinstance if a class is supplied, otherwise matching occurs on type, group and label. These may be supplied as a tuple of strings or as a single string of the form “{type}.{group}.{label}”. Matching may be done on {type} alone, {type}.{group}, or {type}.{group}.{label}. The strings for the type, group, and label will each be sanitized before the match, and so the sanitized versions of those values will need to be provided if the match is to succeed.

 message  ( msg , *args , **kw )