BaseView

class aas_timeseries.views.BaseView(time_mode=None)[source]

Bases: object

Base class for view-like objects (both the base figure and the actual views)

Attributes Summary

layers

time_format

The format to use for the x-axis.

time_mode

xlabel

The label to use for the x-axis.

xlim

The x/time limits of the view.

ylabel

The label to use for the y-axis.

ylim

The y limits of the view.

ylog

Whether the y axis is linear (False) or log (True).

Methods Summary

add_horizontal_line(self, value, \*\*kwargs)

Add a horizontal line to the figure.

add_horizontal_range(self, value_lower, …)

Add a horizontal range to the figure.

add_line(self, \*[, time_series, column, …])

Add a line to the figure.

add_markers(self, \*[, time_series, column, …])

Add markers, optionally with errorbars, to the figure.

add_range(self, \*[, time_series, …])

Add a time dependent range to the figure.

add_text(self, \*\*kwargs)

Add a text label to the figure.

add_vertical_line(self, time, \*\*kwargs)

Add a vertical line to the figure.

add_vertical_range(self, time_lower, …)

Add a vertical range to the figure.

Attributes Documentation

layers
time_format

The format to use for the x-axis.

time_mode
xlabel

The label to use for the x-axis. If not specified, this is determined automatically from the type of x-axis.

xlim

The x/time limits of the view.

ylabel

The label to use for the y-axis.

ylim

The y limits of the view.

ylog

Whether the y axis is linear (False) or log (True).

Methods Documentation

add_horizontal_line(self, value, **kwargs)[source]

Add a horizontal line to the figure.

Parameters
valuefloat or int

The y value at which the horizontal line is shown.

widthfloat or int, optional

The width of the line, in pixels.

colorstr or tuple, optional

The color of the line.

opacityfloat or int, optional

The opacity of the line from 0 (transparent) to 1 (opaque).

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerHorizontalLine
add_horizontal_range(self, value_lower, value_upper, **kwargs)[source]

Add a horizontal range to the figure.

Parameters
value_lowerfloat or int

The value at which the range starts.

value_upperfloat or int

The value at which the range ends.

colorstr or tuple, optional

The fill color of the range.

opacityfloat or int, optional

The opacity of the fill color from 0 (transparent) to 1 (opaque).

edge_colorstr or tuple, optional

The edge color of the range.

edge_opacityfloat or int, optional

The opacity of the edge color from 0 (transparent) to 1 (opaque).

edge_widthfloat or int, optional

The thickness of the edge, in pixels.

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerHorizontalRange
add_line(self, *, time_series=None, column=None, time_column='time', **kwargs)[source]

Add a line to the figure.

Parameters
dataTimeSeries

The time series object containing the data.

columnstr

The field in the time series containing the data.

time_columnstr, optional

The field to use for the time on the x-axis.

widthfloat or int, optional

The width of the line, in pixels.

colorstr or tuple, optional

The color of the line.

opacityfloat or int, optional

The opacity of the line from 0 (transparent) to 1 (opaque).

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerLine
add_markers(self, *, time_series=None, column=None, time_column='time', **kwargs)[source]

Add markers, optionally with errorbars, to the figure.

Parameters
dataTimeSeries

The time series object containing the data.

columnstr

The field in the time series containing the data.

time_columnstr, optional

The field to use for the time on the x-axis.

errorstr, optional

The field in the time series containing the data uncertainties.

shape{‘circle’, ‘square’, ‘cross’, ‘diamond’, ‘triangle-up’, ‘triangle-down’, ‘triangle-right’, ‘triangle-left’}, optional

The symbol shape.

sizefloat or int, optional

The area in pixels of the bounding box of the symbols. Note that this value sets the area of the symbol; the side lengths will increase with the square root of this value.

colorstr or tuple, optional

The fill color of the symbols.

opacityfloat or int, optional

The opacity of the fill color from 0 (transparent) to 1 (opaque).

edge_colorstr or tuple, optional

The edge color of the symbol.

edge_opacityfloat or int, optional

The opacity of the edge color from 0 (transparent) to 1 (opaque).

edge_widthfloat or int, optional

The thickness of the edge, in pixels.

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerMarkers
add_range(self, *, time_series=None, column_lower=None, column_upper=None, time_column='time', **kwargs)[source]

Add a time dependent range to the figure.

Parameters
dataTimeSeries

The time series object containing the data.

column_lowerstr

The field in the time series containing the lower value of the data range.

column_upperstr

The field in the time series containing the upper value of the data range.

time_columnstr, optional

The field to use for the time on the x-axis.

colorstr or tuple, optional

The fill color of the range.

opacityfloat or int, optional

The opacity of the fill color from 0 (transparent) to 1 (opaque).

edge_colorstr or tuple, optional

The edge color of the range.

edge_opacityfloat or int, optional

The opacity of the edge color from 0 (transparent) to 1 (opaque).

edge_widthfloat or int, optional

The thickness of the edge, in pixels.

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerRange
add_text(self, **kwargs)[source]

Add a text label to the figure.

Parameters
timeTime

The date/time at which the text is shown.

valuefloat or int

The y value at which the text is shown.

weight{‘normal’, ‘bold’}, optional

The weight of the text.

baseline{‘alphabetic’, ‘top’, ‘middle’, ‘bottom’}, optional

The vertical text baseline.

align{‘left’, ‘center’, ‘right’}, optional

The horizontal text alignment.

anglefloat or int, optional

The rotation angle of the text in degrees (default 0).

textstr, optional

The text label to show.

colorstr or tuple, optional

The color of the text.

opacityfloat or int, optional

The opacity of the text from 0 (transparent) to 1 (opaque).

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerText
add_vertical_line(self, time, **kwargs)[source]

Add a vertical line to the figure.

Parameters
timeTime

The date/time at which the vertical line is shown.

widthfloat or int, optional

The width of the line, in pixels.

colorstr or tuple, optional

The color of the line.

opacityfloat or int, optional

The opacity of the line from 0 (transparent) to 1 (opaque).

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerVerticalLine
add_vertical_range(self, time_lower, time_upper, **kwargs)[source]

Add a vertical range to the figure.

Parameters
time_lowerTime

The date/time at which the range starts.

time_upperTime

The date/time at which the range ends.

colorstr or tuple, optional

The fill color of the range.

opacityfloat or int, optional

The opacity of the fill color from 0 (transparent) to 1 (opaque).

edge_colorstr or tuple, optional

The edge color of the range.

edge_opacityfloat or int, optional

The opacity of the edge color from 0 (transparent) to 1 (opaque).

edge_widthfloat or int, optional

The thickness of the edge, in pixels.

labelstr, optional

The label to use to designate the layer in the legend.

Returns
layerVerticalRange