aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThéo de la Hogue2024-04-26 04:51:17 +0200
committerThéo de la Hogue2024-04-26 04:51:17 +0200
commit40d23124660ee7e52580ed1001d188ebd034ae02 (patch)
tree69ae58bc6148b9e114cf14685ccb8321bd2b17d4
parente01cfe24a89673059acdaeb8c5466eff20fabd12 (diff)
downloadargaze-40d23124660ee7e52580ed1001d188ebd034ae02.zip
argaze-40d23124660ee7e52580ed1001d188ebd034ae02.tar.gz
argaze-40d23124660ee7e52580ed1001d188ebd034ae02.tar.bz2
argaze-40d23124660ee7e52580ed1001d188ebd034ae02.tar.xz
easing metrics dataframe creation.
-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):