daily/loradtn-2017-02-10.gpl
changeset 22 b2ba74aa0bd2
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/daily/loradtn-2017-02-10.gpl	Mon Feb 13 11:07:41 2017 +0000
     1.3 @@ -0,0 +1,75 @@
     1.4 +# set term postscript eps color solid blacktext "Helvetica" 14
     1.5 +# set output 'loradtn.eps'
     1.6 +# set size 4,4
     1.7 +
     1.8 +set terminal png nocrop enhanced size 1024,768
     1.9 +set output 'loradtn-2017-02-10.png'
    1.10 +
    1.11 +set datafile separator ","
    1.12 +set xdata time
    1.13 +set timefmt "%Y-%m-%d %H:%M:%S"
    1.14 +
    1.15 +os='2017-02-10 11:00:00'
    1.16 +oe='2017-02-10 16:00:00'
    1.17 +#os='2017-01-24 14:00:00'
    1.18 +#oe='2017-01-25 13:00:00'
    1.19 +
    1.20 +set title "Loradtn power (Mech. Eng. roof)"
    1.21 +set key below 
    1.22 +
    1.23 +r1=1700
    1.24 +r2=1800
    1.25 +r3=1900
    1.26 +r4=2000
    1.27 +
    1.28 +nospike=0
    1.29 +spike=1
    1.30 +newdata=2
    1.31 +
    1.32 +set xrange [os:oe]
    1.33 +set yrange [1500:19000]
    1.34 +set y2range [-6000:8000]
    1.35 +
    1.36 +set ylabel "mV"
    1.37 +set y2label "mA"
    1.38 +set ytics nomirror
    1.39 +
    1.40 +set ytics (\
    1.41 +"OVERRIDE" 5000,\
    1.42 +"UP" 4500,\
    1.43 +"STBYSHORT" 4000,\
    1.44 +"STBYLONG" 3500,\
    1.45 +"SLEEP" 3000,\
    1.46 +"OFF" 2500,\
    1.47 +"14500" 14500,\
    1.48 +"14000" 14000,\
    1.49 +"13500" 13500,\
    1.50 +"13000" 13000,\
    1.51 +"12500" 12500,\
    1.52 +"12000" 12000,\
    1.53 +"11500" 11500,\
    1.54 +"11000" 11000,\
    1.55 +"spike" 10050)
    1.56 +
    1.57 +set y2tics ( 4000, 3500, 3000, 2500, 2000, 1500, 1000, 500, 0, -500, -1000, "spike" -2000 )
    1.58 +
    1.59 +
    1.60 +set style arrow 1 nohead ls 1 lt 3
    1.61 +set style arrow 2 nohead ls 2
    1.62 +set style arrow 3 nohead lc rgb "green"
    1.63 +set style arrow 4 nohead lc rgb "red"
    1.64 +
    1.65 +# some horizontal lines to help
    1.66 +set arrow from os,12000 to oe,12000 as 1
    1.67 +set arrow from os,11450 to oe,11450 as 3
    1.68 +set arrow from os,11300 to oe,11300 as 4
    1.69 +set arrow from os,second 1000 to oe,second 1000 as 2
    1.70 +set arrow from os,second 0 to oe,second 0 as 2
    1.71 +set arrow from os,second -1000 to oe,second -1000 as 2
    1.72 +
    1.73 +set pointsize 10
    1.74 +
    1.75 +plot 'sedded-battery.log' using 1: ( ($2 == r1 && $7 != newdata) ? ( ( ($7 == spike) ? 10050 : (10 * $4) ) ) : 1/0 ) axes x1y1 title "mV" with points ps 1, \
    1.76 +     'sedded-battery.log' using 1: ( ($2 == r1 && $7 != newdata) ? ( ( ($7 == spike) ?   -2000 :       $5  ) ) : 1/0 ) axes x1y2 title "mA" with points ps 1, \
    1.77 +     'sedded-battery.log' using 1: ( ($2 == r1) ? (2000 + $6) : 1/0 ) axes x1y1 title "state" with step
    1.78 +