From a71ed18ba571c355568b7c25f59df49d0fad146f Mon Sep 17 00:00:00 2001 From: Christophe Delaere Date: Tue, 5 Aug 2014 17:07:33 +0200 Subject: [PATCH] minor tweak in the y range of plots --- AaptosPlot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AaptosPlot.py b/AaptosPlot.py index 7a953e5..683552f 100644 --- a/AaptosPlot.py +++ b/AaptosPlot.py @@ -56,10 +56,10 @@ def main_live(bufferDepth, pollingTime): currentPlot.set_data(t,c) # update view ax = plt.subplot(len(status),2,index*2+1) # voltage - plt.ylim((np.amin(v),np.amax(v))) + plt.ylim((np.amin(v)-0.1*abs(np.amin(v)-np.amax(v)),np.amax(v)+0.1*abs(np.amin(v)-np.amax(v)))) plt.xlim((np.amin(t),np.amax(t))) ax = plt.subplot(len(status),2,index*2+2) # current - plt.ylim((np.amin(c),np.amax(c))) + plt.ylim((np.amin(c)-0.1*abs(np.amin(c)-np.amax(c)),np.amax(c)+0.1*abs(np.amin(c)-np.amax(c)))) plt.xlim((np.amin(t),np.amax(t))) plt.draw() plt.pause(pollingTime)