1# this is a GNUPLOT script generating the figure of spi_master_freq_tv.png
2
3set xlabel "Input delay (ns)"
4set xrange [0: 125]
5set ylabel "Fmax (MHz)"
6set yrange [0: 81]
7set xtics 12.5 textcolor rgb "black"
8set ytics 10 textcolor rgb "black"
9set border 3 lc rgb "gray" lw 2
10set grid lt -1 lc rgb "gray" lw 2
11set samples 10000
12set terminal png size 700,500
13set output "plot.png"
14
15apb = 12.5
16
17#each line is broken into 10 pieces by the range determined by i
18f1(i,x) = (x>= i*apb) && (x < (i+1)*apb) ? 80./(i+1) : 1/0
19
20set style circle radius graph 0.008
21
22#solid and empty circles are draw by the coordinates given in the csv
23plot [0:125]\
24    f1(-1, x) lw 3lc rgb "blue" title "IOMUX",\
25    for [i=0:9] f1(i, x) with lines lw 3 lc rgb "blue" notitle,\
26    f1(0, x+25) lw 3 lc rgb "red" title "GPIO",\
27    for [i=2:11] f1(i, x+25) with lines lw 3 lc rgb "red" notitle, \
28    "tv.csv" using 1:2 with circles notitle fill solid fc rgb "blue", \
29    "tv.csv" using 1:4 with circles notitle fc rgb "blue",\
30    "tv.csv" using 1:3 with circles notitle fill solid fc rgb "red" ,\
31    "tv.csv" using 1:5 with circles notitle fc rgb "red"
32