Ignore:
Timestamp:
07/09/09 12:52:39 (11 years ago)
Author:
pnorton
Message:

Improved the colour bar code so it now accepts the data array instead of just a minimum + maximum. It also now defaults to creating a Normalize instance with vmin=None and vmax=None instead of 0 and 1.

Also modified the layer_drawer objects to use the ColourBar? class instead of implementing it themselves.

File:
1 edited

Legend:

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

    r5683 r5688  
    157157def isValueInLimits(val, limits):    
    158158    return  val >= limits[0] and val <= limits[1] 
     159 
     160def isListUnique(items): 
     161    seen = {} 
     162     
     163    for item in items: 
     164        if item in seen: 
     165            return False 
     166         
     167        seen[item] = 1 
     168         
     169    return True            
     170  
     171def getUniqueList(items): 
     172    seen = {} 
     173    l = [] 
     174    for item in items: 
     175        if item in seen: 
     176            continue 
     177         
     178        seen[item] = 1 
     179        l.append(item) 
     180         
     181    return l 
Note: See TracChangeset for help on using the changeset viewer.