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
The format to use for the x-axis.
The label to use for the x-axis.
The x/time limits of the view.
The label to use for the y-axis.
The y limits of the view.
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.
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
- layer
HorizontalLine
- layer
-
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
- layer
HorizontalRange
- layer
-
add_line
(self, *, time_series=None, column=None, time_column='time', **kwargs)[source]¶ Add a line to the figure.
- Parameters
- data
TimeSeries
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.
- data
- Returns
- layer
Line
- layer
-
add_markers
(self, *, time_series=None, column=None, time_column='time', **kwargs)[source]¶ Add markers, optionally with errorbars, to the figure.
- Parameters
- data
TimeSeries
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.
- data
- Returns
- layer
Markers
- layer
-
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
- data
TimeSeries
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.
- data
- Returns
- layer
Range
- layer
-
add_text
(self, **kwargs)[source]¶ Add a text label to the figure.
- Parameters
- time
Time
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.
- time
- Returns
- layer
Text
- layer
-
add_vertical_line
(self, time, **kwargs)[source]¶ Add a vertical line to the figure.
- Parameters
- time
Time
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.
- time
- Returns
- layer
VerticalLine
- layer
-
add_vertical_range
(self, time_lower, time_upper, **kwargs)[source]¶ Add a vertical range to the figure.
- Parameters
- time_lower
Time
The date/time at which the range starts.
- time_upper
Time
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.
- time_lower
- Returns
- layer
VerticalRange
- layer
-