User: knarf Date: 2011/11/14 12:17 AM
Modified: /cactus-benchmarks/ results-best.pdf, results-best.py
Log: final matplotlib script for figure
File Changes:
Directory: /cactus-benchmarks/ ==============================
File [modified]: results-best.pdf Delta lines: +0 -0 =================================================================== (Binary files differ)
File [modified]: results-best.py Delta lines: +21 -15 =================================================================== --- cactus-benchmarks/results-best.py 2011-11-14 06:15:25 UTC (rev 194) +++ cactus-benchmarks/results-best.py 2011-11-14 06:17:09 UTC (rev 195) @@ -3,12 +3,8 @@ # Plot evolution of central density from plot_defaults import *
-# todo: Zeilenabstand Legende -# X-Achse in 2^x beschriften - - # stuff -xlim = (10,15000) +xlim = (16,16384) ylim = (0,40)
# load data @@ -34,21 +30,21 @@ ax = fig.add_subplot(1,1,1)
# plot -Fx,Fy = load_machine('franklin', {'steps': '==128', 'size': '==25', 'procs': '>=16', 'tpp': '==1', 'iter': '==0'}) -ax.semilogx(Fx, Fy, linestyle='-', marker='+', color='red', label='Franklin') - Fx,Fy = load_machine('hlrb2', {'steps': '==128', 'size': '==25', 'procs': '>=16', 'tpp': '==1', 'iter': '==10'}) ax.semilogx(Fx, Fy, linestyle='--', marker='x', color='green', label='HLRB II')
-Fx,Fy = load_machine('kraken', {'steps': '==128', 'size': '==25', 'ppn': '==4', 'procs': '>=16', 'tpp': '==1', 'iter': '==50'}) -ax.semilogx(Fx, Fy, linestyle='--', marker='*', color='blue', label='Kraken') - Fx,Fy = load_machine('queenbee', {'steps': '==128', 'size': '==25', 'ppn': '==8', 'procs': '>=16', 'tpp': '==2', 'iter': '==0'}) ax.semilogx(Fx, Fy, linestyle='--', marker='s', color='purple', label='Queen Bee')
Fx,Fy = load_machine('ranger', {'steps': '==128', 'size': '==25', 'ppn':'==16', 'procs': '>=16', 'tpp': '==1', 'iter': '==71'}) ax.semilogx(Fx, Fy, linestyle='-', marker='s', color='black', label='Ranger')
+Fx,Fy = load_machine('kraken', {'steps': '==128', 'size': '==25', 'ppn': '==4', 'procs': '>=16', 'tpp': '==1', 'iter': '==50'}) +ax.semilogx(Fx, Fy, linestyle='--', marker='*', color='blue', label='Kraken') + +Fx,Fy = load_machine('franklin', {'steps': '==128', 'size': '==25', 'procs': '>=16', 'tpp': '==1', 'iter': '==0'}) +ax.semilogx(Fx, Fy, linestyle='-', marker='+', color='red', label='Franklin', basex=2) + # plot properties ax.set_xlim(xlim) ax.set_ylim(ylim) @@ -56,18 +52,28 @@ #plt.title('PSD', fontsize=fontsize)
ax.set_xlabel(r'Number of cores') -#ax.xaxis.set_major_locator(mticker.MaxNLocator(7)) -#ax.xaxis.set_minor_locator(mticker.MaxNLocator(14)) ax.xaxis.grid(False) ax.set_ylabel(r'time per RHS evalutation $[\mu s]$') + +def base2format(n, pos): + if (n<1024): + return "%i" % n; + else: + if (n%1024 == 0): + return "%ik" % (n/1024); + else: + return "%i" % n; + +ax.xaxis.set_major_formatter(mticker.FuncFormatter(base2format)); ax.yaxis.set_major_locator(mticker.MaxNLocator(5)) ax.yaxis.set_minor_locator(mticker.MaxNLocator(10)) ax.yaxis.grid(False) set_tick_sizes(ax, 8, 4)
handles, labels = ax.get_legend_handles_labels() -leg = ax.legend(handles, labels, loc='best', handlelength=4) +leg = ax.legend(handles, labels, loc='best', handlelength=4, ncol=2) +leg.draw_frame(False)
#plt.show() -plt.savefig('test.pdf') +plt.savefig('results-best.pdf')
commits@lists.einsteintoolkit.org