# Gnuplot script # plot relative timings for 80-bit/32-bit/64-bit reset set macros #set term png enhanced font arial 10 size 400,600 set term png enhanced size 770,500 er(x,y)=sqrt(x**2+y**2) #set grid # prepare data files dir="./data2/" #dir="./" do for [h in "cluster cluster51"] { system( sprintf("cd %s; paste 32_%s_SUM.o2 64_%s_SUM.o2 80_%s_SUM.o2 > %s.tmp",dir,h,h,h,h) ) } set output sprintf('acc_sum.png') #set title sprintf("log_{10}(1 + |S(N)|)") # reset index of default line styles colors="black blue green dark-violet red yellow brown" set for [i=1:words(colors)] linetype i lw 2 lc rgb word(colors, i) set multiplot # big plot set size 1,1 set origin 0,0 set xlabel "log_{10}N" set ylabel "log_{10}(1 + |S(N)|)" set key right top Left reverse #set xrange [2**10 : 2**35] set yrange [0:13] #set logscale x # set logscale y h="cluster51" dat=dir.h.".tmp" eps=0.15 plot dat using (log10($2)):($2 <= 2**25 ? log10(1.+abs($3)) + 2*eps : 1/0 ) title "32-bit" with lp,\ dat using (log10($2)):( log10(1.+abs($13))+eps) title "64-bit" with lp,\ dat using (log10($2)):( log10(1.+abs($23)) ) title "80-bit" with lp ### inset plot #set border lt 1 lc rgb "gray30" unset grid set size 0.49,0.3 set origin 0.12,0.64 #set xrange [5e7 : 2**35] set xrange [8.1 : 10.8] set yrange [0:13] # adjust position of the label x1=8.4; y1=11.5 set label 1 "Parallel calculation No.threads=40" at x1,y1 left set xlabel "" set ylabel "" set title "" set lmargin 0 set tmargin 0 set bmargin 0 set tics font "arial,10" set xtics offset 0,2 #set xtics (1e8,1e9,1e10) offset 0,2 set ytics (4,8,12) offset 3,0 #unset ytics; set y2tics (2,4,6,8,10) plot dat using (log10($2)):( log10(1.+abs($17))+eps) title "" with lp ls 2,\ dat using (log10($2)):( log10(1.+abs($27)) ) title "" with lp ls 3 unset multiplot