Mercurial > hg > absrec
changeset 8:4d1bfd404f6a
utils.py(): Added function int_setticks() to set axes labels, fontsize and tick locations and labels
author | nikcleju |
---|---|
date | Wed, 18 Jan 2012 17:50:04 +0000 |
parents | b4a0b4dfe206 |
children | 04c9264f0e23 |
files | utils.py |
diffstat | 1 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/utils.py Fri Jan 13 18:44:26 2012 +0000 +++ b/utils.py Wed Jan 18 17:50:04 2012 +0000 @@ -66,11 +66,11 @@ plt.figure() #plt.imshow(mdict['meanmatrix'][algoname][0,0], cmap=cm.gray, interpolation='nearest',origin='lower') plt.imshow(bigmatrix, cmap=cm.gray, norm=mcolors.Normalize(0,1), interpolation='nearest',origin='lower') - #if algoname == 'GAP': - int_setticks() - #else: - # plt.gca().get_xaxis().set_visible(False) - # plt.gca().get_yaxis().set_visible(False) + if algoname == 'GAP': + int_setticks() + else: + plt.gca().get_xaxis().set_visible(False) + plt.gca().get_yaxis().set_visible(False) if dosave: for ext in saveplotexts: @@ -157,8 +157,10 @@ def int_setticks(): - ticks = [10, 94, 179] - ticklabels = ["0.05", "0.5", "0.95"] + #ticks = [10, 94, 179] + #ticklabels = ["0.05", "0.5", "0.95"] + ticks = [10, 179] + ticklabels = ["0.05", "0.95"] ax = plt.gca() ax.set_xticks(ticks) @@ -171,4 +173,6 @@ for label in ax.get_yticklabels(): label.set_fontsize(42) - ax.set_xlabel('\delta') + ax.set_xlabel(r'$\delta$', size=60) + ax.set_ylabel(r'$\rho$', size=60) + \ No newline at end of file