# HG changeset patch # User nikcleju # Date 1326909004 0 # Node ID 4d1bfd404f6a8c5b60d1c1e712367fae6d963a0e # Parent b4a0b4dfe206f708cd629f49761f5cf299445d88 utils.py(): Added function int_setticks() to set axes labels, fontsize and tick locations and labels diff -r b4a0b4dfe206 -r 4d1bfd404f6a utils.py --- 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