#// gnuplot script for ploting the data set title "Time taken to access a two-dimensional array of size w^2 bytes" set xlabel "Array width, w (bytes), width = height, total size = width^2" set ylabel "Time, t (seconds)" set autoscale set terminal png enhanced font 'arial,12' size 600, 600 set output "plot.png" set xtic 256 set ytic 0.5 set xrange [0:2600] set yrange [0:8.5] set grid xtics ytics set key left top set key spacing 2.5 set style line 1 lt 1 lw 1 linecolor rgb "black" set style line 2 lt 3 set style line 3 lt 3 set key box linestyle 1 xfirst_fit(x) = k0 * (x**2) fit xfirst_fit(x) "xfirst_char.txt" using 1:3 via k0 plot \ "xfirst_char.txt" using 1:3 \ title "Access by x, then by y" with lines linewidth 2, \ "yfirst_char.txt" using 1:3 \ title "Access by y, then by x" with lines linewidth 2, \ xfirst_fit(x) title "Best Fit: by x, then by y" with lines linewidth 2