[mmstats] [Up] [mmgshow] | Visualization |
def mmglblshow(X, border=0.0): from Numeric import take, resize, shape from MLab import rand mmin = mmstats(X,'min') mmax = mmstats(X,'max') ncolors = mmax - mmin + 1 R = int32(rand(ncolors)*255) G = int32(rand(ncolors)*255) B = int32(rand(ncolors)*255) if mmin == 0: R[0],G[0],B[0] = 0,0,0 r=resize(take(R, X.flat - mmin),X.shape) g=resize(take(G, X.flat - mmin),X.shape) b=resize(take(B, X.flat - mmin),X.shape) Y=mmconcat('d',r,g,b) return Y
[mmstats] [Up] [mmgshow] | ![]() |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |