sas
Modularised monitoring, logging, and control of robots.
Loading...
Searching...
No Matches
sas_datalogger.realtime_graph.RealtimeGraph Class Reference

Public Member Functions

 __init__ (self, str title, tuple[float, float] lims=[0, 0], int max_queue_size=200)
 update (self, list[float] datum)

Public Attributes

 plot = pg.plot(title=title)
 title = title
 queue = Queue(maxsize=max_queue_size)
 lims = list(lims)
list plot_data = []

Detailed Description

Realtime plotting class.

Maintains a fixed-size queue of recent scalar samples and updates a
``pyqtgraph`` window with the latest data and automatic Y-range.

Constructor & Destructor Documentation

◆ __init__()

sas_datalogger.realtime_graph.RealtimeGraph.__init__ ( self,
str title,
tuple[float, float] lims = [0,0],
int max_queue_size = 200 )
Create the realtime plot.

Args:
    title: Window title for the plot.
    lims: Initial Y-axis limits as (min, max).
    max_queue_size: Maximum number of samples to retain.

Member Function Documentation

◆ update()

sas_datalogger.realtime_graph.RealtimeGraph.update ( self,
list[float] datum )
Append a new sample and refresh the plot.

Args:
    datum: Value to append to the internal buffer.

The documentation for this class was generated from the following file:
  • src/sas_datalogger/sas_datalogger/realtime_graph.py