#!/usr/local/bin/perl

#  4/22/94 by Mark Torrance (torrance@ai.mit.edu)
#
#  Redraws gnuplot graph for a particular mutual fund

$ENV{'PATH'} = "/usr/local/bin:/usr/bin:/bin:/home/pangloss/pbmplus/ppm:/home/pangloss/gnuplot:/usr/ucb";

#$funddir = "/com/doc/web/stocks/funds";
$funddir = "/home/pangloss/public_html/Fund/funds";


    $index = 0;
    $n = 0;
    $numpoints = 0;
    @xtics = ();
    @xindex = ();
    $lowest = 10000;
    $highest = -1;

    open(CONTROL,"| gnuplot | ppmtogif > $funddir/test.gif") || die("Cannot create graph file.\n");

    print CONTROL <<EOF;
set term pbm color small
set size .9,.7
set nozeroaxis
set missing "?"
EOF
$file = "world/AWSHX.dta";
    print CONTROL "plot \"$funddir/$file\" using 0:2 title '' with lines, \"$funddir/$file\" using 0:3 title '' with lines, \"$funddir/$file\" using 0:4 title ''\n";
    close CONTROL;

