Skip to content

Commit 54f2834

Browse files
authored
Merge pull request #2070 from UV-CDAT/system-dependent-outline
System dependent outline
2 parents 63a4221 + 337bb70 commit 54f2834

File tree

5 files changed

+11
-8
lines changed

5 files changed

+11
-8
lines changed

Packages/vcs/vcs/VTKPlots.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1382,7 +1382,10 @@ def fitToViewport(self, Actor, vp, wc=None, geoBounds=None, geo=None, priority=N
13821382
yd = yScale * float(Yrg[1] - Yrg[0]) / 2.
13831383
cam = Renderer.GetActiveCamera()
13841384
cam.ParallelProjectionOn()
1385-
cam.SetParallelScale(yd)
1385+
# We increase the parallel projection parallelepiped with 1/1000 so that
1386+
# it does not overlap with the outline of the dataset. This resulted in
1387+
# system dependent display of the outline.
1388+
cam.SetParallelScale(yd * 1.001)
13861389
cd = cam.GetDistance()
13871390
cam.SetPosition(xc, yc, cd)
13881391
cam.SetFocalPoint(xc, yc, 0.)

testing/vcs/test_vcs_boxfill_robinson_wrap.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
cdmsfile = cdms2.open(os.path.join(vcs.sample_data, "clt.nc"))
66
clt2 = cdmsfile('clt')
77
clt3 = clt2(latitude=(-90.0, 90.0),squeeze=1,longitude=(-180, 200.0),time=('1979-01', '1988-12'),)
8-
canvas = vcs.init()
8+
canvas = regression.init()
99
gmBoxfill = vcs.getboxfill('a_robinson_boxfill')
1010
kwargs = {}
1111
kwargs[ 'cdmsfile' ] = cdmsfile.id
1212
kwargs['bg'] = 1
1313
canvas.plot(clt3, gmBoxfill, **kwargs)
14-
regression.run(canvas, "test_vcs_robinson_wrap.png")
14+
regression.run(canvas, "test_vcs_boxfill_robinson_wrap.png")

testing/vcs/test_vcs_isofill_isoline_labels.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323

2424
# Plot the isolines with labels
2525
canvas.plot(data, isoline, bg=1)
26-
regression.run(canvas, "test_isofill_isoline_labels.png")
26+
regression.run(canvas, "test_vcs_isofill_isoline_labels.png")

testing/vcs/test_vcs_isoline_labels.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@
2323

2424
baseline = os.path.splitext(sys.argv[1])
2525
baselineImage = "%s%s"%baseline
26-
ret = regression.run_wo_terminate(canvas, "test_isoline_labels.png", baselineImage)
26+
ret = regression.run_wo_terminate(canvas, "test_vcs_isoline_labels.png", baselineImage)
2727

2828
# Now set isoline.linecolors and test again.
2929
canvas.clear()
3030
isoline.linecolors = colors
3131
canvas.plot(data, isoline, bg=1)
3232
baselineImage = "%s%d%s"%(baseline[0], 2, baseline[1])
33-
testImage = os.path.abspath("test_isoline_labels2.png")
33+
testImage = os.path.abspath("test_vcs_isoline_labels2.png")
3434
ret += regression.run_wo_terminate(canvas, testImage, baselineImage)
3535

3636
# Now set isoline.textcolors and test again.
@@ -39,7 +39,7 @@
3939
canvas.plot(data, isoline, bg=1)
4040

4141
baselineImage = "%s%d%s"%(baseline[0], 3, baseline[1])
42-
testImage = os.path.abspath("test_isoline_labels3.png")
42+
testImage = os.path.abspath("test_vcs_isoline_labels3.png")
4343
ret += regression.run_wo_terminate(canvas, testImage, baselineImage)
4444

4545
sys.exit(ret)

testing/vcs/test_vcs_isoline_labelskipdistance.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323

2424
# Next plot the isolines with labels
2525
canvas.plot(data, isoline, bg=1)
26-
regression.run(canvas, "test_isoline_labelskipdistance.png")
26+
regression.run(canvas, "test_vcs_isoline_labelskipdistance.png")

0 commit comments

Comments
 (0)