Series

class Series(variable: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], data: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], labels: dict | None = None)

A series of data points determined by a common relation, i.e. \(y = f(x)\)

Attributes:
variablearray_like

Independent variable for which the data was computed.

dataarray_like

An array of values which were computed as a function of variable. It can be 1D or 2D. In the latter case each column represents the result of a different function applied to the same variable input.

labelsdict

Plot labels: ‘variable’, ‘data’, ‘orbitals’, ‘title’ and ‘columns’.

Attributes

callsig

Methods

plot([ax, axes, legend])

Labeled line plot

reduced([columns, orbitals, fill_other])

Return a copy where the data is summed over the columns

with_data(data)

Return a copy of this result object with different data

plot(ax: Axes | None = None, axes: Literal['xy', 'yx'] = 'xy', legend: bool = True, **kwargs) List[Line2D] | None

Labeled line plot

Parameters:
axOptional[plt.Axes]

The Axis to plot the results on.

axesLiteral[‘xy’, ‘yx’]

The order of the axes, default: ‘xy’.

legendbool

Plot the legend of the bands on the axes.

**kwargs

Forwarded to plt.plot().

reduced(columns: List[int] | None = None, orbitals: List[str] | None = None, fill_other: float = 0.0) Series

Return a copy where the data is summed over the columns

Only applies to results which may have multiple columns of data, e.g. results for multiple orbitals for LDOS calculation.

Parameters:
columnsOptional[List[int]]

The colummns to contract to the new array. The length of columns agrees with the dimensions of data.shape[1]. The value at each position corresponds to the new column of the new Series object

orbitals: Optional[List[str]]

Optional new list of entries for the orbitals label in labels

fill_otherfloat

In case an array is made with a new column, fill it with this value. Default: 0.

with_data(data: ndarray) Series

Return a copy of this result object with different data