
Gnuplotting – Create scientific plots using gnuplot - type0
http://www.gnuplotting.org/
======
exDM69
I've been using GNUplot in a recent project of mine and it has really been a
nice experience.

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.

~~~
dima55
Look at this:
[https://github.com/dkogan/feedgnuplot](https://github.com/dkogan/feedgnuplot)

It is magical

~~~
exDM69
Thanks!

I've been looking for something like this for some other projects with real
time data.

------
capnrefsmmat
How widely used _is_ Gnuplot these days? In my community (statistics), I
haven't heard of anyone using it at all, just people using Matplotlib,
ggplot2, or R base graphics.

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.

~~~
dima55
I use gnuplot heavily. It was good 20 years ago, and it's good today. The
problem with people rewriting the wheel, is that every new wheel misses lots
of features from the tool they're trying to replace, and does many things
differently for no good reason. The efforts of the matlotlib, ggplot2 (and so
on) would have been much more usefully spent contributing to gnuplot. Instead
we have a large number of half-assed tools instead of 1 truly great one.

~~~
cvwright
I guess I have to disagree.

> 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...](http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright?view=markup)

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.

~~~
exDM69
> Together with LaTeX, it was one of the things that made getting into CS
> research much more difficult than necessary

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.

~~~
dash2
Or R and knitr. Oh, wait...

~~~
_Wintermute
Then you're tied to R, I can see the appeal of language agnostic tools.

------
jeroenjanssens
If you're using LaTeX anyway, then you might be interested in TikZ [1]. This
repo [2] contains some of the figure I created for my thesis.

[1]
[http://www.texample.net/tikz/examples/feature/plotting/](http://www.texample.net/tikz/examples/feature/plotting/)

[2] [https://github.com/jeroenjanssens/phd-
thesis](https://github.com/jeroenjanssens/phd-thesis)

~~~
davrosthedalek
gnuplot has a tikz terminal! So now you can have a paper with citation links
in the figure's keys. Really neat, but too much for most publishers and their
publishing software solution.

------
otobrglez
I've used GNU Plot to create this lovely 3D animation of my running data (GPS
tracks).

[https://vimeo.com/96479940](https://vimeo.com/96479940)

Some Ruby scripting and ffmpeg was also involved. Here is the code -
[https://github.com/otobrglez/movement](https://github.com/otobrglez/movement)

------
xioxox
I'd recommend my Veusz scientific plotting package if you want a free
scriptable GUI plotting tool. It's much easier to use than the aged gnuplot
and is more flexible for 2D plotting (3D is coming!)

[http://home.gna.org/veusz/](http://home.gna.org/veusz/)

~~~
robochat42
I keep meaning to use Veusz more. I'd also to really try out kst properly
[https://kst-plot.kde.org](https://kst-plot.kde.org)

------
acz
Here is a nice video on the new Matlab palette, and why it could be better:
[https://www.youtube.com/watch?v=xAoljeRJ3lU](https://www.youtube.com/watch?v=xAoljeRJ3lU)

------
geff82
Gnuplot is one of the reasons that makes me love the open source/Unix world
every time I use it. Writing a plot in code, embedding it in LaTeX... all
while having the fingers on the keyboard. You get connected to your machine
like that.

------
mivade
I was a loyal Gnuplot user for many years until I got fed up with a bug where
tick labels wouldn't be centered with ticks in LaTeX output without some
manual hacks. I can see from one of the posts that this issue still exists.

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)"`

~~~
dandelion_lover
In my experience, if you send the bugs to their bug tracker they are
immediately corrected and/or a workaround is suggested. The devs are very
helpful.

------
rar_ram
I used to use this to analyze ab load testing results. After ipython notebooks
(mathplotlib) , its been a long time, since I have looked into this.

------
jeena
Oh yeah, those were the days where we plotted graphs for our bachelor thesis
where we were showing how many messages and clients our generic game server
written in Erlang and the V8 js-engine could handle:
[https://jeena.net/t/GGS.pdf](https://jeena.net/t/GGS.pdf) page 40 pp

------
z3t4
Should be possible to create interactive svg's

------
piedradura
maxima and wxmaxima computer algebra software are using gnuplot.

