axline
¶
AxLine: a horizontal or vertical reference line drawn on a plot, styled with a Pen.
LineOrientation
¶
AxLine
¶
Bases: PlottableData2D
Defines a horizontal or vertical line to be drawn on a plot.
value
instance-attribute
¶
value: float
Value at which to draw the line (x-value for vertical, y-value for horizontal).
orientation
instance-attribute
¶
orientation: LineOrientation
Whether line should be horizontal or vertical.
pen
class-attribute
instance-attribute
¶
Style and label information for drawing to matplotlib axes.
metadata
class-attribute
instance-attribute
¶
A dictionary of metadata to be used as a tool tip for mouseover in Grafana.
record_type
property
¶
record_type: str
Returns:
| Type | Description |
|---|---|
str
|
Record type should be the same as the class name. The record type is used to search for records from the store. |
plot_to_ax
¶
plot_to_ax(ax: Axes) -> None
Plots line to matplotlib axes object.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ax
|
Axes
|
axes to which line should be plotted |
required |
Source code in src/trendify/plotting/axline.py
add_to_plotly
¶
add_to_plotly(plotly_figure: PlotlyFigure) -> PlotlyFigure
Add axis line to plotly figure without showing it in the legend
Source code in src/trendify/plotting/axline.py
__init_subclass__
¶
__init_subclass__(**kwargs: Any) -> None
Registers child subclasses to be able to parse them from JSON payloads using the deserialize method
Source code in src/trendify/base/record.py
append_to_list
¶
Appends self to list.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
to_add_to
|
List
|
list to which |
required |
Returns:
| Type | Description |
|---|---|
Self
|
returns instance of |
Source code in src/trendify/base/record.py
registry
classmethod
¶
Returns:
| Type | Description |
|---|---|
dict[str, type[Record]]
|
a copy of the record_type -> class registry,
used by the store to resolve which leaf |
Source code in src/trendify/base/record.py
deserialize
classmethod
¶
Loads a stored JSON payload into the pydantic dataclass registered under record_type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
record_type
|
str
|
the |
required |
payload
|
str
|
the raw JSON text (e.g. from the store's |
required |
Returns:
| Type | Description |
|---|---|
Record
|
the reconstructed, correctly-typed record instance |
-
Code Reference
trendify-
base -
formats -
plotting-
AxLine__init_subclass__ -
HistogramEntry__init_subclass__ -
Point2D__init_subclass__ -
Scatter2D__init_subclass__ -
Trace2D__init_subclass__ -
axlineAxLine__init_subclass__ -
histogramHistogramEntry__init_subclass__ -
pointPoint2D__init_subclass__ -
scatterScatter2D__init_subclass__ -
traceTrace2D__init_subclass__
-
-