Gnuplot

Gnuplot is an excellent and free graphing program available for most operating sytems. I do not intend to give an introduction to Gnuplot, there are enough and much better resources on the web than I could ever write. However, using Gnuplot I came across a few problems that seemed to be impossible to crack, but after some research I found some kind of solution or workaround. I post these here.

A detailed, hands-on manual from the first steps to advanced plotting is available on the "Kawano" page. I frequently use the official demo page, what can give you good hints. A similar example page is available on Wikimedia and a reference for the shades of RGB greyscale can be found at J-A-B.net. If you are after special solutions, take a look at Gnuplotting.

***

Knowing the built in commands in the graph window make life much easier (B1 = mouse button 1):

  •  2x<B1>             print coordinates to clipboard using `clipboardformat`
  •                     (see keys '3', '4')
  •  <B2>               annotate the graph using `mouseformat` (see keys '1', '2')
  •                     or draw labels if `set mouse labels is on`
  •  <Ctrl-B2>          remove label close to pointer if `set mouse labels` is on
  •  <B3>               mark zoom region (only for 2d-plots and maps).
  •  <B1-Motion>        change view (rotation). Use <ctrl> to rotate the axes only.
  •  <B2-Motion>        change view (scaling). Use <ctrl> to scale the axes only.
  •  <Shift-B2-Motion>  vertical motion -- change xyplane
  •  Space          raise gnuplot console window
  •  q            * close this plot window
  •  a              `builtin-autoscale` (set autoscale keepfix; replot)
  •  b              `builtin-toggle-border`
  •  e              `builtin-replot`
  •  g              `builtin-toggle-grid`
  •  h              `builtin-help`
  •  l              `builtin-toggle-log` y logscale for plots, z and cb for splots
  •  L              `builtin-nearest-log` toggle logscale of axis nearest cursor
  •  m              `builtin-toggle-mouse`
  •  r              `builtin-toggle-ruler`
  •  1              `builtin-decrement-mousemode`
  •  2              `builtin-increment-mousemode`
  •  3              `builtin-decrement-clipboardmode`
  •  4              `builtin-increment-clipboardmode`
  •  5              `builtin-toggle-polardistance`
  •  6              `builtin-toggle-verbose`
  •  7              `builtin-toggle-ratio`
  •  n              `builtin-zoom-next` go to next zoom in the zoom stack
  •  p              `builtin-zoom-previous` go to previous zoom in the zoom stack
  •  u              `builtin-unzoom`
  •  Right          `builtin-rotate-right` only for splots; <shift> increases amount
  •  Up             `builtin-rotate-up` only for splots; <shift> increases amount
  •  Left           `builtin-rotate-left` only for splots; <shift> increases amount
  •  Down           `builtin-rotate-down` only for splots; <shift> increases amount
  •  Escape         `builtin-cancel-zoom` cancel zoom region
  •               * indicates this key is active from all plot windows

***

I wanted to display a curve filled from below, but Gnuplot covered the x-axis tick marks as well. To get around this problem you need to use the commands "set grid front" and "unset grid" before plotting.

***

To use the ampersand (&) symbol in labels in the postscript terminal you need to escape it twice: \\&

***

A reference how to use TeX fonts in the Gnuplot Postscript terminal by Harald Harders.

***

A table for line and point types for the enhanced postscript terminal is not easy to find (thanks to Martin, I learned it is easier to make):