LEFT | RIGHT |
(no file at all) | |
1 | 1 |
2 set terminal jpeg size 1200,500· | 2 set terminal jpeg size 1200,500· |
3 # reset all options to default, just for precaution | 3 # reset all options to default, just for precaution |
4 reset | 4 reset |
5 set output "img/figure_link.jpg" | 5 set output "img/figure_link.jpg" |
6 set style data histograms· | 6 set style data histograms· |
7 # set the figure size | 7 |
8 #set size ratio 0.5 | |
9 | 8 |
10 # set the x axis | 9 # set the x axis |
11 set xlabel "Object index" | 10 set xlabel "Object index" |
12 set xtics rotate out | 11 set xtics rotate out |
13 set style fill solid border | 12 set style fill solid border |
14 # set the y axis | 13 # set the y axis |
15 set yrange [0:1] noreverse nowriteback | 14 set yrange [0:100] noreverse nowriteback |
16 set ylabel "link utilization(%)" | 15 set ylabel "link utilization(%)" |
17 set ytics 0,.1,1 | 16 set ytics 0,10,100 |
18 | 17 |
19 # set no grid (grid lines start from tics on both x and y axis) | 18 # set no grid (grid lines start from tics on both x and y axis) |
20 unset grid | 19 unset grid |
| 20 #new data separator (by default space) because it was easier in the log file· |
21 set datafile separator ',' | 21 set datafile separator ',' |
| 22 #put the legend outisde the graph |
22 set key outside; | 23 set key outside; |
23 set key right top; | 24 set key right top; |
24 | 25 |
25 # plot the points from the data file | 26 # plot the points from the data file as an histogram |
26 set style histogram clustered | 27 set style histogram clustered |
| 28 #we don't know how many links the client choose so we have to count with the fol
owing line |
27 nc = "`awk -F, 'NR == 1 { print NF; exit }' log_graph/single_link.log`" | 29 nc = "`awk -F, 'NR == 1 { print NF; exit }' log_graph/single_link.log`" |
| 30 #draw all columns in function of first columns as an histogram |
28 plot for [COL=2:nc] "log_graph/single_link.log" u COL:xticlabels(1) title column
header | 31 plot for [COL=2:nc] "log_graph/single_link.log" u COL:xticlabels(1) title column
header |
29 | 32 |
30 | 33 |
LEFT | RIGHT |