diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2001-02-25 17:56:30 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2001-02-25 17:56:30 +0000 |
commit | 11e644f58b1fd80b1955734a4a7a36883154f5c0 (patch) | |
tree | 79331513d35b30c8cca9b1892769e70473017374 | |
parent | 15ee1a9910d267982c6c6bd0667a3e20eb6a3551 (diff) | |
download | fetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.tar.gz fetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.tar.bz2 fetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.zip |
Computations moved out of gnuplot into shell.
svn path=/trunk/; revision=3146
-rwxr-xr-x | growthplot | 28 |
1 files changed, 16 insertions, 12 deletions
@@ -26,25 +26,29 @@ EOF # OK, now write the event labels ( - echo "count=0" - echo "breakheight=510" + count=0 + lastday=0 + breakheight=510 while read version legend do if [ "$version" = '%' ] then echo "# Associate $lastday to '$legend'" - echo "count = count + 1" - echo "lastday = $lastday - 5" - echo "lasttotal = $lasttotal" - echo "endy = breakheight + 50 + count * 50" - echo "if (endy > lasttotal) arrowhead = lasttotal+50" - echo "if (endy <= lasttotal) arrowhead = lasttotal-5" + count=$((count+1)) + lastday=$(($lastday-5)) + endy=$((breakheight+50+count*50)) + if ((endy>lasttotal)) + then + arrowhead=$((lasttotal+50)) + echo "set label '$legend' at $lastday-10, $endy+15" + else + arrowhead=$((lasttotal-5)) + echo "set label '$legend' at $lastday-475, $endy-15" + fi echo set arrow \ - from lastday, endy \ - to lastday, arrowhead \ + from $lastday, $endy \ + to $lastday, $arrowhead \ head - echo "if (endy > lasttotal) set label '$legend' at lastday-10, endy+15" - echo "if (endy <= lasttotal) set label '$legend' at lastday-475, endy-15" else set -- $legend size=$1 |