Subversion Repositories svnkaklik

Rev

Rev 408 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 408 Rev 411
1
#!/bin/bash
1
#!/bin/bash
2
 
2
 
3
file=$1
3
file=$1
4
t1=$2
4
t1=$2
5
t2=$3
5
t2=$3
6
 
6
 
7
[ "$t1" = "" ] && t1=0
7
[ "$t1" = "" ] && t1=0
8
[ "$t2" = "" ] && t2=86400
8
[ "$t2" = "" ] && t2=86400
9
 
9
 
10
awk -v "t1=$t1"  -v "t2=$t2" '{
10
awk -v "t1=$t1"  -v "t2=$t2" '{
11
   $1 %= 86400
11
   $1 %= 86400
12
   if( $1 < t1) next
12
   if( $1 < t1) next
13
   if( $1 > t2) exit
13
   if( $1 > t2) exit
14
   print
14
   print
15
}' $file > /tmp/nplot.$$
15
}' $file > /tmp/nplot.$$
16
 
16
 
17
echo "
17
echo "
18
 set data style lines
18
 set data style lines
19
 set terminal png
19
 set terminal png
20
 set xlabel 'Time - UT'
20
 set xlabel 'Time - UT'
21
 set xdata time
21
 set xdata time
22
 set timefmt '%S'
22
 set timefmt '%S'
23
 set format x '%H:%M:%S'
23
 set format x '%H:%M:%S'
24
 set size 1.4,0.6
24
 set size 1.4,0.6
25
 set xrange [$t1:$t2]
25
 set xrange [$t1:$t2]
26
 set yrange [0:1]
26
 set yrange [0:1]
27
 set key outside below
27
 set key outside below
28
 plot '/tmp/nplot.$$' using (\$1):(\$5/2) title 'Anthorn',\
28
 plot '/tmp/nplot.$$' using (\$1):(\$5/2) title 'Anthorn',\
29
      '' using (\$1):(\$6/2) title 'Skelton',\
29
      '' using (\$1):(\$6/2) title 'Skelton',\
30
      '' using (\$1):(\$7*2) title 'Burlage',\
30
      '' using (\$1):(\$7*2) title 'Burlage',\
31
      '' using (\$1):(\$4) title 'Le Blanc',\
31
      '' using (\$1):(\$4) title 'Le Blanc',\
32
      '' using (\$1):(\$8*2) title 'Tavolara'
32
      '' using (\$1):(\$8*2) title 'Tavolara'
33
 
33
 
34
 " | gnuplot
34
 " | gnuplot
35
 
35