Minimal GnuPlot intro

From Wikiid
Revision as of 08:29, 15 February 2008 by SteveBaker (Talk | contribs) (New page: I use gnuplot sufficiently rarely that I can never remember how to drive it from one session to the next. Here is a really minimal 'getting started (again)' guide: % gnuplot ... ...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

I use gnuplot sufficiently rarely that I can never remember how to drive it from one session to the next. Here is a really minimal 'getting started (again)' guide:

  % gnuplot
  ...
  gnuplot> set terminal gif
  gnuplot> set output 'myplot.gif'
  gnuplot> plot 'myfile.dat' with lines
  gnuplot> quit

...will take 'myfile.dat' - which contains two columns of numbers for X and Y coordinates - and will plot them with some sort of reasonable axes and put the result out into a '.gif' file called 'myplot.gif'.

Neither the 'man' nor 'info' pages are very friendly (like it would be nice to have some decent examples so I can do the basic stuff without having to relearn the entire package!) and the 'gnuplot --help' thing is useless. The interactive help feature is best:

  % gnuplot
  ...
  gnuplot> help

...or...

  gnuplot> help command

...work best.