summaryrefslogtreecommitdiff
path: root/report/figures/wall-times/plot.gnu
diff options
context:
space:
mode:
Diffstat (limited to 'report/figures/wall-times/plot.gnu')
-rw-r--r--report/figures/wall-times/plot.gnu49
1 files changed, 49 insertions, 0 deletions
diff --git a/report/figures/wall-times/plot.gnu b/report/figures/wall-times/plot.gnu
new file mode 100644
index 0000000..0aa694c
--- /dev/null
+++ b/report/figures/wall-times/plot.gnu
@@ -0,0 +1,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)$"
+