holoviews.element.chart module#

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

Bases: Curve

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

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

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Area', label='Group')

A string describing the data wrapped by the object.

classmethod stack(areas, baseline_name='Baseline')[source]#

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

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

Bases: Selection1DExpr, Chart

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

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Bars', label='Group')

A string describing the data wrapped by the object.

kdims = List(bounds=(1, 3), default=[Dimension('x')], label='Kdims')

The key dimension(s) of a Chart represent the independent variable(s).

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

Bases: Dataset, Element2D

A Chart is an abstract baseclass for elements representing one or more independent and dependent variables defining a 1D coordinate system with associated values. The independent variables or key dimensions map onto the x-axis while the dependent variables are usually mapped to the location, height or spread along the y-axis. Any number of additional value dimensions may be associated with a Chart.

If a chart’s independent variable (or key dimension) is numeric the chart will represent a discretely sampled version of the underlying continuously sampled 1D space. Therefore indexing along this variable will automatically snap to the closest coordinate.

Since a Chart is a subclass of a Dataset it supports the full set of data interfaces but usually each dimension of a chart represents a column stored in a dictionary, array or DataFrame.

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Chart', label='Group')

A string describing the data wrapped by the object.

kdims = List(bounds=(1, 2), default=[Dimension('x')], label='Kdims')

The key dimension(s) of a Chart represent the independent variable(s).

vdims = List(bounds=(1, None), default=[Dimension('y')], label='Vdims')

The value dimensions of the Chart, usually corresponding to a number of dependent variables.

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

Bases: Selection1DExpr, Chart

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

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Curve', label='Group')

A string describing the data wrapped by the object.

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

Bases: Selection1DExpr, Chart

ErrorBars is a Chart element representing error bars in a 1D coordinate system where the key dimension corresponds to the location along the x-axis and the first value dimension corresponds to the location along the y-axis and one or two extra value dimensions corresponding to the symmetric or asymmetric errors either along x-axis or y-axis. If two value dimensions are given, then the last value dimension will be taken as symmetric errors. If three value dimensions are given then the last two value dimensions will be taken as negative and positive errors. By default the errors are defined along y-axis. A parameter horizontal, when set True, will define the errors along the x-axis.

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='ErrorBars', label='Group')

A string describing the quantity measured by the ErrorBars object.

vdims = List(bounds=(1, None), constant=True, default=[Dimension('y'), Dimension('yerror')], label='Vdims')

The value dimensions of the Chart, usually corresponding to a number of dependent variables.

horizontal = Boolean(default=False, label='Horizontal')

Whether the errors are along y-axis (vertical) or x-axis.

range(dim, data_range=True, dimension_range=True)[source]#

Return the lower and upper bounds of values along dimension.

Range of the y-dimension includes the symmetric or asymmetric error.

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

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

Bases: Selection1DExpr, Chart

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

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Histogram', label='Group')

A string describing the data wrapped by the object.

kdims = List(bounds=(1, 1), default=[Dimension('x')], label='Kdims')

Dimensions on Element2Ds determine the number of indexable dimensions.

vdims = List(bounds=(1, None), default=[Dimension('Frequency')], label='Vdims')

The value dimensions of the Chart, usually corresponding to a number of dependent variables.

datatype = List(bounds=(0, None), default=['grid'], label='Datatype')

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

property edges#

Property to access the Histogram edges provided for backward compatibility

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

Bases: Selection1DExpr, Chart

Scatter is a Chart element representing a set of points in a 1D coordinate system where the key dimension maps to the points location along the x-axis while the first value dimension represents the location of the point along the y-axis.

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Scatter', label='Group')

A string describing the data wrapped by the object.

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

Bases: Selection1DExpr, Chart

Spikes is a Chart element which represents a number of discrete spikes, events or observations in a 1D coordinate system. The key dimension therefore represents the position of each spike along the x-axis while the first value dimension, if defined, controls the height along the y-axis. It may therefore be used to visualize the distribution of discrete events, representing a rug plot, or to draw the strength some signal.

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Spikes', label='Group')

A string describing the data wrapped by the object.

kdims = List(bounds=(1, 1), default=[Dimension('x')], label='Kdims')

The key dimension(s) of a Chart represent the independent variable(s).

vdims = List(bounds=(0, None), default=[], label='Vdims')

The value dimensions of the Chart, usually corresponding to a number of dependent variables.

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

Bases: ErrorBars

Spread is a Chart element representing a spread of values or confidence band in a 1D coordinate system. The key dimension(s) corresponds to the location along the x-axis and the value dimensions define the location along the y-axis as well as the symmetric or asymmetric spread.

Parameter Definitions


Parameters inherited from:

group = String(constant=True, default='Spread', label='Group')

A string describing the quantity measured by the ErrorBars object.