Mercurial > hg > pycsalgos
changeset 44:0b469b7ea552
utils.py: disabled imshow() normalization
author | nikcleju |
---|---|
date | Tue, 29 Nov 2011 13:39:40 +0000 |
parents | 4f3bc35195ce |
children | 7524d7749456 |
files | scripts/utils.py |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/utils.py Mon Nov 28 13:51:16 2011 +0000 +++ b/scripts/utils.py Tue Nov 29 13:39:40 2011 +0000 @@ -9,6 +9,7 @@ import scipy.io import matplotlib.pyplot as plt import matplotlib.cm as cm +import matplotlib.colors as mcolors # Sample call #utils.loadshowmatrices_multipixels('H:\\CS\\Python\\Results\\pt_std1\\approx_pt_std1.mat', dosave=True, saveplotbase='approx_pt_std1_',saveplotexts=('png','eps','pdf')) @@ -77,7 +78,7 @@ print algoname if mdict['meanmatrix'][algoname][0,0].ndim == 2: plt.figure() - plt.imshow(mdict['meanmatrix'][algoname][0,0], cmap=cm.gray, interpolation='nearest',origin='lower') + plt.imshow(mdict['meanmatrix'][algoname][0,0], cmap=cm.gray, norm=mcolors.Normalize(0,1), interpolation='nearest',origin='lower') if dosave: for ext in saveplotexts: plt.savefig(saveplotbase + algoname + '.' + ext, bbox_inches='tight') @@ -86,7 +87,7 @@ ilbd = 0 for matrix in mdict['meanmatrix'][algoname][0,0]: plt.figure() - plt.imshow(matrix, cmap=cm.gray, interpolation='nearest',origin='lower') + plt.imshow(matrix, cmap=cm.gray, norm=mcolors.Normalize(0,1), interpolation='nearest',origin='lower') if dosave: for ext in saveplotexts: plt.savefig(saveplotbase + algoname + ('_lbd%.0e' % lambdas[ilbd]) + '.' + ext, bbox_inches='tight') @@ -164,6 +165,7 @@ bigmatrix[i*N:i*N+N,j*N:j*N+N] = matrix[i,j] bigmatrix = int_drawseparation(matrix,bigmatrix,10,0.9,2,0) bigmatrix = int_drawseparation(matrix,bigmatrix,10,0.8,2,0.5) + bigmatrix = int_drawseparation(matrix,bigmatrix,10,0.5,2,0.7) # # Mark 95% border # if matrix[i,j] > thresh: # # Top border