in reply to plotting graphs with perl

Not sure if it does all you need it to, but GD::Simple might be the tool for you.