Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions CMake/cdat_modules_extra/paraview_download.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

cd @CMAKE_CURRENT_BINARY_DIR@/build/

@GIT_EXECUTABLE@ clone -b @paraview_branch@ @PARAVIEW_SOURCE@

@GIT_EXECUTABLE@ clone @PARAVIEW_SOURCE@
cd ParaView
@GIT_EXECUTABLE@ checkout @paraview_branch@


@GIT_EXECUTABLE@ submodule init

Expand Down
7 changes: 5 additions & 2 deletions Packages/vcs/Lib/VTKPlots.py
Original file line number Diff line number Diff line change
Expand Up @@ -725,7 +725,7 @@ def plotVector(self,data1,data2,tmpl,gm,vtk_backend_grid=None,vtk_backend_geo=No
cmap = vcs.elements["colormap"][self.canvas.getcolormapname()]
r,g,b = cmap.index[lcolor]
act.GetProperty().SetColor(r/100.,g/100.,b/100.)
x1,x2,y1,y2 = vcs2vtk.getRange(gm,xm,xM,ym,yM)
x1,x2,y1,y2 = vcs.utils.getworldcoordinates(gm,data1.getAxis(-1),data1.getAxis(-2))
act = vcs2vtk.doWrap(act,[x1,x2,y1,y2],wrap)
ren = self.fitToViewport(act,[tmpl.data.x1,tmpl.data.x2,tmpl.data.y1,tmpl.data.y2],[x1,x2,y1,y2])
if tmpl.data.priority!=0:
Expand Down Expand Up @@ -1057,7 +1057,10 @@ def plot2D(self,data1,data2,tmpl,gm,vtk_backend_grid=None,vtk_backend_geo=None):
else:
mappers.insert(0,missingMapper)

x1,x2,y1,y2 = vcs2vtk.getRange(gm,xm,xM,ym,yM)
if isinstance(gm,meshfill.Gfm):
x1,x2,y1,y2 = vcs2vtk.getRange(gm,xm,xM,ym,yM)
else:
x1,x2,y1,y2 = vcs.utils.getworldcoordinates(gm,data1.getAxis(-1),data1.getAxis(-2))

# Add a second mapper for wireframe meshfill:
if isinstance(gm, meshfill.Gfm) and gm.mesh:
Expand Down
6 changes: 6 additions & 0 deletions testing/vcs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,10 @@ add_test(vcs_test_taylor_2_quads
--bigvalues
"--source=${BASELINE_DIR}/test_vcs_basic_isofill_bigvalues.png"
)
add_test(vcs_test_issue_960_labels
${CMAKE_INSTALL_PREFIX}/bin/python
${cdat_SOURCE_DIR}/testing/vcs/test_vcs_issue_960_labels.py
${BASELINE_DIR}/test_vcs_issue_960_labels_1.png
${BASELINE_DIR}/test_vcs_issue_960_labels_2.png
)
endif()
28 changes: 28 additions & 0 deletions testing/vcs/test_vcs_issue_960_labels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import sys,os,cdms2,vcs
import vcs
src1=sys.argv[1]
src2=sys.argv[2]
pth = os.path.join(os.path.dirname(__file__),"..")
sys.path.append(pth)
import checkimage
x=vcs.init()
x.drawlogooff()
x.setbgoutputdimensions(1200,1091,units="pixels")
f=cdms2.open(os.path.join(sys.prefix,"sample_data","clt.nc"))
s=f("clt",time=slice(0,1),latitude=(-7,5),squeeze=1)
x.plot(s,bg=1)
fnm = "test_vcs_issue_960_labels_1.png"
x.png(fnm)
print "fnm:",fnm
print "src:",src1
ret = checkimage.check_result_image(fnm,src1,checkimage.defaultThreshold)
b=x.createboxfill()
b.datawc_y1=-7
b.datawc_y2=5
x.plot(s,b,bg=1)
fnm = "test_vcs_issue_960_labels_2.png"
x.png(fnm)
print "fnm:",fnm
print "src:",src2
ret += checkimage.check_result_image(fnm,src2,checkimage.defaultThreshold)
sys.exit(ret)