Skip to content

Commit 279ddba

Browse files
committed
Clean up
1 parent 9c7747c commit 279ddba

4 files changed

Lines changed: 7 additions & 9 deletions

File tree

CMake/cmake_modules/FindMatplotlib.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ if ( NOT ${res} EQUAL 0 )
44
message("Could not detect matplotlib, ${PYTHON_EXECUTABLE}")
55
set( Matplotlib_FOUND 0 )
66
else ( NOT ${res} EQUAL 0 )
7-
execute_process(COMMAND "@PYTHON_EXECUTABLE@" -c "import matplotlib;print matplotlib.__version__" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err)
7+
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import matplotlib;print matplotlib.__version__" RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE err)
88
if ( ${out} VERSION_LESS ${MATPLOTLIB_MAJOR_MIN}.${MATPLOTLIB_MINOR_MIN}.${MATPLOTLIB_PATCH_MIN} )
99
message("You need matplotlib version ${MATPLOTLIB_MAJOR_MIN}.${MATPLOTLIB_MINOR_MIN}.${MATPLOTLIB_PATCH_MIN} at minimum")
1010
set( Matplotlib_FOUND 0 )

Packages/vcs/Lib/VTKPlots.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -645,10 +645,6 @@ def plotContinents(self, x1, x2, y1, y2, projection, wrap, tmpl):
645645
else:
646646
geo = None
647647

648-
writer = vtk.vtkXMLPolyDataWriter()
649-
writer.SetFileName("poly.vtk")
650-
writer.SetInputData(contData)
651-
writer.Write()
652648
self.fitToViewport(contActor,
653649
[tmpl.data.x1, tmpl.data.x2,
654650
tmpl.data.y1, tmpl.data.y2],

Packages/vcs/Lib/vcs2vtk.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,6 @@ def genGridOnPoints(data1, gm, deep=True, grid=None, geo=None,
202202
m3 = numpy.concatenate((m3, z), axis=1)
203203
deep = True
204204
pts = vtk.vtkPoints()
205-
pts.SetDataTypeToDouble()
206205
# Convert nupmy array to vtk ones
207206
ppV = numpy_to_vtk_wrapper(m3, deep=deep)
208207
pts.SetData(ppV)
@@ -543,11 +542,12 @@ def prepContinents(fnm):
543542
vcsContinents[fnm] = poly
544543
return poly
545544

546-
def projectArray(w, projection, geo=None):
545+
def projectArray(w, projection, wc, geo=None):
546+
xm, xM, ym, yM = wc
547547
if isinstance(projection, (str, unicode)):
548548
projection = vcs.elements["projection"][projection]
549549
if projection.type == "linear":
550-
return None, pts
550+
return None, w
551551

552552
if geo is None:
553553
geo = vtk.vtkGeoTransform()

Packages/vcs/Lib/vcsvtk/vectorpipeline.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,9 @@ def plot(self, data1, data2, tmpl, grid, transform):
5858
newv.InsertTupleValue(0, [lon.min(), lat.min(), 0])
5959
newv.InsertTupleValue(1, [lon.max(), lat.max(), 0])
6060

61-
vcs2vtk.projectArray(newv, projection=projection)
61+
vcs2vtk.projectArray(newv, projection,
62+
[gridGenDict['xm'], gridGenDict['xM'],
63+
gridGenDict['ym'], gridGenDict['yM'],])
6264
dimMin = [0, 0, 0]
6365
dimMax = [0, 0, 0]
6466
newv.GetTupleValue(0, dimMin)

0 commit comments

Comments
 (0)