gnuplot


Introduction:

GNUPLOT
is a portable command-line graphics program. It can be used
interactively; it can process data in files; it can be controlled
using a script.

GNUPLOT can plot simple functions, filled curves, histograms, bar graphs,
vector fields, box plots, surfaces, and contours. The user can control
the plot layout, the axes, the plot style, color choices, text and
annotation, line thicknesses. Plots can be saved in a variety of
output file formats.

As installed on the ARC clusters, only a limited range of terminal
types are supported.

           canvas  HTML Canvas object
              cgm  Computer Graphics Metafile
          context  ConTeXt with MetaFun (for PDF documents)
            corel  EPS format for CorelDRAW
             dumb  ascii art for anything that prints text
              dxf  dxf-file for AutoCad (default size 120x80)
            eepic  EEPIC -- extended LaTeX picture environment
              emf  Enhanced Metafile format
            emtex  LaTeX picture environment with emTeX specials
         epslatex  LaTeX picture environment using graphicx package
              fig  FIG graphics language for XFIG graphics editor
             hpgl  HP7475 and relatives [number of pens] [eject]
            latex  LaTeX picture environment
               mf  Metafont plotting standard
               mp  MetaPost plotting standard
             pcl5  HP Designjet 750C, HP Laserjet III/IV, etc. (many options)
       postscript  PostScript graphics, including EPSF embedded files (*.eps)
          pslatex  LaTeX picture environment with PostScript \specials
            pstex  plain TeX with PostScript \specials
         pstricks  LaTeX picture environment with PSTricks macros
              qms  QMS/QUIC Laser printer (also Talaris 1200 and others)
              svg  W3C Scalable Vector Graphics
          tek40xx  Tektronix 4010 and others; most TEK emulators
          tek410x  Tektronix 4106, 4107, 4109 and 420X terminals
          texdraw  LaTeX texdraw environment
             tgif  TGIF X11 [mode] [x,y] [dashed] ["font" [fontsize]]
         tkcanvas  Tk/Tcl canvas widget [perltk] [interactive]
             tpic  TPIC -- LaTeX picture environment with tpic \specials
          unknown  Unknown terminal type - not a plotting device
            vttek  VT-like tek40xx terminal emulator
              x11  X11 Window System
             xlib  X11 Window System (gnulib_x11 dump)
            xterm  Xterm Tektronix 4014 Mode
    

Web site:


http://www.gnuplot.info/

Reference:

  • Philipp Janert,
    Gnuplot in Action: Understanding Data with Graphs,
    Manning, 2010,
    ISBN13: 978-1-933988-39-8,
    LC: QA276.4.J37.
  • Thomas Williams, Colin Kelley,
    gnuplot 5.0, An Interactive Plotting Program,
    The Free Software Foundation, 2017.

Usage:

On any ARC cluster, check the installation details
by typing "module spider gnuplot".

GNUPLOT requires that the appropriate modules be loaded before it can be run.
One version of the appropriate commands for use on NewRiver is:

module purge
module load gnuplot/5.0.0
    

Examples:

In the following batch file, we begin by running a program that
samples a function over an interval, and then writes out a
corresponding data file, as well as a file of commands to gnuplot.
We then call gnuplot to read the commands, plot the data, and
save the graphics in an SVG file.

#! /bin/bash
#
#PBS -l walltime=00:05:00
#PBS -l nodes=1:ppn=4
#PBS -W group_list=cascades
#PBS -q open_q
#PBS -j oe

cd $PBS_O_WORKDIR

module purge
module load gcc/5.2.0
module load gnuplot/5.0.0
#
#  Compile and run program that creates command and data input to gnuplot.
#
gcc damped_sine.c -lm
mv a.out damped_sine
./damped_sine
#
#  GNUPLOT reads commands, processes data, creates plot.
#
gnuplot < damped_sine_commands.txt
#
#  An SVG graphics file is created.
#
ls gnuplot.svg

A complete set of files to carry out a similar process are available in
gnuplot_example.tar