LinePlot
Introduction
Function signature
x1 = list(range(10))
y1 = [random.randint(10, 148) for _ in range(10)]
x2 = list(range(30))
y2 = [random.randint(1, 300) for _ in range(30)]
line_plot = LinePlot("My Line Plot")
line_plot.add_series("Line 1", x1, y1)
line_plot.add_series("Line 2", x2, y2)size1 = 10
x1 = list(range(size1))
y1 = np.random.randint(low=10, high=148, size=size1).tolist()
s1 = [{"x": x, "y": y} for x, y in zip(x1, y1)]
size2 = 30
x2 = list(range(size2))
y2 = np.random.randint(low=0, high=300, size=size2).tolist()
s2 = [{"x": x, "y": y} for x, y in zip(x2, y2)]
line_plot = LinePlot(
title="My Line Plot",
series=[{"name": "Line 1", "data": s1}, {"name": "Line 2", "data": s2}],
smoothing_weight=0,
group_key=None,
show_legend=True,
decimals_in_float=2,
xaxis_decimals_in_float=None,
yaxis_interval=None,
widget_id=None,
yaxis_autorescale=True,
)
Parameters
Parameters
Type
Description
title

series

smoothing_weight
group_key
show_legend

decimals_in_float
xaxis_decimals_in_float

yaxis_interval

yaxis_autorescale
widget_id
Methods and attributes
Attributes and Methods
Description
Mini App Example
Import libraries
Init API client
Prepare series for plot
Initialize LinePlot widget
LinePlot widgetCreate app layout
Create app using layout

Last updated