GLE is a scripting language designed for generating professional quality graphs and diagrams for publication. It uses LaTeX for typesetting, so including equations in your graphs is a snap and they look great. Christopher Bishop used GLE for all the diagrams in his textbook, "Pattern Recognition and Machine Learning," and let me tell you, they looked great. Open-source to boot!
First you write the GLE script and tell it to accept a text file as the graph input data. Then, you can generate the data set in whatever language you want, export as a text file, and call the GLE script to generate the graph.
More info from the website:
GLE (Graphics Layout Engine) is a graphics scripting language designed for creating publication quality graphs, plots, diagrams, figures and slides. GLE supports various graph types (function plots, histograms, bar graphs, scatter plots, contour lines, color maps, surface plots, ...) ... GLE's output formats include EPS, PS, PDF, JPEG, and PNG.