aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2001-02-25 17:56:30 +0000
committerEric S. Raymond <esr@thyrsus.com>2001-02-25 17:56:30 +0000
commit11e644f58b1fd80b1955734a4a7a36883154f5c0 (patch)
tree79331513d35b30c8cca9b1892769e70473017374
parent15ee1a9910d267982c6c6bd0667a3e20eb6a3551 (diff)
downloadfetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.tar.gz
fetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.tar.bz2
fetchmail-11e644f58b1fd80b1955734a4a7a36883154f5c0.zip
Computations moved out of gnuplot into shell.
svn path=/trunk/; revision=3146
-rwxr-xr-xgrowthplot28
1 files changed, 16 insertions, 12 deletions
diff --git a/growthplot b/growthplot
index a3deac79..000ddcab 100755
--- a/growthplot
+++ b/growthplot
@@ -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