summaryrefslogtreecommitdiff
path: root/report/figures/wall-times/plot.gnu
blob: 0aa694c7d912966686768e6594cb4c24d9bea65e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#set terminal x11 persist
set terminal cairolatex pdf size 6in,3in
set output "walltimes.tex"

ptsize=0.4
# R ColorBrewer theme (minus yellow)
set linetype 1 lc rgb '#E41A1C' pt 7 ps ptsize
set linetype 2 lc rgb '#377EB8' pt 7 ps ptsize
set linetype 3 lc rgb '#4DAF4A' pt 7 ps ptsize
set linetype 4 lc rgb '#984EA3' pt 7 ps ptsize
set linetype 5 lc rgb '#FF7F00' pt 7 ps ptsize
set linetype 6  lc rgb '#A65628' pt 7 ps ptsize 
set linetype 7  lc rgb '#F781BF' pt 7 ps ptsize 
set linetype 8  lc rgb '#999999' pt 7 ps ptsize 
set linetype 9 lc rgb '#8DD3C7' pt 7 ps ptsize 
set linetype 10 lc rgb '#BEBADA' pt 7 ps ptsize 
set linetype 11 lc rgb '#FB8072' pt 7 ps ptsize 

set logscale xy
set xlabel 'Sample Size $L$'
set ylabel 'Wall Time [s]'
set grid
set key top outside center horizontal
set key samplen 2
set key width 5

set lmargin at screen 0.15
set rmargin at screen 0.85

# Simple loop over files
plot for [i=1:6] sprintf('%d_128_perf.out', 500+250*(i-1)) \
     using 1:2 with linespoints title sprintf('$N=%d$', 500+250*(i-1)), \
     [100:10000] '+' using 1:(0.03*$1) with lines dt 2 lc rgb "black" title "$\\mathcal{O}(n)$"
     #1e-3*x**3 with lines dt 2 lc rgb "black"


# And for matrix size

set output "N_walltimes.tex"
array samples[6] = [128, 256, 512, 1024, 2048, 4096]

set xrange [400:2400]
set yrange [1:10000]
set xlabel "Matrix size $N$"

plot for [i=1:|samples|] sprintf('%d_128_perf.out',samples[i]) \
    using 1:2 with linespoints title sprintf('$L=%d$', samples[i]), \
    1e-8*x**3 with lines dt 2 lc rgb "black" title "$\\mathcal{O}(n^3)$"