-
Notifications
You must be signed in to change notification settings - Fork 0
/
make_graphs.gnuplot
132 lines (112 loc) · 3.99 KB
/
make_graphs.gnuplot
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
#
#
# Generating the graphs associated with the
# mining of the 911 calls.
#
# gnuplot <name_of_this_file>
#
# luismartingil - 2013
# http://www.luismartingil.com
#
#
reset
my_font = "Helveltica, 14"
my_big_font = "Helveltica, 20"
my_line_width = "2"
my_axis_width = "1.5"
my_ps = "1.2"
# set default point size
set pointsize my_ps
red_000 = "#F9B7B0"
red_025 = "#F97A6D"
red_050 = "#E62B17"
red_075 = "#8F463F"
red_100 = "#6D0D03"
blue_000 = "#A9BDE6"
blue_025 = "#7297E6"
blue_050 = "#1D4599"
blue_075 = "#2F3F60"
blue_100 = "#031A49"
green_000 = "#A6EBB5"
green_025 = "#67EB84"
green_050 = "#11AD34"
green_075 = "#2F6C3D"
green_100 = "#025214"
brown_000 = "#F9E0B0"
brown_025 = "#F9C96D"
brown_050 = "#E69F17"
brown_075 = "#8F743F"
brown_100 = "#6D4903"
grid_color = "#ccaabb"
text_color = "#6a6a6a"
set style line 1 linecolor rgbcolor blue_025 linewidth my_line_width pt 7
set style line 2 linecolor rgbcolor green_025 linewidth my_line_width pt 5
set style line 3 linecolor rgbcolor red_025 linewidth my_line_width pt 9
set style line 4 linecolor rgbcolor brown_025 linewidth my_line_width pt 13
set style line 5 linecolor rgbcolor blue_050 linewidth my_line_width pt 11
set style line 6 linecolor rgbcolor green_050 linewidth my_line_width pt 7
set style line 7 linecolor rgbcolor red_050 linewidth my_line_width pt 5
set style line 8 linecolor rgbcolor brown_050 linewidth my_line_width pt 9
set style line 9 linecolor rgbcolor blue_075 linewidth my_line_width pt 13
set style line 10 linecolor rgbcolor green_075 linewidth my_line_width pt 11
set style line 11 linecolor rgbcolor red_075 linewidth my_line_width pt 7
set style line 12 linecolor rgbcolor brown_075 linewidth my_line_width pt 5
set style line 13 linecolor rgbcolor blue_100 linewidth my_line_width pt 9
set style line 14 linecolor rgbcolor green_100 linewidth my_line_width pt 13
set style line 15 linecolor rgbcolor red_100 linewidth my_line_width pt 11
set style line 16 linecolor rgbcolor brown_100 linewidth my_line_width pt 7
set style line 17 linecolor rgbcolor "#224499" linewidth my_line_width pt 5
# this is to use the user-defined styles we just defined.
set style increment user
# set the color and font of the text of the axis
set xtics textcolor rgb text_color font my_font
set ytics textcolor rgb text_color font my_font
set ztics textcolor rgb text_color font my_font
# set the color and font (and a default text) for the title and each axis
set title "Top Title" textcolor rgb text_color font my_big_font
set xlabel "X Label (unit)" textcolor rgb text_color font my_font
set ylabel "Y Label (unit)" textcolor rgb text_color font my_font
set zlabel "Z Label (unit)" textcolor rgb text_color font my_font
# set the text color and font for the label
set label textcolor rgb text_color font my_font
# set the color and width of the axis border
set border 31 lw my_axis_width lc rgb text_color
set key outside box width 2 height 2 enhanced spacing 2
# set grid color
set grid lc rgb grid_color
# set terminal postscript landscape
set term pngcairo size 720,480 enhanced font "Helvetica,20"
#set term postscript
# Generating graph
unset key
# set size 1.2,1
set output "../img/dayow.png"
set title "2. Calls for the given days of the week"
set xlabel "Day of the week"
set ylabel "Calls"
set xtics font "Helveltica, 16" nomirror
plot 'b2bua/dayow.csv' using 2:xticlabels(1) with linespoints title ''
unset output
# Generating graph
unset key
set output "../img/hourod.png"
# set size 1.2,1
set title "3. Calls for the given hours of the day"
set xlabel "Hour of the day"
set ylabel "Calls"
set xtics font "Helveltica, 12" nomirror rotate by -45
plot 'b2bua/hourod.csv' using 2:xticlabels(1) smooth bezier with lines
unset output
# Generating graph
unset key
set output "../img/eday.png"
# set size 1.8,1
set title "1. Overall days"
set xlabel "Date (Sep 1st 2013 - Jan 1st 2014)"
set ylabel "Calls"
set xtics font "Helveltica, 14" nomirror rotate by -45
set xdata time
set timefmt "%m/%d/%y"
set format x "%m/%d"
plot 'b2bua/eday.csv' using 1:2 with linespoints title ''
unset output