66
77import math
88
9+
910class VectorPipeline (Pipeline ):
1011
1112 """Implementation of the Pipeline interface for VCS vector plots."""
@@ -35,13 +36,12 @@ def plot(self, data1, data2, tmpl, grid, transform):
3536 lon = data1 .getLongitude ()[:]
3637
3738 if projection is not None :
38- scale = (lat .max () - lat .min ()) * (lon .max () - lon .min ())
39+ scale = (lat .max () - lat .min ()) * (lon .max () - lon .min ())
3940
4041 gridGenDict = vcs2vtk .genGridOnPoints (data1 , self ._gm , deep = False , grid = grid ,
4142 geo = transform , skipReprojection = False ,
4243 data2 = data2 )
4344
44-
4545 data1 = gridGenDict ["data" ]
4646 data2 = gridGenDict ["data2" ]
4747 geo = gridGenDict ["geo" ]
@@ -60,7 +60,7 @@ def plot(self, data1, data2, tmpl, grid, transform):
6060
6161 vcs2vtk .projectArray (newv , projection ,
6262 [gridGenDict ['xm' ], gridGenDict ['xM' ],
63- gridGenDict ['ym' ], gridGenDict ['yM' ], ])
63+ gridGenDict ['ym' ], gridGenDict ['yM' ]])
6464 dimMin = [0 , 0 , 0 ]
6565 dimMax = [0 , 0 , 0 ]
6666 newv .GetTupleValue (0 , dimMin )
@@ -125,7 +125,6 @@ def plot(self, data1, data2, tmpl, grid, transform):
125125 glyphFilter .SetRange (0.01 , 1.0 )
126126
127127 mapper = vtk .vtkPolyDataMapper ()
128- writer = vtk .vtkXMLPolyDataWriter ()
129128
130129 glyphFilter .Update ()
131130 data = glyphFilter .GetOutput ()
@@ -154,9 +153,8 @@ def plot(self, data1, data2, tmpl, grid, transform):
154153 priority = tmpl .data .priority ,
155154 create_renderer = True )
156155
157-
158- returned .update (
159- self ._context ().renderTemplate (tmpl , data1 , self ._gm , taxis , zaxis ))
156+ returned .update (self ._context ().renderTemplate (tmpl , data1 ,
157+ self ._gm , taxis , zaxis ))
160158
161159 if self ._context ().canvas ._continents is None :
162160 continents = False
0 commit comments