?copyright ?license Copyright (C) 1986 - 1993, 1998, 2004, 2007 Thomas Williams, Colin Kelley Permission to use, copy, and distribute this software and its documentation for any purpose with or without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. Permission to modify the software is granted, but not the right to distribute the complete modified source code. Modifications are to be distributed as patches to the released version. Permission to distribute binaries produced by compiling modified sources is granted, provided you 1. distribute the corresponding source modifications from the released version in the form of a patch file along with the binaries, 2. add special version identification to distinguish your version in addition to the base release version number, 3. provide your name and address as the primary contact for the support of your modified version, and 4. retain our contact information in regard to use of the base software. Permission to distribute the released version of the source code along with corresponding source modifications in the form of a patch file is granted with same provisions 2 through 4 for binary distributions. This software is provided "as is" without express or implied warranty to the extent permitted by applicable law. AUTHORS Original Software: Thomas Williams, Colin Kelley. Gnuplot 2.0 additions: Russell Lang, Dave Kotz, John Campbell. Gnuplot 3.0 additions: Gershon Elber and many others. Gnuplot 4.0 additions: See list of contributors at head of this document. ?introduction ? `gnuplot` is a command-driven interactive function and data plotting program. It is case sensitive (commands and function names written in lowercase are not the same as those written in CAPS). All command names may be abbreviated as long as the abbreviation is not ambiguous. Any number of commands may appear on a line (with the exception that `load` or `call` must be the final command), separated by semicolons (;). Strings are indicated with quotes. They may be either single or double quotation marks, e.g., load "filename" cd 'dir' although there are some subtle differences (see `syntax` for more details). Any command-line arguments are assumed to be names of files containing `gnuplot` commands, with the exception of standard X11 arguments, which are processed first. Each file is loaded with the `load` command, in the order specified. `gnuplot` exits after the last file is processed. When no load files are named, `gnuplot` enters into an interactive mode. The special filename "-" is used to denote standard input. See help for `batch/interactive` for more details. Many `gnuplot` commands have multiple options. Version 4 is less sensitive to the order of these options than earlier versions, but some order-dependence remains. If you see error messages about unrecognized options, please try again using the exact order listed in the documentation. Commands may extend over several input lines by ending each line but the last with a backslash (\). The backslash must be the _last_ character on each line. The effect is as if the backslash and newline were not there. That is, no white space is implied, nor is a comment terminated. Therefore, commenting out a continued line comments out the entire command (see `comments`). But note that if an error occurs somewhere on a multi-line command, the parser may not be able to locate precisely where the error is and in that case will not necessarily point to the correct line. In this document, curly braces ({}) denote optional arguments and a vertical bar (|) separates mutually exclusive choices. `gnuplot` keywords or `help` topics are indicated by backquotes or `boldface` (where available). Angle brackets (<>) are used to mark replaceable tokens. In many cases, a default value of the token will be taken for optional arguments if the token is omitted, but these cases are not always denoted with braces around the angle brackets. For on-line help on any topic, type `help` followed by the name of the topic or just `help` or `?` to get a menu of available topics. The new `gnuplot` user should begin by reading about `plotting` (if on-line, type `help plotting`). See the simple.dem demo, also available together with other demos on the web page http://www.gnuplot.info/demo/simple.html ?help-desk ?seeking-assistance There is a mailing list for `gnuplot` users. Note, however, that the newsgroup comp.graphics.apps.gnuplot is identical to the mailing list (they both carry the same set of messages). We prefer that you read the messages through the newsgroup rather than subscribing to the mailing list. Instructions for subscribing to gnuplot mailing lists may be found via the gnuplot development website on SourceForge http://sourceforge.net/projects/gnuplot The address for mailing to list members is: gnuplot-info@lists.sourceforge.net Bug reports and code contributions should be mailed to: gnuplot-bugs@lists.sourceforge.net The list of those interested in beta-test versions is: gnuplot-beta@lists.sourceforge.net There is also the canonical (if occasionally out-of-date) gnuplot web page at http://www.gnuplot.info Before seeking help, please check the FAQ (Frequently Asked Questions) list. When posting a question, please include full details of the version of `gnuplot`, the machine, and operating system you are using. A _small_ script demonstrating the problem may be useful. Function plots are preferable to datafile plots. If email-ing to gnuplot-info, please state whether or not you are subscribed to the list, so that users who use news will know to email a reply to you. There is a form for such postings on the WWW site. ?new-features ?version 4.2 features Gnuplot version 4.2 offers many new features introduced since the preceding official version 4.0. This section lists major additions and gives a partial list of changes and minor new features. For a more exhaustive list, see the NEWS file. Histograms, or bar charts, can be produced. See `histograms`. In coordination with the new `datastrings` feature described below, gnuplot can draw a label at each vertex of a curve. See `labels`. The `image` and `rgbimage` styles allow to plot 2D images (from ascii or `binary` files) and map them in a 2D or 3D plot. See `image` and `rgbimage`. The plot style `fillstyle` has been augmented to allow to fill the area between two input curves with a color or a pattern. See `filledcurves`. Gnuplot can draw plots with vectors with a small arrowhead, requiring four or six columns of data for 2D or 3D, respectively. See `vectors`. Gnuplot can now read a generic `binary` input, including matrix binary and `general binary` (until now gnuplot supported only its own `binary matrix` format). Several matrix file formats are autodetected (`gpbin`, `edf`, `avs`). Binary data files are mainly useful for `image` and `rgbimage` drawings. See `binary` and `binary general filetype`. Explicit RGB colors can be specified for all plot elements instead of specifying a predefined linetype. See `colorspec`. You can place rectangles with desired fill style and border anywhere in a 2D plot. See `set object rectangle`. Gnuplot can now read and process text fields in datafiles. See `datastrings`. String variables and string functions are introduced. Most gnuplot commands that previously required a string constant will now also accept a string variable, a string expression, or a function that returns a string. See `string variables`. Gnuplot supports command line macro expansion by '@stringvariablename'. See `macros`. The `multiplot` mode is now able to layout automatically simple multiplots without having to set the size or the position for each plot. See `multiplot`. Gnuplot now exports several "read-only" variables such as GPVAL_TERM, GPVAL_X_MIN, etc. See `gnuplot-defined variables`. The `wxt` terminal is an interactive and cross-platform terminal for on-screen rendering. It uses the wxWidgets library for its user interface, and Cairo associated with Pango for the actual rendering, providing nice plots with antialiasing on lines and text. The terminal supports the full range of gnuplot capabilities, including mousing, pm3d plots, image plots and enhanced text. The `emf` terminal generates an Enhanced Metafile Format file. This file format is the metafile standard on MS Win32 Systems. The code for the terminals using the `gd` library has been consolidated. The `gif` terminal also knows how to produce an animated gif from a sequence of plots. The `postscript` terminal can load prologue files, which can contain additional user-defined sections with, for example, character encodings. See `postscript prologue`. The Adobe Illustrator `ai` driver is outdated. Since Adobe Illustrator understands PostScript files, `set terminal post level1 ...` should be used instead. The terminals supporting an output to latex augmented by PostScript commands have been consolidated. Many options are the same as in the `postscript` terminal. The `windows` terminal now supports the `enhanced text` mode. ?canvas size ?canvas ?set term size In earlier versions of gnuplot, some terminal types (but not all) used the values from `set size` to control also the size of the output canvas. This behaviour is now deprecated. In future versions of gnuplot the options 'set size' and 'set term size' will have complementary effects: `set term size , ` controls the size of the output file, or "canvas". Please see individual terminal documentation for allowed values of the size parameters. By default, the plot will fill this canvas. `set size , ` scales the plot itself relative to the size of the canvas. Scale values less than 1 will cause the plot to not fill the entire canvas. Scale values larger than 1 will cause only a portion of the plot to fit on the canvas. Please be aware that setting scale values larger than 1 may cause problems on some terminal types. Example: set term pbm size 600, 400 set size 0.5, 0.5 set output "figure.pbm" plot "data" with lines These commands will produce an output file "figure.pbm" that is 600 pixels wide and 400 pixels tall. The plot will fill the lower left quarter of this canvas. This is consistent with the way multiplot mode has always worked, however it is a change in the way some drivers worked for single plots in version 4.0. Most terminal drivers in 4.2 follow the new convention. However the behaviour of the png/jpeg/gif driver is under the control of a configuration option. See `backwards compatibility`. ?backwards compatibility ?compatibility Gnuplot version 4.0 deprecated certain syntax used in earlier versions, but continued to recognize it. Version 4.2 also accepts the deprecated syntax by default, but this is now under the control of a configuration option, and can be disabled as follows: ./configure --disable-backwards-compatibility Notice: Deprecated syntax items may be disabled permanently in future versions. One major difference is the introduction of required keywords to disambiguate complicated commands. A notable issue was the use of bare numbers to specify offsets, line and point types. Illustrative examples: Deprecated: set data linespoints plot 2 4 New: set style data linespoints plot linetype 2 pointtype 4 Another major compatibility issue is the interaction of the commands `set size` and `set term size`. In earlier versions of gnuplot the behaviour of various terminal types with respect to `set size` was very inconsistent. In the future, all terminals will behave the same way. In version 4.2 most terminals follow the new convention (`set size` has no effect on the output canvas size). However, the png/gif/jpeg terminal still follows the older, deprecated behaviour unless you have configured with `--disable-backwards-compatibility`. In the next version of gnuplot all terminal types will follow the new convention. You are strongly advised not to use `set size` to control the size in pixels of png/gif/jpeg output files. Instead use `set term png size ,`. Please see `set size`, `set term size` and the documentation for individual terminals. ?version 4 features Gnuplot version 4.0 contained many features introduced since the preceding official version 3.7. These are summarized here. Interaction with the current plot via mouse and hotkeys is supported for the X11, OS/2 Presentation Manager, ggi, Windows, and wxWidgets terminals. See `mouse input` for more information on mousing. See help for `bind` for information on hotkeys. Also see the documentation for individual mousing terminals `ggi`, `pm`, `windows`, `wxt` and `x11`. Sample script: mousevariables.dem `aqua`: New terminal for Mac OS X. Requires AquaTerm 1.0 or later. `epslatex`: New terminal. Prepares eps figures for inclusion in LaTeX documents. `gif`: Consolidated with png/jpeg terminals. Requires libgd. `ggi`: New full-screen interactive terminal for Linux. Interface to the General Graphics Interface Library. `pdf`: New terminal exporting Adobe Portable Document Format. Requires libpdf. `png` and `jpeg`: Support for GIF, PNG and JPEG image output is provided by a new driver via libgd. The new driver supports many more features than the old png driver, including TrueType fonts. Requires libgd. `svg`: New terminal exporting Scalable Vector Graphics. The `splot` command is now capable of plotting 2D maps and 3D surfaces colored by greyscale or color palettes. See help for `set pm3d`, `set palette`, `set cbrange`, `set view map`, `set colorbox` and `test palette`. Sample scripts: pm3d.dem pm3dcolors.dem pm3dgamma.dem A solid color or patterned fill style can be set for any plot style that contains boxes. See `boxes`, `boxerrorbars`, `boxxyerrorbars`, `candlesticks`, `set style fill`. Sample scripts: fillstyle.dem candlesticks.dem Input data can be filtered through several built-in routines for interpolation or approximation of data. See `smooth`, `frequency`, `unique`. Sample scripts: step.dem mgr.dem Most gnuplot plot commands that produce text labels now accept modifiers to specify text color, font, size, and rotation angle. See `set label`. Not all terminal types support these options, however. The enhanced text mode previously available for the postscript and pm terminals has been extended to other terminal types as well. Terminal types currently supported include aqua, dumb, jpeg, pdf, pm, png, postscript, x11, windows, and wxt. See `enhanced text`. Sample scripts: textcolor.dem textrotate.dem Several terminals, including `postscript`, `x11` and `pm`, support additional text `encodings`: ISO 8859-1 (Latin 1), ISO 8859-2 (Latin 2), ISO 8859-15 (variant of 8859-1 with Euro sign), KOI8-R and KOI8-U (cyrillic), and miscellaneous codepages. See `encoding` for more details. Single- or double-ended arrows can be placed on a plot individually from the command line or from a data file via the `plot with vectors` style. See `set style arrow`, `plotting styles vectors`. Sample scripts: arrowstyle.dem vector.dem The new `set datafile` command can be used to specify information about the format of input data files, including the characters used to separate fields, to indicate comment lines, and to specify missing data. Gnuplot now attempts to recognize text fields with embedded blanks as single entities based on the datafile format settings. This allows input from csv (comma-separated value) files such as those exported by spreadsheet programs. See `set datafile`. See also the `binary` option (introduced in 4.2). `set view map` selects a top-view 2D projection of 3D surface plot. `set term push` and `set term pop` save and restore the current terminal type. `load` and `save` commands accept piped input and output, respectively. Since gnuplot 4.0, `unset ` is preferred to `set no`. The older form has been deprecated. Version 4.2 continues to allow the older syntax, but such backwards compatibility may be lost in future versions. Commands of the form `set