Skip to content

Commit dc68bb3

Browse files
committed
Further tweaks - @danlipsa, @doutriaux1, CDAT/vcs#237
1 parent 3ee05df commit dc68bb3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

make_newVsOldDiffs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
PJD 28 Jun 2016 - Corrected pngs path for mp4s
2727
PJD 30 Jun 2016 - Added donotstoredisplay argument
2828
PJD 22 Aug 2017 - Added code tweaks following VCS changes #235
29+
PJD 28 Aug 2017 - Further tweaks following info in https://github.com/UV-CDAT/vcs/pull/237#issuecomment-325354235
2930
3031
@author: durack1
3132
"""
@@ -62,6 +63,7 @@ def initVCS(x,levs1,levs2,split):
6263
tmpl.blank()
6364
tmpl.scalefont(.9)
6465

66+
oldOrientation = tmpl.legend.textorientation
6567
tmpl.legend.textorientation = leg
6668
for a in ["data","legend","box1","xlabel1","xtic1","ylabel1","ytic1"]:
6769
setattr(getattr(tmpl,a),"priority",1)
@@ -84,6 +86,7 @@ def initVCS(x,levs1,levs2,split):
8486
t3 = Ez.get(legend="local")
8587

8688
del(Ez) ; # Purge EzTemplate object
89+
vcs.removeobject(vcs.elements['textorientation'][oldOrientation])
8790

8891
return iso1,iso2,title,t1,t2,t3,tmpl
8992

@@ -200,11 +203,11 @@ def initVCS(x,levs1,levs2,split):
200203
#print 'new:',varNameNewRead.ljust(9),s1s.getTime().asComponentTime()
201204
#print 'old:',varNameRead.ljust(9),s2.getTime().asComponentTime()
202205
s2 = f2(varNameRead,slice(m,m+1))
203-
diff = s2-s1
206+
diff = s2-s1s
204207
iso1,iso2,title,t1,t2,t3,tmpl = initVCS(x,levs1,levs2,split)
205208
title.string = '%i-%.2i' % (y,m+1)
206209
x.plot(title,bg=bg)
207-
x.plot(s1,t1,iso1,bg=bg); #,ratio="autot"); #,vtk_backend_grid=g)
210+
x.plot(s1s,t1,iso1,bg=bg); #,ratio="autot"); #,vtk_backend_grid=g)
208211
x.plot(diff,t2,iso2,bg=bg); #,ratio="autot") ; #,vtk_backend_grid=g)
209212
x.plot(s2,t3,iso1,bg=bg); #,ratio="autot") ; #,vtk_backend_grid=g)
210213
fnm = '%i-%.2i.png' % (y,m+1)

0 commit comments

Comments
 (0)