/[corp]/esi/mkstock.sh
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /esi/mkstock.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by dpavlin, Mon Jul 2 10:56:06 2001 UTC revision 1.2 by dpavlin, Tue Jul 3 20:18:00 2001 UTC
# Line 1  Line 1 
1  #!/bin/sh  #!/bin/sh
2    
3  tmp=/var/tmp/stock4gp  tmp=/var/tmp/stock4gp
4    dir=/data/corp/esi
5    
6  #psql -t -A -F "        " corp -c "select date(date),min(current),avg(current),max(current),type,count(*) from stocks group by date(date),type order by type,date(date)" -o $tmp  psql -t -A -F " " corp -c "select date(date),min(current),avg(current),max(current),type,count(*) from stocks group by date(date),type order by type,date(date)" -o $tmp
7  cat $tmp | grep -i lse > $tmp-lse  cat $tmp | grep -i lse > $tmp-lse
8  cat $tmp | grep -i ftse > $tmp-ftse  cat $tmp | grep -i ftse > $tmp-ftse
9    
10  gnuplot -persist << EOF  gnuplot -persist << EOF
11  set terminal png color  set terminal png color
12  set output 'out.png'  set output '$dir/out.png'
13  set noclip points  set noclip points
14  set clip one  set clip one
15  set noclip two  set noclip two
# Line 96  set tmargin -1 Line 97  set tmargin -1
97  set locale "C"  set locale "C"
98  plot '/var/tmp/stock4gp-lse' using 1:3:2:4 title 'LSE' with yerrorbars, '/var/tmp/stock4gp-lse' using 1:3 title 'average' with lines  plot '/var/tmp/stock4gp-lse' using 1:3:2:4 title 'LSE' with yerrorbars, '/var/tmp/stock4gp-lse' using 1:3 title 'average' with lines
99  EOF  EOF
100    
101    convert $dir/out.png -quality 90 $dir/stocks.jpg

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.26