holoviews.interface Package


interface Package

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

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

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

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

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

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

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

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

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

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

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

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

dframe ( )

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

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

Returns the values along the specified dimension.

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

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

drop_dimension ( dimensions )

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

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

Standard get semantics for all mapping types

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

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

Shows all HoloMap data When no dimensions are specified.

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

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map. This operation will always sort the groups and the items in each group.

info

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

inspect_value = <functools.partial object>
items ( )

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

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

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

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

Shows all HoloMap data When no dimensions are specified.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

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

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

Shows all HoloMap data When no dimensions are specified.

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

reindex ( kdims=[] , force=False )

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

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

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

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

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

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

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

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

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

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

type

The type of elements stored in the map.

update ( other )

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

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

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

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

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

The maximum number of columns in such a layout may be controlled with the cols method.

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

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

Returns the values along the specified dimension.

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

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

display ( option ) [source]

Sets the display policy of the Layout before returning self

filter ( path_filters )

Filters the loaded AttrTree using the supplied path_filters.

fixed

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

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

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

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

matches ( spec )

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

merge ( trees )

Merge a collection of AttrTree objects.

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

path

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

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

regroup ( group ) [source]

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

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

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

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

state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

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

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

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

update ( other )

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. DFrame ( data , dimensions={} , kdims=None , clone_override=False , index=None , columns=None , dtype=None , copy=True , **params ) [source]

Bases: holoviews.interface.pandas.DFrame

The SNSFrame is largely the same as a DFrame but can only be visualized via Seaborn plotting functions. Since most Seaborn plots are two dimensional, the x and y dimensions can be set directly on this class to visualize a particular relationship in a multi-dimensional Pandas dframe.

param ObjectSelector plot_type ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[‘interact’, ‘regplot’, ‘lmplot’, ‘corrplot’, ‘plot’, ‘boxplot’, ‘hist’, ‘scatter_matrix’, ‘autocorrelation_plot’, ‘pairgrid’, ‘facetgrid’, ‘pairplot’, ‘violinplot’, ‘factorplot’, None], pickle_default_value=True, precedence=None, readonly=False )
Selects which Pandas or Seaborn plot type to use, when visualizing the plot.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
DataFrameView has no value dimension.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=DFrame, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param String y ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the y-axis.
param String x2 ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along a second dependent axis.
param String x ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the x-axis.
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.

apply ( name , *args , **kwargs )

Applies the Pandas dframe method corresponding to the supplied name with the supplied args and kwargs.

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
grid ( dimensions )

Splits the supplied the dimensions out into a GridSpace.

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.

holomap ( kdims=[] )

Splits the supplied dimensions out into a HoloMap.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface. UniformNdMapping ( initial_items=None , group=None , label=None , **params ) [source]

Bases: holoviews.core.ndmapping.NdMapping

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

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

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

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

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

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

dframe ( ) [source]

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

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

Returns the values along the specified dimension.

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

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

drop_dimension ( dimensions )

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

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

Standard get semantics for all mapping types

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map. This operation will always sort the groups and the items in each group.

info

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

inspect_value = <functools.partial object>
items ( )

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

keys ( )

Returns the keys of all the elements.

last

Returns the item highest data item along the map dimensions.

last_key

Returns the last key value.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

reindex ( kdims=[] , force=False )

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

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

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

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

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

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

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

type

The type of elements stored in the map.

update ( other )

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

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. AttrTree ( items=None , identifier=None , parent=None , dir_mode='default' ) [source]

Bases: object

An AttrTree offers convenient, multi-level attribute access for collections of objects. AttrTree objects may also be combined together using the update method or merge classmethod. Here is an example of adding a ViewableElement to an AttrTree and accessing it:

>>> t = AttrTree()
>>> t.Example.Path = 1
>>> t.Example.Path                             
1
filter ( path_filters ) [source]

Filters the loaded AttrTree using the supplied path_filters.

fixed

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

classmethod merge ( trees ) [source]

Merge a collection of AttrTree objects.

path

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

set_path ( path , val ) [source]

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

update ( other ) [source]

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

class holoviews.interface. ViewableElement ( data , **params ) [source]

Bases: holoviews.core.dimension.Dimensioned

A ViewableElement is a dimensioned datastructure that may be associated with a corresponding atomic visualization. An atomic visualization will display the data on a single set of axes (i.e. excludes multiple subplots that are displayed at once). The only new parameter introduced by ViewableElement is the title associated with the object for display.

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

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

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

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

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

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

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

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

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

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

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

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. Collector ( specs=[] , **kwargs ) [source]

Bases: holoviews.core.tree.AttrTree

A Collector specifies a template for how to populate a Layout with data over time. Two methods are used to schedule data collection: ‘collect’ and ‘analyze’.

The collect method takes an object (or reference) and collects views from it (as configured by setting an appropriate hook set with the for_type classmethod).

The analysis method takes a reference to data on the attrtree (a ViewRef) and passes the resolved output to the given analysisfn ElementOperation.

>>> Collector.for_type(str, lambda x: ViewableElement(x, name=x))
>>> Collector.interval_hook = param.Dynamic.time_fn.advance
>>> c = Collector()
>>> c.Target.Path = c.collect('example string')

# Start collection... >>> data = c(times=[1,2,3,4,5]) >>> isinstance(data, Layout) True >>> isinstance(data.Target.Path, UniformNdMapping) True

>>> times = data.Target.Path.keys()
>>> print("Collected the data for %d time values" % len(times))
Collected the data for 5 time values
>>> results = data.Target.Path.last
>>> results.name
'example string'
analyze ( reference , analysisfn , *args , **kwargs ) [source]

Given a ViewRef and the ElementOperation analysisfn, process the data resolved by the reference with analysisfn at each step.

collect ( obj , *args , **kwargs ) [source]

Aggregate views from the object at each step by passing the arguments to the corresponding hook. The object may represent itself, or it may be a Reference. If a referencer class was specified when the hook was defined, the object will automatically be wrapped into a reference.

filter ( path_filters )

Filters the loaded AttrTree using the supplied path_filters.

fixed

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

classmethod for_type ( tp , hookfn , referencer=None , mode='set' ) [source]

For an object of a given type, apply the hookfn and use the specified mode to aggregate the data.

To allow pickling (or any other defered access) of the target object, a referencer (a Reference subclass) may be specified to wrap the object as required.

If mode is ‘merge’, merge the Layout output by the hook, otherwise if ‘set’, add the output to the path specified by the ViewRef.

interval_hook

alias of RunProgress

merge ( trees )

Merge a collection of AttrTree objects.

path

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

ref

A convenient property to easily generate ViewRef object (via attribute access). Used to define ViewableElement references for analysis or for setting a path for an Collect on the Collector.

set_path ( path , val )

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

update ( other )

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

verify_times ( times , strict=False ) [source]

Given a set of times this method checks that all scheduled measurements will actually be carried out.

class holoviews.interface. TimeSeries ( data , xdata=None , **params ) [source]

Bases: holoviews.core.element.Element2D

TimeSeries is a container for any set of curves, which the Seaborn interface combines into a confidence interval, error bar or overlaid plot.

The curves should be supplied as an NxM dimensional array, x-values may also be supplied and must be of length N or M.

Alternatively a UniformNdMapping or NdOverlay of Curve objects may be supplied.

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

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

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

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

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 object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

table ( datatype=None )

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

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

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

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. Dimensioned ( data , **params ) [source]

Bases: holoviews.core.dimension.LabelledData

Dimensioned is a base class that allows the data contents of a class to be associated with dimensions. The contents associated with dimensions may be partitioned into one of three types

  • key dimensions: These are the dimensions that can be indexed via

    the __getitem__ method. Dimension objects supporting key dimensions must support indexing over these dimensions and may also support slicing. This list ordering of dimensions describes the positional components of each multi-dimensional indexing operation.

    For instance, if the key dimension names are ‘weight’ followed by ‘height’ for Dimensioned object ‘obj’, then obj[80,175] indexes a weight of 80 and height of 175.

    Accessed using either kdims or key_dimensions.

  • value dimensions: These dimensions correspond to any data held

    on the Dimensioned object not in the key dimensions. Indexing by value dimension is supported by dimension name (when there are multiple possible value dimensions); no slicing semantics is supported and all the data associated with that dimension will be returned at once. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either vdims or value_dimensions.

  • deep dimensions: These are dynamically computed dimensions that

    belong to other Dimensioned objects that are nested in the data. Objects that support this should enable the _deep_indexable flag. Note that it is not possible to mix value dimensions and deep dimensions.

    Accessed using either ddims or deep_dimensions.

Dimensioned class support generalized methods for finding the range and type of values along a particular Dimension. The range method relies on the appropriate implementation of the dimension_values methods on subclasses.

The index of an arbitrary dimension is its positional index in the list of all dimensions, starting with the key dimensions, followed by the value dimensions and ending with the deep dimensions.

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

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

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

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

dimensions ( selection=u'all' , label=False ) [source]

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

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

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

get_dimension_index ( dim ) [source]

Returns the index of the requested dimension.

get_dimension_type ( dim ) [source]

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

get_param_values ( onlychanged=False )

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

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

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True ) [source]

Returns the range of values along the specified dimension.

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

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

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

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

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

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

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

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. Distribution ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Distribution Views provide a container for data to be visualized as a one-dimensional distribution. The data should be supplied as a simple one-dimensional array or list. Internally it uses Seaborn to make all the conversions.

param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘Value’)], 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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Distribution, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface. GridSpace ( initial_items=None , **params ) [source]

Bases: holoviews.core.ndmapping.UniformNdMapping

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

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

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

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

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

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

ddims

The list of deep dimensions

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

dframe ( )

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

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

Returns the values along the specified dimension.

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

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

drop_dimension ( dimensions )

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

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

Standard get semantics for all mapping types

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

Splits the mapping into groups by key dimension which are then returned together in a mapping of class container_type. The individual groups are of the same type as the original map. This operation will always sort the groups and the items in each group.

info

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

inspect_value = <functools.partial object>
items ( )

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

keys ( full_grid=False ) [source]

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

last

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

last_key

Returns the last key value.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

pop ( key , default=None )

Standard pop semantics for all mapping types

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dimension , data_range=True )

Returns the range of values along the specified dimension.

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

reindex ( kdims=[] , force=False )

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

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

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

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

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

Variant of __repr__ designed for generating a runnable script.

select ( selection_specs=None , **kwargs )

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

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

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

table ( datatype=None , **kwargs )

Creates a table from the stored keys and data.

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

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

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

type

The type of elements stored in the map.

update ( other )

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

values ( )

Returns the values of all the elements.

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface. Bivariate ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Bivariate Views are containers for two dimensional data, which is to be visualized as a kernel density estimate. The data should be supplied as an Nx2 array, containing the x- and y-data.

param List vdims ( allow_None=False, bounds=(0, 1), 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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Bivariate, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface. Regression ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Scatter

Regression is identical to a Scatter plot but is visualized using the Seaborn regplot interface. This allows it to implement linear regressions, confidence intervals and a lot more.

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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Regression, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(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 String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.


collector Module

Inheritance diagram of holoviews.interface.collector

AttributeTree, Collector and related classes offer optional functionality for holding and collecting DataView objects.

class holoviews.interface.collector. Analyze ( reference , analysis , *args , **kwargs ) [source]

Bases: holoviews.interface.collector.Collect

An Analyze is a type of Collect that updates an Attrtree with the results of a ElementOperation. Analyze takes a ViewRef object as input which is resolved to generate input for the ElementOperation.

select_hook ( obj , hooks )

Select the most appropriate hook by the most specific type.

class holoviews.interface.collector. AttrDict ( *args , **kwargs ) [source]

Bases: dict

A dictionary type object that supports attribute access (e.g. for IPython tab completion).

clear ( ) → None. Remove all items from D.
copy ( ) → a shallow copy of D
fromkeys ( S [ , v ] ) → New dict with keys from S and values equal to v.

v defaults to None.

get ( k [ , d ] ) → D[k] if k in D, else d. d defaults to None.
has_key ( k ) → True if D has a key k, else False
items ( ) → list of D's (key, value) pairs, as 2-tuples
iteritems ( ) → an iterator over the (key, value) items of D
iterkeys ( ) → an iterator over the keys of D
itervalues ( ) → an iterator over the values of D
keys ( ) → list of D's keys
pop ( k [ , d ] ) → v, remove specified key and return the corresponding value.

If key is not found, d is returned if given, otherwise KeyError is raised

popitem ( ) → (k, v), remove and return some (key, value) pair as a

2-tuple; but raise KeyError if D is empty.

setdefault ( k [ , d ] ) → D.get(k,d), also set D[k]=d if k not in D
update ( [ E , ] **F ) → None. Update D from dict/iterable E and F.

If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values ( ) → list of D's values
viewitems ( ) → a set-like object providing a view on D's items
viewkeys ( ) → a set-like object providing a view on D's keys
viewvalues ( ) → an object providing a view on D's values
class holoviews.interface.collector. Collect ( obj , *args , **kwargs ) [source]

Bases: object

An Collect takes an object and corresponding hook and when called with an Layout, updates it with the output of the hook (given the object). The output of the hook should be a ViewableElement or an Layout.

The input object may be a picklable object (e.g. a ParameterizedFunction) or a Reference to the target object. The supplied * args and ** kwargs are passed to the hook together with the resolved object.

When mode is ‘merge’ the return value of the hook needs to be an Layout to be merged with the attrtree when called.

classmethod select_hook ( obj , hooks ) [source]

Select the most appropriate hook by the most specific type.

class holoviews.interface.collector. Collector ( specs=[] , **kwargs ) [source]

Bases: holoviews.core.tree.AttrTree

A Collector specifies a template for how to populate a Layout with data over time. Two methods are used to schedule data collection: ‘collect’ and ‘analyze’.

The collect method takes an object (or reference) and collects views from it (as configured by setting an appropriate hook set with the for_type classmethod).

The analysis method takes a reference to data on the attrtree (a ViewRef) and passes the resolved output to the given analysisfn ElementOperation.

>>> Collector.for_type(str, lambda x: ViewableElement(x, name=x))
>>> Collector.interval_hook = param.Dynamic.time_fn.advance
>>> c = Collector()
>>> c.Target.Path = c.collect('example string')

# Start collection... >>> data = c(times=[1,2,3,4,5]) >>> isinstance(data, Layout) True >>> isinstance(data.Target.Path, UniformNdMapping) True

>>> times = data.Target.Path.keys()
>>> print("Collected the data for %d time values" % len(times))
Collected the data for 5 time values
>>> results = data.Target.Path.last
>>> results.name
'example string'
analyze ( reference , analysisfn , *args , **kwargs ) [source]

Given a ViewRef and the ElementOperation analysisfn, process the data resolved by the reference with analysisfn at each step.

collect ( obj , *args , **kwargs ) [source]

Aggregate views from the object at each step by passing the arguments to the corresponding hook. The object may represent itself, or it may be a Reference. If a referencer class was specified when the hook was defined, the object will automatically be wrapped into a reference.

filter ( path_filters )

Filters the loaded AttrTree using the supplied path_filters.

fixed

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

classmethod for_type ( tp , hookfn , referencer=None , mode='set' ) [source]

For an object of a given type, apply the hookfn and use the specified mode to aggregate the data.

To allow pickling (or any other defered access) of the target object, a referencer (a Reference subclass) may be specified to wrap the object as required.

If mode is ‘merge’, merge the Layout output by the hook, otherwise if ‘set’, add the output to the path specified by the ViewRef.

interval_hook

alias of RunProgress

merge ( trees )

Merge a collection of AttrTree objects.

path

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

ref

A convenient property to easily generate ViewRef object (via attribute access). Used to define ViewableElement references for analysis or for setting a path for an Collect on the Collector.

set_path ( path , val )

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

update ( other )

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

verify_times ( times , strict=False ) [source]

Given a set of times this method checks that all scheduled measurements will actually be carried out.

class holoviews.interface.collector. ViewRef ( spec='' ) [source]

Bases: holoviews.core.io.Reference

A ViewRef object is a Reference to a dataview object in an Attrtree that may not exist when initialized. This makes it possible to schedule tasks for processing data not yet present.

ViewRefs compose with the * operator to specify Overlays and also support slicing of the referenced elements:

>>> from ..element.raster import Image
>>> ref = ViewRef('Example.Path1 * Example.Path2')
>>> tree = Layout()
>>> tree.Example.Path1 = Image(np.random.rand(5,5))
>>> tree.Example.Path2 = Image(np.random.rand(5,5))
>>> overlay = ref.resolve(tree)
>>> len(overlay)
2

Note that the operands of * must be distinct ViewRef objects.

debug ( msg , *args , **kw )

Print msg merged with args as a debugging statement.

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

defaults ( )

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

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

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

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

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

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

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

resolve ( attrtree ) [source]

Resolve the current ViewRef object into the appropriate ViewableElement object (if available).

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

Variant of __repr__ designed for generating a runnable script.

set_default ( param_name , value )

Set the default value of param_name.

Equivalent to setting param_name on the class.

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

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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


pandas Module

Inheritance diagram of holoviews.interface.pandas

The interface subpackage provides View and Plot types to wrap external objects with. Currently only a Pandas compatibility wrapper is provided, which allows integrating Pandas DataFrames within the HoloViews compositioning and animation framework. Additionally, it provides methods to apply operations to the underlying data and convert it to standard HoloViews View types.

class holoviews.interface.pandas. DFrame ( data , dimensions={} , kdims=None , clone_override=False , index=None , columns=None , dtype=None , copy=True , **params ) [source]

Bases: holoviews.interface.pandas.DataFrameView

DFrame is a specialized Dataset type useful as an interface for pandas plots.

param ObjectSelector plot_type ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[‘plot’, ‘boxplot’, ‘hist’, ‘scatter_matrix’, ‘autocorrelation_plot’, None], pickle_default_value=True, precedence=None, readonly=False )
Selects which Pandas plot type to use, when visualizing the ViewableElement.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
DataFrameView has no value dimension.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=DFrame, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param String y ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the y-axis.
param String x2 ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along a second dependent axis.
param String x ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the x-axis.
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.

apply ( name , *args , **kwargs )

Applies the Pandas dframe method corresponding to the supplied name with the supplied args and kwargs.

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
grid ( dimensions )

Splits the supplied the dimensions out into a GridSpace.

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.

holomap ( kdims=[] )

Splits the supplied dimensions out into a HoloMap.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface.pandas. DataFrameView ( data , dimensions={} , kdims=None , clone_override=False , index=None , columns=None , dtype=None , copy=True , **params ) [source]

Bases: holoviews.core.data.Dataset

DataFrameView provides a convenient compatibility wrapper around Pandas DataFrames. It provides several core functions:

  • Allows integrating several Pandas plot types with the HoloViews plotting system (includes plot, boxplot, histogram and scatter_matrix).

  • Provides several convenient wrapper methods to apply DataFrame methods and slice data. This includes:

    1. The apply method, which takes the DataFrame method to be applied as the first argument and passes any supplied args or kwargs along.
    2. The select and __getitem__ method which allow for selecting and slicing the data using NdMapping.
param ObjectSelector plot_type ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[‘plot’, ‘boxplot’, ‘hist’, ‘scatter_matrix’, ‘autocorrelation_plot’, None], pickle_default_value=True, precedence=None, readonly=False )
Selects which Pandas plot type to use, when visualizing the ViewableElement.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
DataFrameView has no value dimension.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=DFrame, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param String y ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the y-axis.
param String x2 ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along a second dependent axis.
param String x ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the x-axis.
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.

apply ( name , *args , **kwargs ) [source]

Applies the Pandas dframe method corresponding to the supplied name with the supplied args and kwargs.

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

Splits the supplied the dimensions out into a GridSpace.

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.

holomap ( kdims=[] ) [source]

Splits the supplied dimensions out into a HoloMap.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.


seaborn Module

Inheritance diagram of holoviews.interface.seaborn

The HoloViews Seaborn interface wraps around a wide range of Seaborn plot types including time series, kernel density estimates, distributions and regression plots.

class holoviews.interface.seaborn. DFrame ( data , dimensions={} , kdims=None , clone_override=False , index=None , columns=None , dtype=None , copy=True , **params ) [source]

Bases: holoviews.interface.pandas.DFrame

The SNSFrame is largely the same as a DFrame but can only be visualized via Seaborn plotting functions. Since most Seaborn plots are two dimensional, the x and y dimensions can be set directly on this class to visualize a particular relationship in a multi-dimensional Pandas dframe.

param ObjectSelector plot_type ( allow_None=None, check_on_set=True, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[‘interact’, ‘regplot’, ‘lmplot’, ‘corrplot’, ‘plot’, ‘boxplot’, ‘hist’, ‘scatter_matrix’, ‘autocorrelation_plot’, ‘pairgrid’, ‘facetgrid’, ‘pairplot’, ‘violinplot’, ‘factorplot’, None], pickle_default_value=True, precedence=None, readonly=False )
Selects which Pandas or Seaborn plot type to use, when visualizing the plot.
param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
DataFrameView has no value dimension.
param Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=DFrame, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=True, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions defined as list of dimensions that may be used in indexing (and potential slicing) semantics. The order of the dimensions listed here determines the semantics of each component of a multi-dimensional indexing operation. Aliased with key_dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param String y ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the y-axis.
param String x2 ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along a second dependent axis.
param String x ( allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False )
Dimension to visualize along the x-axis.
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.

apply ( name , *args , **kwargs )

Applies the Pandas dframe method corresponding to the supplied name with the supplied args and kwargs.

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
grid ( dimensions )

Splits the supplied the dimensions out into a GridSpace.

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.

holomap ( kdims=[] )

Splits the supplied dimensions out into a HoloMap.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface.seaborn. Bivariate ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Bivariate Views are containers for two dimensional data, which is to be visualized as a kernel density estimate. The data should be supplied as an Nx2 array, containing the x- and y-data.

param List vdims ( allow_None=False, bounds=(0, 1), 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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Bivariate, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘x’), Dimension(‘y’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface.seaborn. Distribution ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Chart

Distribution Views provide a container for data to be visualized as a one-dimensional distribution. The data should be supplied as a simple one-dimensional array or list. Internally it uses Seaborn to make all the conversions.

param List vdims ( allow_None=False, bounds=(0, None), constant=False, default=[Dimension(‘Value’)], 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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Distribution, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
The key dimensions of the Chart, determining the number of indexable dimensions.
param String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.interface.seaborn. TimeSeries ( data , xdata=None , **params ) [source]

Bases: holoviews.core.element.Element2D

TimeSeries is a container for any set of curves, which the Seaborn interface combines into a confidence interval, error bar or overlaid plot.

The curves should be supplied as an NxM dimensional array, x-values may also be supplied and must be of length N or M.

Alternatively a UniformNdMapping or NdOverlay of Curve objects may be supplied.

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

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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

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

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

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

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 object>
set_param = <functools.partial object>
state_pop ( )

Restore the most recently saved state.

See state_push() for more details.

state_push ( )

Save this instance’s state.

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

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

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

table ( datatype=None )

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

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

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

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

verbose ( msg , *args , **kw )

Print msg merged with args as a verbose message.

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

warning ( msg , *args , **kw )

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

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

class holoviews.interface.seaborn. Regression ( data , **kwargs ) [source]

Bases: holoviews.element.chart.Scatter

Regression is identical to a Scatter plot but is visualized using the Seaborn regplot interface. This allows it to implement linear regressions, confidence intervals and a lot more.

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 Dict cdims ( allow_None=False, constant=False, default=OrderedDict(), instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False )
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
param String group ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=Regression, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A string describing the data wrapped by the object.
param List datatype ( allow_None=False, bounds=(0, None), constant=False, default=[‘array’, ‘dataframe’, ‘dictionary’, ‘grid’, ‘ndelement’, ‘cube’, ‘xarray’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
A priority list of the data types to be used for storage on the .data attribute. If the input supplied to the element constructor cannot be put into the requested format, the next format listed will be used until a suitable format is found (or the data fails to be understood).
param List kdims ( allow_None=False, bounds=(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 String label ( allow_None=False, basestring=<type ‘basestring’>, constant=True, default=, instantiate=True, pickle_default_value=True, precedence=None, readonly=False )
Optional label describing the data, typically reflecting where or how it was measured. The label should allow a specific measurement or dataset to be referenced for a given group..
param 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.
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=u'all' , label=False )

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

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

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

get_dimension_index ( dim )

Returns the index of the requested dimension.

get_dimension_type ( dim )

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

get_param_values ( onlychanged=False )

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

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

get_value_generator = <functools.partial object>
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.

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

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

matches ( spec )

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

message ( msg , *args , **kw )

Print msg merged with args as a message.

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

params ( parameter_name=None )

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

Includes Parameters from this class and its superclasses.

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

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

print_param_defaults ( )

Print the default values of all cls’s Parameters.

print_param_values ( )

Print the values of all this object’s Parameters.

range ( dim , data_range=True )

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 object>
set_param = <functools.partial object>
shape

Returns the shape of the data.

sort ( by=[] )

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.