Gnuplotting – Create scientific plots using gnuplot
gnuplotting.org
gnuplotting.org
The project is a toolkit for Orbital mechanics written in C. There's a test framework that generates a physical scenario, say two satellites colliding in orbit, and then goes on to solve some difficult problem, like find when and where a collision occurs.
I've been dumping the initial situation, some auxiliary variables and the steps taken by the algorithm to simple text files and then plotting it out with GNUplot.
Sure there are a lot of alternatives, but I really didn't want to embed anything in my C program or start writing a separate plotting tool in another language.
GNUplot isn't great in interactive 3d plots but it works. For 2d plots, doing some derivatives and displaying the algorithm steps, it has worked great.
Not a pretty tool, but it does the job and I don't really know of a better tool for my use.
For ad-hoc plots, I have some key bindings in my $EDITOR for executing GNUplot. For more complex cases, I run it with a Makefile.
It is magical
I've been looking for something like this for some other projects with real time data.
I used Gnuplot five or ten years ago when I barely knew of anything else, but I don't have a sense of what its advantages are these days.
I'm surprised origin is still used. I used it some 20 years ago.
> It was good 20 years ago, and it's good today.
I wasn't using such things 20 years ago, but 10 years ago gnuplot was a crufty relic and a right pain in the bum to use for anything beyond the most basic of plots. Together with LaTeX, it was one of the things that made getting into CS research much more difficult than necessary. We need fewer barriers to entry in this field, not more.
Also, a fun fact: gnuplot is not GNU. It has this weird custom license that disallows distribution of modified versions and is incompatible with the GPL. http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright...
I used to wonder how something so old could be so bad, and how newer projects like matplotlib managed to race ahead of it. I think the license explains a lot.
Edit: I should add - if gnuplot works for you, more power to you! Use what works. But I've been much happier since I discovered matplotlib in about 2006.
As for matplotlib, there's no reason at all for it to be making plots. It just needed to provide a plotting interface to numpy, and the backend is almost irrelevant. They could EASILY have reused existing tools for the backend, and contributed upstream to fix whatever deficiencies they thought existed.
The whole point of matplotlib is interactivity and embedability in GUI toolkits.
There was nothing else that meet those criteria in Python at the time, and the other options were GUI toolkit specific.
Try finding something else that you can seamlessly embed in Tk, Gtk, Qt, Wx, etc with full interactivity that still creates publication quality static plots.
I'm sad you feel this way because I've really enjoyed working with GNUplot and Latex. Sure it has some warts but it generally works well.
I might have a test or benchmark that produces results, a GNUplot script to plot it and a Latex document it's embedded to. The whole process from source code to PDF is automated, change the benchmarks, run make and you have a report.
Sure there are more user friendly alternatives, or apps that work better in interactive mode, but imagine doing the workflow above using, say, Excel and Word. Or Matplotlib and Google Docs.
10 years ago I was running experiments using Python code that wrote gnuplot scripts and LaTeX tables. Now I cut out the middle man, and the Python scripts make the graphs themselves.
http://kmkeen.com/rtl-power/tholin_rtlsdr.png
Every pixel is a datapoint. There are only 1.5M values in that render (3-tuples of time, frequency and intensity) but the resolution of that chart is pretty low. People casually do charts a hundred times larger. Then you start running into other problems, like sharing the images. Firefox won't display images wider/taller than 32k px for example.
Some Ruby scripting and ffmpeg was also involved. Here is the code - https://github.com/otobrglez/movement
Plus it was easier to just do everything in Python and not have to use a separate process to plot in the end.
Nevertheless, I still find it useful. Nothing else seems as easy to quickly plot an analytical function: `gnuplot -p -e "sin(x)"`