Live plot¶
Live plot to which time series data is streamed.
- class matplotlive.live_plot.LivePlot(timestep, duration, ylim, ylim_right=None, faster=True)¶
Live plot to which time series data is streamed.
- add_left(name, *args, **kwargs)¶
Add a new time series to the left axis.
- Parameters:
name (
str
) – Name of the time series.args – Positional arguments forwarded to
pyplot.plot
.kwargs – Keyword arguments forwarded to
pyplot.plot
.
- Return type:
None
- add_right(name, *args, **kwargs)¶
Add a new time series to the right axis.
- Parameters:
name (
str
) – Name of the time series.args – Positional arguments forwarded to
pyplot.plot
.kwargs – Keyword arguments forwarded to
pyplot.plot
.
- Return type:
None
- property left_axis: Axes¶
Left axis of the plot.
- legend()¶
Place a legend on the left or right axes that are used.
- Return type:
None
- push(name, value)¶
Send a new value to an existing time series.
- Parameters:
name (
str
) – Name of the time series.value (
float
) – New value for the series.
- Return type:
None
- redraw()¶
Redraw the entire plot (e.g. after updating axis labels).
- reset()¶
Clear the plot.
- property right_axis: Axes | None¶
Right axis of the plot.
- send(name, value)¶
Send a new value to a time series, adding it if needed.
- Parameters:
name (
str
) – Name of the time series.value (
float
) – New value for the series.
- Return type:
None
- update()¶
Update plot with latest time-series values.
Calling this function will catch up all time series with the most recent one.
- Return type:
None