fixed graphing bug.  I hate perl so much
submitted version