From dc68bb39128bf950c00c6d7c01fb9fc25578093d Mon Sep 17 00:00:00 2001 From: "Paul J. Durack" Date: Mon, 28 Aug 2017 09:43:41 -0700 Subject: [PATCH] Further tweaks - @danlipsa, @doutriaux1, UV-CDAT/vcs#237 --- make_newVsOldDiffs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make_newVsOldDiffs.py b/make_newVsOldDiffs.py index be36013..f067cec 100755 --- a/make_newVsOldDiffs.py +++ b/make_newVsOldDiffs.py @@ -26,6 +26,7 @@ PJD 28 Jun 2016 - Corrected pngs path for mp4s PJD 30 Jun 2016 - Added donotstoredisplay argument PJD 22 Aug 2017 - Added code tweaks following VCS changes #235 +PJD 28 Aug 2017 - Further tweaks following info in https://github.com/UV-CDAT/vcs/pull/237#issuecomment-325354235 @author: durack1 """ @@ -62,6 +63,7 @@ def initVCS(x,levs1,levs2,split): tmpl.blank() tmpl.scalefont(.9) + oldOrientation = tmpl.legend.textorientation tmpl.legend.textorientation = leg for a in ["data","legend","box1","xlabel1","xtic1","ylabel1","ytic1"]: setattr(getattr(tmpl,a),"priority",1) @@ -84,6 +86,7 @@ def initVCS(x,levs1,levs2,split): t3 = Ez.get(legend="local") del(Ez) ; # Purge EzTemplate object + vcs.removeobject(vcs.elements['textorientation'][oldOrientation]) return iso1,iso2,title,t1,t2,t3,tmpl @@ -200,11 +203,11 @@ def initVCS(x,levs1,levs2,split): #print 'new:',varNameNewRead.ljust(9),s1s.getTime().asComponentTime() #print 'old:',varNameRead.ljust(9),s2.getTime().asComponentTime() s2 = f2(varNameRead,slice(m,m+1)) - diff = s2-s1 + diff = s2-s1s iso1,iso2,title,t1,t2,t3,tmpl = initVCS(x,levs1,levs2,split) title.string = '%i-%.2i' % (y,m+1) x.plot(title,bg=bg) - x.plot(s1,t1,iso1,bg=bg); #,ratio="autot"); #,vtk_backend_grid=g) + x.plot(s1s,t1,iso1,bg=bg); #,ratio="autot"); #,vtk_backend_grid=g) x.plot(diff,t2,iso2,bg=bg); #,ratio="autot") ; #,vtk_backend_grid=g) x.plot(s2,t3,iso1,bg=bg); #,ratio="autot") ; #,vtk_backend_grid=g) fnm = '%i-%.2i.png' % (y,m+1)