From 2ec2722ebe42e52f6ffded34743f6ad5f10669fa Mon Sep 17 00:00:00 2001 From: christopher Date: Wed, 23 Aug 2017 16:53:21 -0400 Subject: [PATCH 1/3] FIX: use figure --- xpdview/waterfall.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xpdview/waterfall.py b/xpdview/waterfall.py index c028382..38aadbf 100644 --- a/xpdview/waterfall.py +++ b/xpdview/waterfall.py @@ -1,5 +1,4 @@ import numpy as np -import matplotlib.pyplot as plt from matplotlib.widgets import Slider @@ -34,7 +33,8 @@ def __init__(self, fig=None, canvas=None, if key_list is None: key_list = [] if not fig: - fig = plt.figure() + from matplotlib.figure import Figure + fig = Figure() self.fig = fig if not canvas: canvas = self.fig.canvas From 18031a9e94bd099d5afd44ce5665c8827fa982ff Mon Sep 17 00:00:00 2001 From: christopher Date: Wed, 23 Aug 2017 17:06:10 -0400 Subject: [PATCH 2/3] REV: revert changes back to plt.figure --- xpdview/callbacks.py | 4 ++-- xpdview/waterfall.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xpdview/callbacks.py b/xpdview/callbacks.py index 9df103c..d8f821a 100644 --- a/xpdview/callbacks.py +++ b/xpdview/callbacks.py @@ -1,5 +1,6 @@ from bluesky.callbacks.broker import BrokerCallbackBase from .waterfall import Waterfall +import matplotlib.pyplot as plt class LiveWaterfall(BrokerCallbackBase): @@ -25,8 +26,7 @@ def __init__(self, x_name, y_name, db=None, units=None): self.y_name = y_name self.units = units - from matplotlib.figure import Figure - self.fig = Figure() + self.fig = plt.figure() self.wf = Waterfall(fig=self.fig, unit=self.units) self.i = 0 diff --git a/xpdview/waterfall.py b/xpdview/waterfall.py index 38aadbf..c028382 100644 --- a/xpdview/waterfall.py +++ b/xpdview/waterfall.py @@ -1,4 +1,5 @@ import numpy as np +import matplotlib.pyplot as plt from matplotlib.widgets import Slider @@ -33,8 +34,7 @@ def __init__(self, fig=None, canvas=None, if key_list is None: key_list = [] if not fig: - from matplotlib.figure import Figure - fig = Figure() + fig = plt.figure() self.fig = fig if not canvas: canvas = self.fig.canvas From 56915ca130265b7aa02c62683ddc39da2261d268 Mon Sep 17 00:00:00 2001 From: christopher Date: Sun, 27 Aug 2017 23:02:47 -0400 Subject: [PATCH 3/3] WIP: get demo running using zmq --- xpdview/callbacks.py | 1 + 1 file changed, 1 insertion(+) diff --git a/xpdview/callbacks.py b/xpdview/callbacks.py index d8f821a..e483a28 100644 --- a/xpdview/callbacks.py +++ b/xpdview/callbacks.py @@ -30,6 +30,7 @@ def __init__(self, x_name, y_name, db=None, units=None): self.wf = Waterfall(fig=self.fig, unit=self.units) self.i = 0 + self.fig.show() def start(self, doc): self.i = 0