diff options
author | Théo de la Hogue | 2024-04-26 04:51:17 +0200 |
---|---|---|
committer | Théo de la Hogue | 2024-04-26 04:51:17 +0200 |
commit | 40d23124660ee7e52580ed1001d188ebd034ae02 (patch) | |
tree | 69ae58bc6148b9e114cf14685ccb8321bd2b17d4 | |
parent | e01cfe24a89673059acdaeb8c5466eff20fabd12 (diff) | |
download | argaze-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.py | 10 |
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): |