Subversion Repositories svnkaklik

Rev

Rev 408 | Go to most recent revision | 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 style data lines
18
 set style data lines
19
 set terminal png
19
 set terminal png
20
 set xlabel 'UT Seconds'
20
 set xlabel 'UT Seconds'
21
 set size 1.4,0.6
21
 set size 1.4,0.6
22
 set xrange [$t1:$t2]
22
 set xrange [$t1:$t2]
23
 set key outside below
23
 set key outside below
24
 plot '/tmp/nplot.$$' using (\$1):(\$5/2) title 'Anthorn',\
24
 plot '/tmp/nplot.$$' using (\$1):(\$5/2) title 'Anthorn',\
25
      '' using (\$1):(\$6/2) title 'Skelton',\
25
      '' using (\$1):(\$6/2) title 'Skelton',\
26
      '' using (\$1):(\$7*2) title 'Burlage',\
26
      '' using (\$1):(\$7*2) title 'Burlage',\
27
      '' using (\$1):(\$4) title 'Le Blanc',\
27
      '' using (\$1):(\$4) title 'Le Blanc',\
28
      '' using (\$1):(\$8*2) title 'Tavolara'
28
      '' using (\$1):(\$8*2) title 'Tavolara'
29
 
29
 
30
 " | gnuplot
30
 " | gnuplot