Changeset 5635
 Timestamp:
 19/08/09 09:54:57 (10 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

qesdi/geoplot/trunk/lib/geoplot/grid_drawer.py
r5612 r5635 73 73 norm = matplotlib.colors.Normalize(grid.values.min(), grid.values.max()) 74 74 75 # log.info("Drawing Grid")76 77 xLimits, yLimits = self._transformLimits(limits, basemap)78 79 75 grid_mapUnits = grid.transform(basemap) 80 81 82 83 84 85 # log.debug("xLimits = %s" % (xLimits,)) 86 # log.debug("yLimits = %s" % (yLimits,)) 87 88 #draw the grid return the quadmesh for use 89 sm = self._drawGridBoxes(axes, grid_mapUnits, basemap, cmap, norm) 90 91 76 77 self._drawGridBoxes(axes, grid_mapUnits, basemap, cmap, norm) 92 78 93 79 # log.debug("self.drawValues = %s" % (self.drawValues,)) … … 97 83 log.debug('drawing grid values') 98 84 85 xLimits, yLimits = self._transformLimits(limits, basemap) 86 99 87 #draw the vlaues onto the grid 100 88 self._drawMeshValues(axes, grid_mapUnits, xLimits, yLimits) … … 231 219 Checks the equality to 5 significant figures. 232 220 """ 233 n = 5 234 frmt = "%." + str(n) + "e" 221 235 222 st = time.time() 236 237 223 equal = True 238 x_first = [frmt % x for x in X[0]]239 224 240 225 for i in range(1, X.shape[0]): 241 x_row = [frmt % x for x in X[i]] 242 equal = x_first == x_row 226 227 equal = N.allclose(X[0], X[i]) 228 243 229 if not equal: 244 230 break … … 247 233 248 234 if equal: 249 y_first = [frmt % y for y in Y[:,0]]250 235 251 236 for i in range(1, Y.shape[1]): 252 y_col = [frmt % y for y in Y[:,i]] 253 equal = y_first == y_col 237 238 equal = N.allclose( Y[:,0], Y[:,i]) 239 254 240 if not equal: 255 241 break
Note: See TracChangeset
for help on using the changeset viewer.