First big whack of gnuplot wrapper stuff pulled from elsewhere.