-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot.p
executable file
·158 lines (147 loc) · 5.76 KB
/
plot.p
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
#!/bin/gnuplot
# Usage: gnuplot plot.p
# Requirements: That there is a folder named output_data with the used files in
cd "output_data"
set terminal png size 1200,1000
set yrange [-200:-20]
set output '../carrier_sensing_range.png'
set title "Received Signal Strength at Range in Corresponding Environment"
set label 1 gprintf("%gm",28) at 25, -84
set label 2 gprintf("%gm",50) at 46.4, -84
set xlabel "Distance (m)"
set ylabel "Received power (dBm)"
set arrow 1 from 0,-82 to 100,-82 nohead lw 2 lc 5
set arrow 2 from 28.3,-20.2 to 28.3,-200 nohead lw 2 lc 1 dt 0
set arrow 3 from 50,-20.2 to 50,-200 nohead front lw 2 lc 3 dt 0
plot "office.csv" title "Office/Residential" with lines lw 2, "LoS.csv" title "Line of Sight" with lines lw 2, "shoppingmall.csv" title "Shoppingmall" with lines lw 2
reset
set output '../los_area_data_rate.png'
set title "Area Data Rate Line of Sight"
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
set yrange [0:0.3]
plot "los1" title "1 channel" with linespoints, "los2" title "2 channels" with linespoints, "los3" title "3 channels" with linespoints
reset
set output '../home_area_data_rate.png'
set title "Area Data Rate Residential Home"
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
set yrange [0:0.3]
plot "home1" title "1 channel" with linespoints, "home2" title "2 channels" with linespoints, "home3" title "3 channels" with linespoints
reset
set output '../mall_area_data_rate.png'
set title "Area Data Rate Shopping Mall"
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
set yrange [0:0.3]
plot "mall1" title "1 channel" with linespoints, "mall2" title "2 channels" with linespoints, "mall3" title "3 channels" with linespoints
reset
set table '/tmp/stats.dat'
set yrange [0:0.12]
plot "random_mall[20]"
unset table
plot '/tmp/stats.dat'
max1_y = GPVAL_DATA_Y_MAX
max1_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_mall[20, 20]"
unset table
plot '/tmp/stats.dat'
max2_y = GPVAL_DATA_Y_MAX
max2_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_mall[20, 20, 20]"
unset table
plot '/tmp/stats.dat'
max3_y = GPVAL_DATA_Y_MAX
max3_x = GPVAL_DATA_X_MAX
set label 1 gprintf("%.4fMbps/m^2", max1_y) at max1_x+0.001, max1_y+0.001
set label 2 gprintf("%.4fMbps/m^2", max2_y) at max2_x+0.001, max2_y+0.001
set label 3 gprintf("%.4fMbps/m^2", max3_y) at max3_x+0.001, max3_y+0.001
set output '../mall_random_area_data_rate.png'
set title "Area Data Rate Shopping Mall"
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
plot "random_mall[20]" title "1 Channel" with linespoints, "random_mall[20, 20]" title "2 Channels" with linespoints, "random_mall[20, 20, 20]" title "3 Channels" with linespoints
reset
set table '/tmp/stats.dat'
set yrange [0:0.3]
plot "random_home[20]"
unset table
plot '/tmp/stats.dat'
max1_y = GPVAL_DATA_Y_MAX
max1_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_home[20, 20]"
unset table
plot '/tmp/stats.dat'
max2_y = GPVAL_DATA_Y_MAX
max2_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_home[20, 20, 20]"
unset table
plot '/tmp/stats.dat'
max3_y = GPVAL_DATA_Y_MAX
set output '../home_random_area_data_rate.png'
set title "Area Data Rate Residential Home 20MHz Channel Bandwidth"
set label 1 gprintf("%.4fMbps/m^2", max1_y) at max1_x+0.001, max1_y+0.001
set label 2 gprintf("%.4fMbps/m^2", max2_y) at max2_x+0.001, max2_y+0.001
set label 3 gprintf("%.4fMbps/m^2", max3_y) at max3_x+0.001, max3_y+0.001
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
plot "random_home[20]" title "1 Channel" with linespoints, "random_home[20, 20]" title "2 Channels" with linespoints, "random_home[20, 20, 20]" title "3 Channels" with linespoints
reset
set yrange [0:0.3]
set table '/tmp/stats.dat'
plot "random_home[20, 20, 20]"
unset table
plot '/tmp/stats.dat'
max1_y = GPVAL_DATA_Y_MAX
max1_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_home[20, 40]"
unset table
plot '/tmp/stats.dat'
max2_y = GPVAL_DATA_Y_MAX
max2_x = GPVAL_DATA_X_MAX
set output '../home_random_area_data_rate_20vs40.png'
set title "Area Data Rate Comparison 20+20+20MHz vs 40+20MHz Bandwidth Channels"
set label 1 gprintf("%.4fMbps/m^2", max1_y) at max1_x+0.001, max1_y+0.001
set label 2 gprintf("%.4fMbps/m^2", max2_y) at max2_x+0.001, max2_y+0.001
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
plot "random_home[20, 20, 20]" title "20, 20, 20 Bands" with linespoints, "random_home[20, 40]" title "20, 40 Bands" with linespoints
reset
set table '/tmp/stats.dat'
set yrange [0:0.03]
plot "random_los[20]"
unset table
plot '/tmp/stats.dat'
max1_y = GPVAL_DATA_Y_MAX
max1_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_los[20, 20]"
unset table
plot '/tmp/stats.dat'
max2_y = GPVAL_DATA_Y_MAX
max2_x = GPVAL_DATA_X_MAX
set table '/tmp/stats.dat'
plot "random_los[20, 20, 20]"
unset table
plot '/tmp/stats.dat'
max3_y = GPVAL_DATA_Y_MAX
max3_x = GPVAL_DATA_X_MAX
set output '../los_random_area_data_rate.png'
set title "Area Data Rate Line of Sight"
set label 1 gprintf("%.4fMbps/m^2", max1_y) at max1_x+0.001, max1_y+0.001
set label 2 gprintf("%.4fMbps/m^2", max2_y) at max2_x+0.001, max2_y+0.001
set label 3 gprintf("%.4fMbps/m^2", max3_y) at max3_x+0.001, max3_y+0.001
set xlabel "Deployment Density (AP/m^{2})"
set ylabel "Area Data Rate (Mbps/m^{2})"
plot "random_los[20]" title "1 Channel" with linespoints, "random_los[20, 20]" title "2 Channels" with linespoints, "random_los[20, 20, 20]" title "3 Channels" with linespoints
reset
set output '../data_rate_user.png'
set title 'Data Rate Attainable for Every User of an AP'
set xlabel 'Users [N]'
set ylabel 'Average Datarate Mbps/User'
plot "avg_user_datarate_per_AP" smooth bezier title "Average Datarate" with lines