LinePlot
Introduction
LinePlot
widget in Supervisely is a widget that allows users to display one or more lines of data in a plot. It provides a canvas area that can be customized with various options, such as line smoothing, axis labels, and displaying legends. LinePlot
widget is useful for visualizing time-series data or data with continuous variables.
Function signature
or
Parameters
Parameters | Type | Description |
---|---|---|
|
|
|
|
| List of input data series |
|
| Smoothing |
|
| Synced charts key |
|
| Show legend on |
|
| The number of fractions to display floating values in |
|
| The number of fractions to display floating values in |
|
| Min and max values on |
|
| Set autoscaling of the |
|
| ID of the widget |
title
Determine LinePlot
title.
type: str
series
Determine list of input data series.
type: list
default value: []
smoothing_weight
Determine LinePlot
smoothing.
type: int
default value: 0
group_key
Synced LinePlot
key.
type: str
default value: None
show_legend
Determine showing legend on LinePlot
.
type: bool
default value: True
decimals_in_float
The number of fractions to display floating values in Y
axis.
type: int
default value: 2
xaxis_decimals_in_float
The number of fractions to display floating values in X
axis.
type: int
default value: None
yaxis_interval
Determine min and max values on Y
axis (e.g. [0, 1]).
type: list
default value: None
yaxis_autorescale
Set autoscaling of the Y
axis.
type: bool
default value: True
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
Attributes and Methods | Description |
---|---|
| Update |
| Add new series of data in |
| Add new series of data in |
| Add data to existing series. |
| Return series data by name. |
Mini App Example
You can find this example in our GitHub repository:
ui-widgets-demos/charts and plots/005_line_plot/src/main.py
Import libraries
Init API client
First, we load environment variables with credentials and init API for communicating with Supervisely Instance:
Prepare series for plot
Initialize LinePlot
widget
LinePlot
widgetCreate app layout
Prepare a layout for app using Card
widget with the content
parameter and place widget that we've just created in the Container
widget.
Create app using layout
Create an app object with layout parameter.
Last updated