From 123b7987fd70545dfd494290f07623c3e87c86b6 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Thu, 3 Jun 2021 10:16:34 +0200 Subject: [PATCH] unified Plot*.set(), always accept times and values --- actor.py | 6 +++--- plot2d.py | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/actor.py b/actor.py index 210b4bf..28ed828 100644 --- a/actor.py +++ b/actor.py @@ -7,8 +7,8 @@ from sources import Camera, Source def update_all(plt, cache): plt.set(*cache.xy) -def update_latest(plt, cache): - plt.set(cache.latest) +#def update_latest(plt, cache): +# plt.set(cache.latest) def decide_src_plt_cache_update(pvname): @@ -19,7 +19,7 @@ def decide_src_plt_cache_update(pvname): src = Camera(pvname) plt = Plot2D cache_size = 1 - update = update_latest + update = update_all if not src.is_connected: raise RuntimeError(f"{pvname} is not connected") diff --git a/plot2d.py b/plot2d.py index 5a65600..2ab2195 100644 --- a/plot2d.py +++ b/plot2d.py @@ -28,7 +28,8 @@ class Plot2D(Object): super().__init__(fig) - def set(self, image): + def set(self, times, values): + image = values[-1] self.source.data.update(image=[image])