GridPlot
Introduction
GridPlot
widget in Supervisely is used to create a grid of LinePlot
subplots with a given list of data. Users can add plots in real-time, making it useful for interactive data exploration and analysis.
Function signature
Parameters
data
List[dict or str]
List of data to display on GridPlot
.str
inputs will be recognized as a titles for empty widgets.
columns
int
Number of columns on GridPlot
gap
int
Gap between widgets on GridPlot
widget_id
str
ID of the widget
data
List of data to display on GridPlot
.
type: List[Dict or str]
columns
Determine number of columns on GridPlot
.
type: int
default value: 1
gap
Determine gap between widgets on GridPlot
.
type: int
default value: 10
widget_id
ID of the widget.
type: str
default value: None
Methods and attributes
add_scalar(dentifier: str, y, x)
Add data in GridPlot
.
add_scalars(plot_title: str, new_values: dict, x)
Add series of data in GridPlot
.
Mini App Example
You can find this example in our GitHub repository:
ui-widgets-demos/charts and plots/006_grid_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 GridPlot
widget
GridPlot
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