added gnuplot support. Fixed old bugs.
added gnuplot support. Fixed old bugs.