holoviews.core.element module#
- class holoviews.core.element.Collator(data=None, **params)[source]#
Bases:
NdMapping
Collator is an NdMapping type which can merge any number of HoloViews components with whatever level of nesting by inserting the Collators key dimensions on the HoloMaps. If the items in the Collator do not contain HoloMaps they will be created. Collator also supports filtering of Tree structures and dropping of constant dimensions.
Parameter Definitions
Parameters inherited from:
group = String(default='Collator', label='Group')
A string describing the data wrapped by the object.
vdims = List(bounds=(0, 0), default=[], label='Vdims')
Collator operates on HoloViews objects, if vdims are specified a value_transform function must also be supplied.
drop = List(bounds=(0, None), default=[], label='Drop')
List of dimensions to drop when collating data, specified as strings.
drop_constant = Boolean(default=False, label='Drop constant')
Whether to demote any non-varying key dimensions to constant dimensions.
filters = List(bounds=(0, None), default=[], label='Filters')
List of paths to drop when collating data, specified as strings or tuples.
progress_bar = Parameter(allow_None=True, label='Progress bar')
The progress bar instance used to report progress. Set to None to disable progress bars.
merge_type = ClassSelector(class_=<class 'holoviews.core.ndmapping.NdMapping'>, default=<class 'holoviews.core.spaces.HoloMap'>, label='Merge type')
value_transform = Callable(allow_None=True, label='Value transform')
If supplied the function will be applied on each Collator value during collation. This may be used to apply an operation to the data or load references from disk before they are collated into a displayable HoloViews object.
- property static_dimensions#
Return all constant dimensions.
- class holoviews.core.element.CompositeOverlay(data, kdims=None, vdims=None, **params)[source]#
Bases:
ViewableElement
,Composable
CompositeOverlay provides a common baseclass for Overlay classes.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdims- dimension_values(dimension, expanded=True, flat=True)[source]#
Return the values along the requested dimension.
Parameters#
- dimension
The dimension to return values for
- expandedbool, optional
Whether to expand values Whether to return the expanded values, behavior depends on the type of data:
Columnar: If false returns unique values
Geometry: If false returns scalar values per geometry
Gridded: If false returns 1D coordinates
- flatbool, optional
Whether to flatten array
Returns#
NumPy array of values along the requested dimension
- hist(dimension=None, num_bins=20, bin_range=None, adjoin=True, index=None, show_legend=False, **kwargs)[source]#
Computes and adjoins histogram along specified dimension(s).
Defaults to first value dimension if present otherwise falls back to first key dimension.
Parameters#
- dimension
Dimension(s) to compute histogram on, Falls back the plot dimensions by default.
- num_binsint, optional
Number of bins
- bin_rangetuple, optional
Lower and upper bounds of bins
- adjoinbool, optional
Whether to adjoin histogram
- indexint, optional
Index of layer to apply hist to
- show_legendbool, optional
Show legend in histogram (don’t show legend by default).
Returns#
AdjointLayout of element and histogram or just the histogram
- class holoviews.core.element.Dimensioned(data, kdims=None, vdims=None, **params)[source]#
Bases:
LabelledData
Dimensioned is a base class that allows the data contents of a class to be associated with dimensions. The contents associated with dimensions may be partitioned into one of three types
- key dimensions
These are the dimensions that can be indexed via the __getitem__ method. Dimension objects supporting key dimensions must support indexing over these dimensions and may also support slicing. This list ordering of dimensions describes the positional components of each multi-dimensional indexing operation.
For instance, if the key dimension names are ‘weight’ followed by ‘height’ for Dimensioned object ‘obj’, then obj[80,175] indexes a weight of 80 and height of 175.
Accessed using either kdims.
- value dimensions
These dimensions correspond to any data held on the Dimensioned object not in the key dimensions. Indexing by value dimension is supported by dimension name (when there are multiple possible value dimensions); no slicing semantics is supported and all the data associated with that dimension will be returned at once. Note that it is not possible to mix value dimensions and deep dimensions.
Accessed using either vdims.
- deep dimensions
These are dynamically computed dimensions that belong to other Dimensioned objects that are nested in the data. Objects that support this should enable the _deep_indexable flag. Note that it is not possible to mix value dimensions and deep dimensions.
Accessed using either ddims.
Dimensioned class support generalized methods for finding the range and type of values along a particular Dimension. The range method relies on the appropriate implementation of the dimension_values methods on subclasses.
The index of an arbitrary dimension is its positional index in the list of all dimensions, starting with the key dimensions, followed by the value dimensions and ending with the deep dimensions.
Parameter Definitions
Parameters inherited from:
group = String(constant=True, default='Dimensioned', label='Group')
A string describing the data wrapped by the object.
cdims = Dict(class_=<class 'dict'>, default={}, label='Cdims')
The constant dimensions defined as a dictionary of Dimension:value pairs providing additional dimension information about the object. Aliased with constant_dimensions.
kdims = List(bounds=(0, None), constant=True, default=[], label='Kdims')
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.
vdims = List(bounds=(0, None), constant=True, default=[], label='Vdims')
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.
- property ddims#
The list of deep dimensions
- dimension_values(dimension, expanded=True, flat=True)[source]#
Return the values along the requested dimension.
Parameters#
- dimension
The dimension to return values for
- expandedbool, optional
Whether to expand values Whether to return the expanded values, behavior depends on the type of data:
- Columnar
If false returns unique values
- Geometry
If false returns scalar values per geometry
- Gridded
If false returns 1D coordinates
- flatbool, optional
Whether to flatten array
Returns#
NumPy array of values along the requested dimension
- dimensions(selection='all', label=False)[source]#
Lists the available dimensions on the object
Provides convenient access to Dimensions on nested Dimensioned objects. Dimensions can be selected by their type, i.e. ‘key’ or ‘value’ dimensions. By default ‘all’ dimensions are returned.
Parameters#
- selectionType of dimensions to return
The type of dimension, i.e. one of ‘key’, ‘value’, ‘constant’ or ‘all’.
- labelWhether to return the name, label or Dimension
Whether to return the Dimension objects (False), the Dimension names (True/’name’) or labels (‘label’).
Returns#
List of Dimension objects or their names or labels
- get_dimension(dimension, default=None, strict=False) Dimension | None [source]#
Get a Dimension object by name or index.
Parameters#
dimension : Dimension to look up by name or integer index default : optional
Value returned if Dimension not found
- strictbool, optional
Raise a KeyError if not found
Returns#
Dimension object for the requested dimension or default
- get_dimension_index(dimension)[source]#
Get the index of the requested dimension.
Parameters#
- dimension
Dimension to look up by name or by index
Returns#
Integer index of the requested dimension
- get_dimension_type(dim)[source]#
Get the type of the requested dimension.
Type is determined by Dimension.type attribute or common type of the dimension values, otherwise None.
Parameters#
- dimension
Dimension to look up by name or by index
Returns#
Declared type of values along the dimension
- options(*args, clone=True, **kwargs)[source]#
Applies simplified option definition returning a new object.
Applies options on an object or nested group of objects in a flat format returning a new object with the options applied. If the options are to be set directly on the object a simple format may be used, e.g.:
obj.options(cmap=’viridis’, show_title=False)
If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:
obj.options(‘Image’, cmap=’viridis’, show_title=False)
or using:
obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})
Identical to the .opts method but returns a clone of the object by default.
Parameters#
- *args: Sets of options to apply to object
Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
- backendoptional
Backend to apply options to Defaults to current selected backend
- clonebool, optional
Whether to clone object Options can be applied inplace with clone=False
- **kwargs: Keywords of options
Set of options to apply to the object
Returns#
Returns the cloned object with the options applied
- range(dimension, data_range=True, dimension_range=True)[source]#
Return the lower and upper bounds of values along dimension.
Parameters#
- dimension
The dimension to compute the range on.
- data_rangebool
Compute range from data values
- dimension_rangebool
Include Dimension ranges Whether to include Dimension range and soft_range in range calculation
Returns#
Tuple containing the lower and upper bound
- select(selection_specs=None, **kwargs)[source]#
Applies selection by dimension name
Applies a selection along the dimensions of the object using keyword arguments. The selection may be narrowed to certain objects using selection_specs. For container objects the selection will be applied to all children as well.
Selections may select a specific value, slice or set of values:
- value
Scalar values will select rows along with an exact match, e.g.:
ds.select(x=3)
- slice
Slices may be declared as tuples of the upper and lower bound, e.g.:
ds.select(x=(0, 3))
- values
A list of values may be selected using a list or set, e.g.:
ds.select(x=[0, 1, 2])
Parameters#
- selection_specsList of specs to match on
A list of types, functions, or type[.group][.label] strings specifying which objects to apply the selection on.
- **selection: Dictionary declaring selections by dimension
Selections can be scalar values, tuple ranges, lists of discrete values and boolean arrays
Returns#
Returns an Dimensioned object containing the selected data or a scalar if a single value was selected
- class holoviews.core.element.Element(data, kdims=None, vdims=None, **params)[source]#
Bases:
ViewableElement
,Composable
,Overlayable
Element is the atomic datastructure used to wrap some data with an associated visual representation, e.g. an element may represent a set of points, an image or a curve. Elements provide a common API for interacting with data of different types and define how the data map to a set of dimensions and how those map to the visual representation.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdimsgroup = String(constant=True, default='Element', label='Group')
A string describing the data wrapped by the object.
- array(dimensions=None)[source]#
Convert dimension values to columnar array.
Parameters#
- dimensions
List of dimensions to return
Returns#
Array of columns corresponding to each dimension
- closest(coords, **kwargs)[source]#
Snap list or dict of coordinates to closest position.
Parameters#
- coords
List of 1D or 2D coordinates
- **kwargs
Coordinates specified as keyword pairs
Returns#
List of tuples of the snapped coordinates
Raises#
- NotImplementedError
Raised if snapping is not supported
- dframe(dimensions=None, multi_index=False)[source]#
Convert dimension values to DataFrame.
Returns a pandas dataframe of columns along each dimension, either completely flat or indexed by key dimensions.
Parameters#
- dimensions
Dimensions to return as columns
- multi_index
Convert key dimensions to (multi-)index
Returns#
DataFrame of columns corresponding to each dimension
- hist(dimension=None, num_bins=20, bin_range=None, adjoin=True, **kwargs)[source]#
Computes and adjoins histogram along specified dimension(s).
Defaults to first value dimension if present otherwise falls back to first key dimension.
Parameters#
- dimension
Dimension(s) to compute histogram on
- num_binsint, optional
Number of bins
- bin_rangetuple, optional
Lower and upper bounds of bins
- adjoinbool, optional
Whether to adjoin histogram
Returns#
AdjointLayout of element and histogram or just the histogram
- reduce(dimensions=None, function=None, spreadfn=None, **reduction)[source]#
Applies reduction along the specified dimension(s).
Allows reducing the values along one or more key dimension with the supplied function. Supports two signatures:
Reducing with a list of dimensions, e.g.:
ds.reduce([‘x’], np.mean)
Defining a reduction using keywords, e.g.:
ds.reduce(x=np.mean)
Parameters#
- dimensions
Dimension(s) to apply reduction on Defaults to all key dimensions
- function
Reduction operation to apply, e.g. numpy.mean
- spreadfn
Secondary reduction to compute value spread Useful for computing a confidence interval, spread, or standard deviation.
- **reductions
Keyword argument defining reduction Allows reduction to be defined as keyword pair of dimension and function
Returns#
The element after reductions have been applied.
- sample(samples=None, bounds=None, closest=False, **sample_values)[source]#
Samples values at supplied coordinates.
Allows sampling of element with a list of coordinates matching the key dimensions, returning a new object containing just the selected samples. Supports multiple signatures:
Sampling with a list of coordinates, e.g.:
ds.sample([(0, 0), (0.1, 0.2), …])
Sampling a range or grid of coordinates, e.g.:
1D : ds.sample(3) 2D : ds.sample((3, 3))
Sampling by keyword, e.g.:
ds.sample(x=0)
Parameters#
- samples
List of nd-coordinates to sample
- bounds
Bounds of the region to sample Defined as two-tuple for 1D sampling and four-tuple for 2D sampling.
- closest
Whether to snap to closest coordinates
- **kwargs
Coordinates specified as keyword pairs Keywords of dimensions and scalar coordinates
Returns#
Element containing the sampled coordinates
- class holoviews.core.element.Element2D(data, kdims=None, vdims=None, **params)[source]#
Bases:
Element
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdimsextents = Tuple(default=(None, None, None, None), label='Extents', length=4)
Allows overriding the extents of the Element in 2D space defined as four-tuple defining the (left, bottom, right and top) edges.
- class holoviews.core.element.Element3D(data, kdims=None, vdims=None, **params)[source]#
Bases:
Element2D
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdimsextents = Tuple(default=(None, None, None, None, None, None), label='Extents', length=6)
Allows overriding the extents of the Element in 3D space defined as (xmin, ymin, zmin, xmax, ymax, zmax).
- class holoviews.core.element.GridSpace(initial_items=None, kdims=None, **params)[source]#
Bases:
Layoutable
,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.
Parameter Definitions
Parameters inherited from:
kdims = List(bounds=(1, 2), default=[Dimension('X'), Dimension('Y')], label='Kdims')
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.
- decollate()[source]#
Packs GridSpace of DynamicMaps into a single DynamicMap that returns a GridSpace
Decollation allows packing a GridSpace of DynamicMaps into a single DynamicMap that returns a GridSpace of simple (non-dynamic) elements. All nested streams are lifted to the resulting DynamicMap, and are available in the streams property. The callback property of the resulting DynamicMap is a pure, stateless function of the stream values. To avoid stream parameter name conflicts, the resulting DynamicMap is configured with positional_stream_args=True, and the callback function accepts stream values as positional dict arguments.
Returns#
DynamicMap that returns a GridSpace
- keys(full_grid=False)[source]#
Returns the keys of the GridSpace
Parameters#
- full_gridbool, optional
Return full cross-product of keys
Returns#
List of keys
- property 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.
- property shape#
Returns the 2D shape of the GridSpace as (rows, cols).
- class holoviews.core.element.HoloMap(initial_items=None, kdims=None, group=None, label=None, **params)[source]#
Bases:
Layoutable
,UniformNdMapping
,Overlayable
A HoloMap is an n-dimensional mapping of viewable elements or overlays. Each item in a HoloMap has an tuple key defining the values along each of the declared key dimensions, defining the discretely sampled space of values.
The visual representation of a HoloMap consists of the viewable objects inside the HoloMap which can be explored by varying one or more widgets mapping onto the key dimensions of the HoloMap.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdimsholoviews.core.ndmapping.MultiDimensionalMapping
: kdims, vdims, sort- collate(merge_type=None, drop=None, drop_constant=False)[source]#
Collate allows reordering nested containers
Collation allows collapsing nested mapping types by merging their dimensions. In simple terms in merges nested containers into a single merged type.
In the simple case a HoloMap containing other HoloMaps can easily be joined in this way. However collation is particularly useful when the objects being joined are deeply nested, e.g. you want to join multiple Layouts recorded at different times, collation will return one Layout containing HoloMaps indexed by Time. Changing the merge_type will allow merging the outer Dimension into any other UniformNdMapping type.
Parameters#
- merge_type
Type of the object to merge with
- drop
List of dimensions to drop
- drop_constant
Drop constant dimensions automatically
Returns#
Collated Layout or HoloMap
- decollate()[source]#
Packs HoloMap of DynamicMaps into a single DynamicMap that returns an HoloMap
Decollation allows packing a HoloMap of DynamicMaps into a single DynamicMap that returns an HoloMap of simple (non-dynamic) elements. All nested streams are lifted to the resulting DynamicMap, and are available in the streams property. The callback property of the resulting DynamicMap is a pure, stateless function of the stream values. To avoid stream parameter name conflicts, the resulting DynamicMap is configured with positional_stream_args=True, and the callback function accepts stream values as positional dict arguments.
Returns#
DynamicMap that returns an HoloMap
- grid(dimensions=None, **kwargs)[source]#
Group by supplied dimension(s) and lay out groups in grid
Groups data by supplied dimension(s) laying the groups along the dimension(s) out in a GridSpace.
Parameters#
- dimensionsDimension/str or list
Dimension or list of dimensions to group by
Returns#
GridSpace with supplied dimensions
- hist(dimension=None, num_bins=20, bin_range=None, adjoin=True, individually=True, **kwargs)[source]#
Computes and adjoins histogram along specified dimension(s).
Defaults to first value dimension if present otherwise falls back to first key dimension.
Parameters#
- dimension
Dimension(s) to compute histogram on
- num_binsint, optional
Number of bins
- bin_rangetuple, optional
Lower and upper bounds of bins
- adjoinbool, optional
Whether to adjoin histogram
Returns#
AdjointLayout of HoloMap and histograms or just the histograms
- layout(dimensions=None, **kwargs)[source]#
Group by supplied dimension(s) and lay out groups
Groups data by supplied dimension(s) laying the groups along the dimension(s) out in a NdLayout.
Parameters#
- dimensions
Dimension(s) to group by
Returns#
NdLayout with supplied dimensions
- options(*args, **kwargs)[source]#
Applies simplified option definition returning a new object
Applies options defined in a flat format to the objects returned by the DynamicMap. If the options are to be set directly on the objects in the HoloMap a simple format may be used, e.g.:
obj.options(cmap=’viridis’, show_title=False)
If the object is nested the options must be qualified using a type[.group][.label] specification, e.g.:
obj.options(‘Image’, cmap=’viridis’, show_title=False)
or using:
obj.options({‘Image’: dict(cmap=’viridis’, show_title=False)})
Parameters#
- *args
Sets of options to apply to object Supports a number of formats including lists of Options objects, a type[.group][.label] followed by a set of keyword options to apply and a dictionary indexed by type[.group][.label] specs.
- backendoptional
Backend to apply options to Defaults to current selected backend
- clonebool, optional
Whether to clone object Options can be applied inplace with clone=False
- **kwargs: Keywords of options
Set of options to apply to the object
Returns#
Returns the cloned object with the options applied
- overlay(dimensions=None, **kwargs)[source]#
Group by supplied dimension(s) and overlay each group
Groups data by supplied dimension(s) overlaying the groups along the dimension(s).
Parameters#
- dimensions
Dimension(s) of dimensions to group by
Returns#
NdOverlay object(s) with supplied dimensions
- relabel(label=None, group=None, depth=1)[source]#
Clone object and apply new group and/or label.
Applies relabeling to children up to the supplied depth.
Parameters#
- labelstr, optional
New label to apply to returned object
- groupstr, optional
New group to apply to returned object
- depthint, optional
Depth to which relabel will be applied If applied to container allows applying relabeling to contained objects up to the specified depth
Returns#
Returns relabelled object
- class holoviews.core.element.Layout(items=None, identifier=None, parent=None, **kwargs)[source]#
Bases:
Layoutable
,ViewableTree
A Layout is an ViewableTree with ViewableElement objects as leaf values.
Unlike ViewableTree, a Layout supports a rich display, displaying leaf items in a grid style layout. In addition to the usual ViewableTree indexing, Layout supports indexing of items by their row and column index in the layout.
The maximum number of columns in such a layout may be controlled with the cols method.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdimsgroup = String(constant=True, default='Layout', label='Group')
A string describing the data wrapped by the object.
- clone(*args, **overrides)[source]#
Clones the Layout, overriding data and parameters.
Parameters#
Returns#
Cloned Layout object
- cols(ncols)[source]#
Sets the maximum number of columns in the NdLayout.
Any items beyond the set number of cols will flow onto a new row. The number of columns control the indexing and display semantics of the NdLayout.
Parameters#
- ncolsint
Number of columns to set on the NdLayout
- decollate()[source]#
Packs Layout of DynamicMaps into a single DynamicMap that returns a Layout
Decollation allows packing a Layout of DynamicMaps into a single DynamicMap that returns a Layout of simple (non-dynamic) elements. All nested streams are lifted to the resulting DynamicMap, and are available in the streams property. The callback property of the resulting DynamicMap is a pure, stateless function of the stream values. To avoid stream parameter name conflicts, the resulting DynamicMap is configured with positional_stream_args=True, and the callback function accepts stream values as positional dict arguments.
Returns#
DynamicMap that returns a Layout
- relabel(label=None, group=None, depth=1)[source]#
Clone object and apply new group and/or label.
Applies relabeling to children up to the supplied depth.
Parameters#
- labelstr, optional
New label to apply to returned object
- groupstr, optional
New group to apply to returned object
- depthint, optional
Depth to which relabel will be applied If applied to container allows applying relabeling to contained objects up to the specified depth
Returns#
Returns relabelled object
- property shape#
Tuple indicating the number of rows and columns in the Layout.
- class holoviews.core.element.NdLayout(initial_items=None, kdims=None, **params)[source]#
Bases:
Layoutable
,UniformNdMapping
NdLayout is a UniformNdMapping providing an n-dimensional data structure to display the contained Elements and containers in a layout. Using the cols method the NdLayout can be rearranged with the desired number of columns.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdimsholoviews.core.ndmapping.MultiDimensionalMapping
: kdims, vdims, sort- clone(*args, **overrides)[source]#
Clones the NdLayout, overriding data and parameters.
Parameters#
Returns#
Cloned NdLayout object
- cols(ncols)[source]#
Sets the maximum number of columns in the NdLayout.
Any items beyond the set number of cols will flow onto a new row. The number of columns control the indexing and display semantics of the NdLayout.
Parameters#
- ncolsint
Number of columns to set on the NdLayout
- grid_items()[source]#
Compute a dict of {(row,column): (key, value)} elements from the current set of items and specified number of columns.
- property last#
Returns another NdLayout constituted of the last views of the individual elements (if they are maps).
- property shape#
Tuple indicating the number of rows and columns in the NdLayout.
- class holoviews.core.element.NdMapping(initial_items=None, kdims=None, **params)[source]#
Bases:
MultiDimensionalMapping
NdMapping supports the same indexing semantics as MultiDimensionalMapping but also supports slicing semantics.
Slicing semantics on an NdMapping is dependent on the ordering semantics of the keys. As MultiDimensionalMapping sort the keys, a slice on an NdMapping is effectively a way of filtering out the keys that are outside the slice range.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdimsholoviews.core.ndmapping.MultiDimensionalMapping
: kdims, vdims, sortgroup = String(constant=True, default='NdMapping', label='Group')
A string describing the data wrapped by the object.
- class holoviews.core.element.NdOverlay(overlays=None, kdims=None, **params)[source]#
Bases:
Overlayable
,UniformNdMapping
,CompositeOverlay
An NdOverlay allows a group of NdOverlay to be overlaid together. NdOverlay can be indexed out of an overlay and an overlay is an iterable that iterates over the contained layers.
Parameter Definitions
Parameters inherited from:
kdims = List(bounds=(0, None), constant=True, default=[Dimension('Element')], label='Kdims')
List of dimensions the NdOverlay can be indexed by.
- decollate()[source]#
Packs NdOverlay of DynamicMaps into a single DynamicMap that returns an NdOverlay
Decollation allows packing a NdOverlay of DynamicMaps into a single DynamicMap that returns an NdOverlay of simple (non-dynamic) elements. All nested streams are lifted to the resulting DynamicMap, and are available in the streams property. The callback property of the resulting DynamicMap is a pure, stateless function of the stream values. To avoid stream parameter name conflicts, the resulting DynamicMap is configured with positional_stream_args=True, and the callback function accepts stream values as positional dict arguments.
Returns#
DynamicMap that returns an NdOverlay
- class holoviews.core.element.Tabular(data, kdims=None, vdims=None, **params)[source]#
Bases:
Element
Baseclass to give an elements providing an API to generate a tabular representation of the object.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdims- cell_type(row, col)[source]#
Type of the table cell, either ‘data’ or ‘heading’
Parameters#
- rowint
Integer index of table row
- colint
Integer index of table column
Returns#
Type of the table cell, either ‘data’ or ‘heading’
- property cols#
Number of columns in table
- pprint_cell(row, col)[source]#
Formatted contents of table cell.
Parameters#
- rowint
Integer index of table row
- colint
Integer index of table column
Returns#
Formatted table cell contents
- property rows#
Number of rows in table (including header)
- class holoviews.core.element.ViewableElement(data, kdims=None, vdims=None, **params)[source]#
Bases:
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.
Parameter Definitions
Parameters inherited from:
holoviews.core.dimension.LabelledData
: labelholoviews.core.dimension.Dimensioned
: cdims, kdims, vdimsgroup = String(constant=True, default='ViewableElement', label='Group')
A string describing the data wrapped by the object.