Ignore:
Timestamp:
13/10/09 10:44:23 (11 years ago)
Author:
pnorton
Message:

Improved the performance of the getUniqueValues method on the grid, also cached the result to avoid the cost of re-calculation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • qesdi/geoplot/trunk/lib/geoplot/colour_bar.py

    r5735 r5835  
    1111import matplotlib.cm as cm 
    1212import operator 
     13import time 
    1314 
    1415 
     
    6162        kwargs = {} 
    6263         
    63          
    64          
    6564        kwargs['cmap'] = self.getColourMap(grid) 
    6665        kwargs['norm'] = self.getNormalize(grid) 
     66         
    6767        kwargs['orientation'] = self.colourBarPosition 
    6868         
     
    7070             
    7171            cbMin, cbMax = self._getCbarMinMax() 
     72             
    7273            kwargs['ticks'] = grid.getUniqueValues(cbMin, cbMax) 
    7374             
     
    249250     
    250251    def __set_cmap(self, value): 
    251         self._cmap == value; 
     252        self._cmap = value; 
    252253         
    253254 
Note: See TracChangeset for help on using the changeset viewer.