aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/argaze/utils/demo/plotters.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/argaze/utils/demo/plotters.py b/src/argaze/utils/demo/plotters.py
index 48380f1..e94880e 100644
--- a/src/argaze/utils/demo/plotters.py
+++ b/src/argaze/utils/demo/plotters.py
@@ -29,7 +29,7 @@ class ScanPathAnalysisPlotter(DataFeatures.PipelineStepObject):
@DataFeatures.PipelineStepInit
def __init__(self, **kwargs):
- self.__ts_metrics = pandas.Dataframe()
+ self.__ts_metrics = []
def on_look(self, timestamp, frame, exception):
"""Plot frame scan path metrics."""
@@ -49,8 +49,14 @@ class ScanPathAnalysisPlotter(DataFeatures.PipelineStepObject):
self.__ts_metrics.append(metrics)
+ # Convert into pandas.DataFrame
+ dataframe = pandas.DataFrame(self.__ts_metrics)
+ dataframe.set_index("Timestamp (ms)", inplace=True)
+
# DEBUG
- print(self.__ts_metrics)
+ #print(dataframe)
+
+ dataframe.plot(title="Scan path metrics", backend='argaze')
'''
class AOIScanPathAnalysisPlotter(UtilsFeatures.FileWriter):