Use PyQtGraph to plot data
This PR introduces the use of PyQtGraph to plot the data. Ideally, this can be used in place of matplotlib for faster execution and might be used for real-time logging, see #80.
New functionality:
-
robot_log_visualizer/plotter/pyqtgraph_viewer_canvas.py: Added a new classPyQtGraphViewerCanvasto visualize data with PyQtGraph. This class includes methods for initializing the canvas, updating plots, handling mouse clicks for annotations, and controlling animation.
Enhancements to existing functionality:
-
robot_log_visualizer/plotter/color_palette.py: Added a__call__method to theColorPaletteclass, allowing it to be used as a callable for retrieving colors by index.
I guess we need to add pyqtgraph to the dependencies in https://github.com/ami-iit/robot-log-visualizer/blob/1a61360411a0100529c8011c8d9fb6273f62bbe4/setup.cfg#L42 ?
I guess we need to add
pyqtgraphto the dependencies in https://github.com/ami-iit/robot-log-visualizer/blob/1a61360411a0100529c8011c8d9fb6273f62bbe4/setup.cfg#L42 ?
Yes! In the future, we can also move to the toml configuration
For now in 1772740 i substituted the MaplotlibViewerCanvas with the PyQtGraphViewerCanvas, but with could think of a logic that allows the user to choose one or another.
For now in 1772740 i substituted the MaplotlibViewerCanvas with the PyQtGraphViewerCanvas, but with could think of a logic that allows the user to choose one or another.
We can try to work on this and see if we can merge by few days
I noticed that while clicking on the point in the dataset just the label is shown and not the circle
@traversaro when this Will be merge (hopefully) we need to add a new dependency in the superbuild. Do you think Is problematic? How can we handle this?
@traversaro when this Will be merge (hopefully) we need to add a new dependency in the superbuild. Do you think Is problematic? How can we handle this?
It seems available in conda-forge https://anaconda.org/conda-forge/pyqtgraph and apt https://repology.org/project/python:pyqtgraph/versions, so I think we are good to go.