Plotters¶
The Plotter Process, which is only started if the --plot
command line argument is included when starting the program, creates a separate window from the main GUI in which it graphs the EMG data and the frequency spectrum of said data. When the Plotter process is started using Plotter.run()
, the Plotter builds the UI using the PyQtGraph Library and then just waits for commands from the Plot Pipe. Commands such as PlotCommands.UPDATE
and PlotCommands.RESIZE
simply change settings about the interface, whereas the PlotCommands.PLOT
command is the important one which sends the Plotter the data to graph, along with a filter used to possibly filter the data before graphing. The Plotter will respond to the PLOT
Command with "DONE"
when the graphs are updated. No other commands receive a response.
The Graphs are created using PyQtGraph’s utilities, which make it quite simple to create plots. When updating the graphs, the Plotter optionally filters the data, then computes the FFT for the spectrum graphs. Then the y axis of each graph is resized to equal the bounds of the data for that specific frame/batch of data.