refactoring gnuplot writer for better extensions, breaks build