GnuPlot is a utility for drawing charts for Linux.
- GnuPlot Demos
Uses a Perl script to sum the columns up to create a stacked graph.
One of the answers contains an example of how to do calculations in the gnuplot script.
- Tips for nice looking charts from a CSV file
- GnuPlot graphs examples
- Lines and arrows