simple question I thought.
How do I setup a chart in gnuplot that draws a "upper threshold" for a given set of data.
I have the graph charting fine. I have peaks and valleys. I can either setup a number that I want to be the "upper threshold". a horizontal line based either in the data, or set in the script. I cannot seem to figure out how to make that happen.
script:
#!/usr/local/bin/gnuplot
reset
set terminal png nocrop enhanced font "/usr/share/fonts/liberation/LiberationMono-Regular.ttf" 10 size 1200,600 xffffff
set output '/root/gnuplot/images/statvv-level3_threshold.png'
set xdata time
set grid
set key box outside below
set xtics 300
set format x "%m/%d/%y-%H:%M:%S"
set timefmt "%m/%d/%y-%H:%M:%S"
set xtics rotate by -90
set ytics auto
set ylabel "yAxisLabel"
set style data lines
set title "title of chart"
set key below
plot 'file_with_data' u 2:8 t 'title'
-=-=-=-=-=-
file_with_data looks like this:
330000 09/12/11-20:29:27 string01 t 278 278 278 13480 13480 13480 1.1 1.1 48.5 48.5 1
330000 09/12/11-20:29:37 string01 t 172 225 278 1793 7634 13480 0.4 0.8 10.4 34.0 0
330000 09/12/11-20:29:47 string01 t 241 230 278 7205 7491 13480 0.6 0.8 29.9 32.6 0
330000 09/12/11-20:29:57 string01 t 191 220 278 2526 6250 13480 0.6 0.7 13.2 28.4 0
330000 09/12/11-20:30:07 string01 t 263 229 278 2024 5405 13480 0.4 0.7 7.7 23.6 0
330000 09/12/11-20:30:17 string01 t 612 293 612 7321 5724 13480 0.7 0.7 12.0 19.6 0
330000 09/12/11-20:30:27 string01 t 224 283 612 4455 5543 13480 0.5 0.6 19.9 19.6 0
330000 09/12/11-20:30:37 string01 t 161 268 612 1045 4981 13480 0.2 0.6 6.5 18.6 0
330000 09/12/11-20:30:47 string01 t 159 255 612 1105 4550 13480 0.2 0.6 7.0 17.8 0
330000 09/12/11-20:30:57 string01 t 196 250 612 2684 4363 13480 0.3 0.6 13.7 17.5 0
330000 09/12/11-20:31:07 string01 t 325 256 612 8414 4732 13480 0.4 0.5 25.9 18.5 0
330000 09/12/11-20:31:17 string01 t 177 250 612 1346 4450 13480 0.5 0.5 7.6 17.8 0
330000 09/12/11-20:31:27 string01 t 307 254 612 6851 4635 13480 3.3 0.8 22.3 18.2 1
330000 09/12/11-20:31:37 string01 t 156 247 612 1906 4439 13480 3.3 0.9 12.3 18.0 1
330000 09/12/11-20:31:47 string01 t 187 243 612 2533 4312 13480 2.9 1.0 13.5 17.7 1
330000 09/12/11-20:31:58 string01 t 241 243 612 2102 4173 13480 3.1 1.1 8.7 17.2 1
330000 09/12/11-20:32:08 string01 t 134 237 612 1359 4006 13480 3.4 1.2 10.1 16.9 0
330000 09/12/11-20:32:18 string01 t 201 235 612 3062 3953 13480 3.2 1.3 15.2 16.9 0
330000 09/12/11-20:32:28 string01 t 251 235 612 14184 4496 14184 2.7 1.4 56.5 19.1 6
I hope the formatting renders correctly.
column1 has been added so I can "pull" the horizontal line value from the data set. I can remove it. I want to just add a horizontal line across the chart, at 330000 relative to the scale.
thanks