Table of Contents

Gnuplot

set xrange [0:1000]
plot "datafile" using 1:4 with lines title "Sample title"

Manual online, although have pdf on school machines in ~/manuals.

To file

set term postscript color eps enh
set output "graph.eps"

...plot plot plot...

show output

There's also something cool about piping, like |lpr -Pmyprinter.

Formatting

Gnuplot is a fuckton of irritation.

The thing to remember is that there are line styles 1 to 8 preset. Line types 1 to 8 give eight different colour and decoration (solid/dashed/etc.) presettings. There is no way to directly specify line decorations: you must declare line type then change the colour. This is braindead. This is so irritating I have to go have a cup of tea now.

set style line 1 lt 1 lw 2 lc rgb "red"
set style line 2 lt 1 lw 2 lc rgb "blue"

  plot "0.001" using 1:3 with lines title "0.001" ls 1
replot "0.002" using 1:3 with lines title "0.002" ls 2
replot "0.007" using 1:3 with lines title "0.007" ls 1
replot "0.008" using 1:3 with lines title "0.008" ls 2

Click for an example of formatting lines and labels.

gnuplot.txt · Last modified: 2008/10/23 10:37 by jobriath
 
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki