[BACK]Return to gnuplot.doc CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot / docs

Annotation of OpenXM_contrib/gnuplot/docs/gnuplot.doc, Revision 1.1.1.2

1.1.1.2 ! maekawa     1: C RCS $Id: gnuplot.doc,v 1.20.2.3 1999/10/27 10:10:16 lhecking Exp $
1.1       maekawa     2: C 3 December 1998
                      3: C Copyright (C) 1986 - 1993, 1998   Thomas Williams, Colin Kelley
                      4: C
                      5: ^ <h2> An Interactive Plotting Program </h2><p>
                      6: ^ <h2>  Thomas Williams & Colin Kelley</h2><p>
                      7: ^ <h2>   Version 3.7 organized by: David Denholm </h2><p>
                      8: ^ <h2>Major contributors (alphabetic order):</h2>
                      9: ^<ul><h3>
                     10: ^<li>  Hans-Bernhard Broeker
                     11: ^<li>  John Campbell
                     12: ^<li>  Robert Cunningham
                     13: ^<li>  David Denholm
                     14: ^<li>  Gershon Elber
                     15: ^<li>  Roger Fearick
                     16: ^<li>  Carsten Grammes
                     17: ^<li>  Lucas Hart
                     18: ^<li>  Lars Hecking
                     19: ^<li>  Thomas Koenig
                     20: ^<li>  David Kotz
                     21: ^<li>  Ed Kubaitis
                     22: ^<li>  Russell Lang
                     23: ^<li>  Alexander Lehmann
                     24: ^<li>  Alexander Mai
                     25: ^<li>  Carsten Steger
                     26: ^<li>  Tom Tkacik
                     27: ^<li>  Jos Van der Woude
                     28: ^<li>  James R. Van Zandt
                     29: ^<li>  Alex Woo
                     30: ^</h3></ul> <p>
                     31: ^<h2>  Copyright (C) 1986 - 1993, 1998   Thomas Williams, Colin Kelley<p>
                     32: ^   Mailing list for comments: info-gnuplot@dartmouth.edu <p>
                     33: ^   Mailing list for bug reports: bug-gnuplot@dartmouth.edu<p>
                     34: ^</h2><p>
                     35: ^<h3> This manual was prepared by Dick Crawford</h3><p>
                     36: ^<h3> 3 December 1998</h3><p>
                     37: ^<hr>
                     38: 1 gnuplot
                     39: 2 Copyright
                     40: ?copyright
                     41: ?license
                     42:        Copyright (C) 1986 - 1993, 1998   Thomas Williams, Colin Kelley
                     43:
                     44:  Permission to use, copy, and distribute this software and its
                     45:  documentation for any purpose with or without fee is hereby granted,
                     46:  provided that the above copyright notice appear in all copies and
                     47:  that both that copyright notice and this permission notice appear
                     48:  in supporting documentation.
                     49:
                     50:  Permission to modify the software is granted, but not the right to
                     51:  distribute the complete modified source code.  Modifications are to
                     52:  be distributed as patches to the released version.  Permission to
                     53:  distribute binaries produced by compiling modified sources is granted,
                     54:  provided you
                     55:    1. distribute the corresponding source modifications from the
                     56:     released version in the form of a patch file along with the binaries,
                     57:    2. add special version identification to distinguish your version
                     58:     in addition to the base release version number,
                     59:    3. provide your name and address as the primary contact for the
                     60:     support of your modified version, and
                     61:    4. retain our contact information in regard to use of the base
                     62:     software.
                     63:  Permission to distribute the released version of the source code along
                     64:  with corresponding source modifications in the form of a patch file is
                     65:  granted with same provisions 2 through 4 for binary distributions.
                     66:
                     67:  This software is provided "as is" without express or implied warranty
                     68:  to the extent permitted by applicable law.
                     69:
                     70:
                     71:        AUTHORS
                     72:
                     73:        Original Software:
                     74:           Thomas Williams,  Colin Kelley.
                     75:
                     76:        Gnuplot 2.0 additions:
                     77:           Russell Lang, Dave Kotz, John Campbell.
                     78:
                     79:        Gnuplot 3.0 additions:
                     80:           Gershon Elber and many others.
                     81: 2 Introduction
                     82: ?introduction
                     83: ?
                     84:  `gnuplot` is a command-driven interactive function and data plotting program.
                     85:  It is case sensitive (commands and function names written in lowercase are
                     86:  not the same as those written in CAPS).  All command names may be abbreviated
                     87:  as long as the abbreviation is not ambiguous.  Any number of commands may
                     88:  appear on a line (with the exception that `load` or `call` must be the final
                     89:  command), separated by semicolons (;).  Strings are indicated with quotes.
                     90:  They may be either single or double quotation marks, e.g.,
                     91:
                     92:        load "filename"
                     93:        cd 'dir'
                     94:
                     95:  although there are some subtle differences (see `syntax` for more details).
                     96:
                     97:  Any command-line arguments are assumed to be names of files containing
                     98:  `gnuplot` commands, with the exception of standard X11 arguments, which are
                     99:  processed first.  Each file is loaded with the `load` command, in the order
                    100:  specified.  `gnuplot` exits after the last file is processed.  When no load
                    101:  files are named, `gnuplot` enters into an interactive mode.  The special
                    102:  filename "-" is used to denote standard input.  See "help batch/interactive"
                    103:  for more details.
                    104:
                    105:  Many `gnuplot` commands have multiple options.  These options must appear in
                    106:  the proper order, although unwanted ones may be omitted in most cases.  Thus
                    107:  if the entire command is "command a b c", then "command a c" will probably
                    108:  work, but "command c a" will fail.
                    109:
                    110:  Commands may extend over several input lines by ending each line but the last
                    111:  with a backslash (\).  The backslash must be the _last_ character on each
                    112:  line.  The effect is as if the backslash and newline were not there.  That
                    113:  is, no white space is implied, nor is a comment terminated.  Therefore,
                    114:  commenting out a continued line comments out the entire command (see
                    115:  `comment`).  But note that if an error occurs somewhere on a multi-line
                    116:  command, the parser may not be able to locate precisely where the error is
                    117:  and in that case will not necessarily point to the correct line.
                    118:
                    119:  In this document, curly braces ({}) denote optional arguments and a vertical
                    120:  bar (|) separates mutually exclusive choices.  `gnuplot` keywords or `help`
                    121:  topics are indicated by backquotes or `boldface` (where available).  Angle
                    122:  brackets (<>) are used to mark replaceable tokens.  In many cases, a default
                    123:  value of the token will be taken for optional arguments if the token is
                    124:  omitted, but these cases are not always denoted with braces around the angle
                    125:  brackets.
                    126:
                    127:  For on-line help on any topic, type `help` followed by the name of the topic
                    128:  or just `help` or `?` to get a menu of available topics.
                    129:
                    130:  The new `gnuplot` user should begin by reading about `plotting` (if on-line,
                    131:  type `help plotting`).
1.1.1.2 ! maekawa   132: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/simple.html"> Simple Plots Demo </a>
1.1       maekawa   133: 2 Seeking-assistance
                    134: ?seeking-assistance
                    135:  There is a mailing list for `gnuplot` users.  Note, however, that the
                    136:  newsgroup
                    137:        comp.graphics.apps.gnuplot
                    138:  is identical to the mailing list (they both carry the same set of messages).
                    139:  We prefer that you read the messages through the newsgroup rather than
                    140:  subscribing to the mailing list.  Administrative requests should be sent to
                    141:        majordomo@dartmouth.edu
                    142:  Send a message with the body (not the subject) consisting of the single word
                    143:  "help" (without the quotes) for more details.
                    144:
                    145:  The address for mailing to list members is:
                    146:        info-gnuplot@dartmouth.edu
                    147:
                    148:  Bug reports and code contributions should be mailed to:
                    149:        bug-gnuplot@dartmouth.edu
                    150:
                    151:  The list of those interested in beta-test versions is:
                    152:        info-gnuplot-beta@dartmouth.edu
                    153:
                    154:  There is also a World Wide Web page with up-to-date information, including
                    155:  known bugs:
                    156: ^ <a href="http://www.cs.dartmouth.edu/gnuplot_info.html">
                    157:        http://www.cs.dartmouth.edu/gnuplot_info.html
                    158: ^ </a>
                    159:
                    160:  Before seeking help, please check the
1.1.1.2 ! maekawa   161: ^ <a href="http://www.ucc.ie/gnuplot/gnuplot-faq.html">
1.1       maekawa   162:  FAQ (Frequently Asked Questions) list.
                    163: ^ </a>
                    164:  If you do not have a copy of the FAQ, you may request a copy by email from
                    165:  the Majordomo address above, ftp a copy from
1.1.1.2 ! maekawa   166:        ftp://ftp.ucc.ie/pub/gnuplot/faq,
        !           167:        ftp://ftp.gnuplot.vt.edu/pub/gnuplot/faq,
1.1       maekawa   168:  or see the WWW `gnuplot` page.
                    169:
                    170:  When posting a question, please include full details of the version of
                    171:  `gnuplot`, the machine, and operating system you are using.  A _small_ script
                    172:  demonstrating the problem may be useful.  Function plots are preferable to
                    173:  datafile plots.  If email-ing to info-gnuplot, please state whether or not
                    174:  you are subscribed to the list, so that users who use news will know to email
                    175:  a reply to you.  There is a form for such postings on the WWW site.
                    176: 2 What's New in version 3.7
                    177: ?new-features
                    178:  Gnuplot version 3.7 contains many new features.  This section gives a partial
                    179:  list and links to the new items in no particular order.
                    180:
                    181:  1. `fit f(x) 'file' via` uses the Marquardt-Levenberg method to fit data.
                    182:  (This is only slightly different from the `gnufit` patch available for 3.5.)
                    183:
                    184:  2. Greatly expanded `using` command.  See `plot using`.
                    185:
                    186:  3. `set timefmt` allows for the use of dates as input and output for time
                    187:  series plots.  See `Time/Date data` and
1.1.1.2 ! maekawa   188: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/timedat.html">
1.1       maekawa   189:  timedat.dem.
                    190: ^ </a>
                    191:
                    192:  4. Multiline labels and font selection in some drivers.
                    193:
                    194:  5. Minor (unlabeled) tics.  See `set mxtics`.
                    195:
                    196:  6. `key` options for moving the key box in the page (and even outside of the
                    197:  plot), putting a title on it and a box around it, and more.  See `set key`.
                    198:
                    199:  7. Multiplots on a single logical page with `set multiplot`.
                    200:
                    201:  8. Enhanced `postscript` driver with super/subscripts and font changes.
                    202:  (This was a separate driver (`enhpost`) that was available as a patch for
                    203:  3.5.)
                    204:
                    205:  9. Second axes:  use the top and right axes independently of the bottom and
                    206:  left, both for plotting and labels.  See `plot`.
                    207:
                    208:  10. Special datafile names `'-'` and `""`.  See `plot special-filenames`.
                    209:
                    210:  11. Additional coordinate systems for labels and arrows.  See `coordinates`.
                    211:
                    212:  12. `set size` can try to plot with a specified aspect ratio.
                    213:
                    214:  13. `set missing` now treats missing data correctly.
                    215:
                    216:  14. The `call` command: `load` with arguments.
                    217:
                    218:  15. More flexible `range` commands with `reverse` and `writeback` keywords.
                    219:
                    220:  16. `set encoding` for multi-lingual encoding.
                    221:
                    222:  17. New `x11` driver with persistent and multiple windows.
                    223:
                    224:  18. New plotting styles: `xerrorbars`, `histeps`, `financebars` and more.
                    225:  See `set style`.
                    226:
                    227:  19. New tic label formats, including `"%l %L"` which uses the mantissa and
                    228:  exponents to a given base for labels.  See `set format`.
                    229:
                    230:  20. New drivers, including `cgm` for inclusion into MS-Office applications
                    231:  and `gif` for serving plots to the WEB.
                    232:
                    233:  21. Smoothing and spline-fitting options for `plot`.  See `plot smooth`.
                    234:
                    235:  22. `set margin` and `set origin` give much better control over where a
                    236:  graph appears on the page.
                    237:
                    238:  23. `set border` now controls each border individually.
                    239:
                    240:  24. The new commands `if` and `reread` allow command loops.
                    241:
                    242:  25. Point styles and sizes, line types and widths can be specified on the
                    243:  `plot` command.  Line types and widths can also be specified for grids,
                    244:  borders, tics and arrows.  See `plot with`.  Furthermore these types may be
                    245:  combined and stored for further use.  See `set linestyle`.
                    246:
                    247:  26. Text (labels, tic labels, and the time stamp) can be written vertically
                    248:  by those terminals capable of doing so.
                    249: 2 Batch/Interactive Operation
                    250: ?batch/interactive
                    251:  `gnuplot` may be executed in either batch or interactive modes, and the two
                    252:  may even be mixed together on many systems.
                    253:
                    254:  Any command-line arguments are assumed to be names of files containing
                    255:  `gnuplot` commands (with the exception of standard X11 arguments, which are
                    256:  processed first).  Each file is loaded with the `load` command, in the order
                    257:  specified.  `gnuplot` exits after the last file is processed.  When no load
                    258:  files are named, `gnuplot` enters into an interactive mode.  The special
                    259:  filename "-" is used to denote standard input.
                    260:
                    261:  Both the `exit` and `quit` commands terminate the current command file and
                    262:  `load` the next one, until all have been processed.
                    263:
                    264:  Examples:
                    265:
                    266:  To launch an interactive session:
                    267:        gnuplot
                    268:
                    269:  To launch a batch session using two command files "input1" and "input2":
                    270:        gnuplot input1 input2
                    271:
                    272:  To launch an interactive session after an initialization file "header" and
                    273:  followed by another command file "trailer":
                    274:        gnuplot header - trailer
                    275: 2 Command-line-editing
                    276: ?line-editing
                    277: ?editing
                    278: ?history
                    279: ?command-line-editing
                    280:  Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2
                    281:  versions of `gnuplot`.  Also, a history mechanism allows previous commands to
                    282:  be edited and re-executed.  After the command line has been edited, a newline
                    283:  or carriage return will enter the entire line without regard to where the
                    284:  cursor is positioned.
                    285:
                    286:  (The readline function in `gnuplot` is not the same as the readline used in
                    287:  GNU Bash and GNU Emacs.  If the GNU version is desired, it may be selected
                    288:  instead of the `gnuplot` version at compile time.)
                    289:
                    290:
                    291:  The editing commands are as follows:
                    292:
                    293: @start table - first is interactive cleartext form
                    294:        `Line-editing`:
                    295:
                    296:        ^B    moves back a single character.
                    297:        ^F    moves forward a single character.
                    298:        ^A    moves to the beginning of the line.
                    299:        ^E    moves to the end of the line.
                    300:        ^H    and DEL delete the previous character.
                    301:        ^D    deletes the current character.
                    302:        ^K    deletes from current position to the end of line.
                    303:        ^L,^R redraws line in case it gets trashed.
                    304:        ^U    deletes the entire line.
                    305:        ^W    deletes the last word.
                    306:
                    307:        `History`:
                    308:
                    309:        ^P    moves back through history.
                    310:        ^N    moves forward through history.
                    311: #\begin{tabular}{|cl|} \hline
                    312: #\multicolumn{2}{|c|}{Command-line Editing Commands} \\ \hline \hline
                    313: #Character & Function \\ \hline
                    314: # & \multicolumn{1}{|c|}{Line Editing}\\ \cline{2-2}
                    315: #\verb~^B~ & move back a single character.\\
                    316: #\verb~^F~ & move forward a single character.\\
                    317: #\verb~^A~ & move to the beginning of the line.\\
                    318: #\verb~^E~ & move to the end of the line.\\
                    319: #\verb~^H, DEL~ & delete the previous character.\\
                    320: #\verb~^D~ & delete the current character.\\
                    321: #\verb~^K~ & delete from current position to the end of line.\\
                    322: #\verb~^L, ^R~ & redraw line in case it gets trashed.\\
                    323: #\verb~^U~ & delete the entire line. \\
                    324: #\verb~^W~ & delete from the current word to the end of line. \\ \hline
                    325: # & \multicolumn{1}{|c|}{History} \\ \cline{2-2}
                    326: #\verb~^P~ & move back through history.\\
                    327: #\verb~^N~ & move forward through history.\\
                    328: %c l .
                    329: %Character@Function
                    330: %_
                    331: %@Line Editing
                    332: %^B@move back a single character.
                    333: %^F@move forward a single character.
                    334: %^A@move to the beginning of the line.
                    335: %^E@move to the end of the line.
                    336: %^H, DEL@delete the previous character.
                    337: %^D@delete the current character.
                    338: %^K@delete from current position to the end of line.
                    339: %^L, ^R@redraw line in case it gets trashed.
                    340: %^U@delete the entire line.
                    341: %^W@delete from the current word to the end of line.
                    342: %_
                    343: %@History
                    344: %^P@move back through history.
                    345: %^N@move forward through history.
                    346: @end table
                    347:
                    348:  On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired
                    349:  for line editing.  The default makefile assumes that this is the case;  by
                    350:  default `gnuplot` will be compiled with no line-editing capability.  If you
                    351:  want to use `gnuplot`'s line editing, set READLINE in the makefile and add
                    352:  readline.obj to the link file.  The following arrow keys may be used on the
                    353:  IBM PC and Atari versions if readline is used:
                    354:
                    355: @start table - first is interactive cleartext form
                    356:        Left  Arrow      - same as ^B.
                    357:        Right Arrow      - same as ^F.
                    358:        Ctrl Left  Arrow - same as ^A.
                    359:        Ctrl Right Arrow - same as ^E.
                    360:        Up    Arrow      - same as ^P.
                    361:        Down  Arrow      - same as ^N.
                    362: #\begin{tabular}{|cl|} \hline
                    363: #Arrow key  & Function \\ \hline
                    364: #Left       & same as \verb~^B~. \\
                    365: #Right      & same as \verb~^F~. \\
                    366: #Ctrl Left  & same as \verb~^A~. \\
                    367: #Ctrl Right & same as \verb~^E~. \\
                    368: #Up         & same as \verb~^P~. \\
                    369: #Down       & same as \verb~^N~. \\
                    370: %c l .
                    371: %Arrow key@Function
                    372: %_
                    373: %Left Arrow@same as ^B.
                    374: %Right Arrow@same as ^F.
                    375: %Ctrl Left Arrow@same as ^A.
                    376: %Ctrl Right Arrow@same as ^E.
                    377: %Up Arrow@same as ^P.
                    378: %Down Arrow@same as ^N.
                    379: %_
                    380: @end table
                    381:
                    382:  The Atari version of readline defines some additional key aliases:
                    383:
                    384: @start table - first is interactive cleartext form
                    385:        Undo            - same as ^L.
                    386:        Home            - same as ^A.
                    387:        Ctrl Home       - same as ^E.
                    388:        Esc             - same as ^U.
                    389:        Help            - `help` plus return.
                    390:        Ctrl Help       - `help `.
                    391: #\begin{tabular}{|cl|} \hline
                    392: #Arrow key & Function \\ \hline
                    393: #Undo      & same as \verb~^L~. \\
                    394: #Home      & same as \verb~^A~. \\
                    395: #Ctrl Home & same as \verb~^E~. \\
                    396: #Esc       & same as \verb~^U~. \\
                    397: #Help      & `{\bf help}' plus return. \\
                    398: #Ctrl Help & `{\bf help }'. \\
                    399: %c l .
                    400: %Arrow key@Function
                    401: %_
                    402: %Undo@same as ^L.
                    403: %Home@same as ^A.
                    404: %Ctrl Home@same as ^E.
                    405: %Esc@same as ^U.
                    406: %Help@help plus return.
                    407: %Ctrl Help@help .
                    408: %_
                    409: @end table
                    410: 2 Comments
                    411: ?comments
                    412:  Comments are supported as follows: a `#` may appear in most places in a line
                    413:  and `gnuplot` will ignore the rest of the line.  It will not have this effect
                    414:  inside quotes, inside numbers (including complex numbers), inside command
                    415:  substitutions, etc.  In short, it works anywhere it makes sense to work.
                    416: 2 Coordinates
                    417: ?coordinates
                    418:  The commands `set arrow`, `set key`, and `set label` allow you to draw
                    419:  something at an arbitrary position on the graph.  This position is specified
                    420:  by the syntax:
                    421:
                    422:        {<system>} <x>, {<system>} <y> {,{<system>} <z>}
                    423:
                    424:  Each <system> can either be `first`, `second`, `graph` or `screen`.
                    425:
                    426:  `first` places the x, y, or z coordinate in the system defined by the left
                    427:  and bottom axes; `second` places it in the system defined by the second axes
                    428:  (top and right); `graph` specifies the area within the axes---0,0 is bottom
                    429:  left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area;
                    430:  use negative z to get to the base---see `set ticslevel`); and `screen`
                    431:  specifies the screen area (the entire area---not just the portion selected by
                    432:  `set size`), with 0,0 at bottom left and 1,1 at top right.
                    433:
                    434:  If the coordinate system for x is not specified, `first` is used.  If the
                    435:  system for y is not specified, the one used for x is adopted.
                    436:
                    437:  If one (or more) axis is timeseries, the appropriate coordinate should
                    438:  be given as a quoted time string according to the `timefmt` format string.
                    439:  See `set xdata` and `set timefmt`.  `gnuplot` will also accept an integer
                    440:  expression, which will be interpreted as seconds from 1 January 2000.
                    441: 2 Environment
                    442: ?environment
                    443:  A number of shell environment variables are understood by `gnuplot`.  None of
                    444:  these are required, but may be useful.
                    445:
                    446:  If GNUTERM is defined, it is used as the name of the terminal type to be
                    447:  used.  This overrides any terminal type sensed by `gnuplot` on start-up, but
                    448:  is itself overridden by the .gnuplot (or equivalent) start-up file (see
                    449:  `start-up`) and, of course, by later explicit changes.
                    450:
                    451:  On Unix, AmigaOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined to be the
                    452:  pathname of the HELP file (gnuplot.gih).
                    453:
                    454:  On VMS, the logical name GNUPLOT$HELP should be defined as the name of the
                    455:  help library for `gnuplot`.  The `gnuplot` help can be put inside any system
                    456:  help library, allowing access to help from both within and outside `gnuplot`
                    457:  if desired.
                    458:
                    459:  On Unix, HOME is used as the name of a directory to search for a .gnuplot
                    460:  file if none is found in the current directory.  On AmigaOS, AtariTOS,
                    461:  MS-DOS and OS/2, gnuplot is used.  On VMS, SYS$LOGIN: is used. See `help
                    462:  start-up`.
                    463:
                    464:  On Unix, PAGER is used as an output filter for help messages.
                    465:
                    466:  On Unix, AtariTOS and AmigaOS, SHELL is used for the `shell` command.  On
                    467:  MS-DOS and OS/2, COMSPEC is used for the `shell` command.
                    468:
                    469:  On MS-DOS, if the BGI or Watcom interface is used, PCTRM is used to tell
                    470:  the maximum resolution supported by your monitor by setting it to
                    471:  S<max. horizontal resolution>. E.g. if your monitor's maximum resolution is
                    472:  800x600, then use:
                    473:        set PCTRM=S800
                    474:  If PCTRM is not set, standard VGA is used.
                    475:
                    476:  FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a
                    477:  fit is interrupted---see `fit`.  FIT_LOG specifies the filename of the
                    478:  logfile maintained by fit.
                    479: 2 Expressions
                    480: ?expressions
                    481:  In general, any mathematical expression accepted by C, FORTRAN, Pascal, or
                    482:  BASIC is valid.  The precedence of these operators is determined by the
                    483:  specifications of the C programming language.  White space (spaces and tabs)
                    484:  is ignored inside expressions.
                    485:
                    486:  Complex constants are expressed as {<real>,<imag>}, where <real> and <imag>
                    487:  must be numerical constants.  For example, {3,2} represents 3 + 2i; {0,1}
                    488:  represents 'i' itself.  The curly braces are explicitly required here.
                    489:
                    490:  Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and
                    491:  C.  Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1",
                    492:  3.5e-1, etc.  The most important difference between the two forms is in
                    493:  division: division of integers truncates: 5/2 = 2; division of reals does
                    494:  not: 5.0/2.0 = 2.5.  In mixed expressions, integers are "promoted" to reals
                    495:  before evaluation: 5/2e0 = 2.5.  The result of division of a negative integer
                    496:  by a positive one may vary among compilers.  Try a test like "print -5/2" to
                    497:  determine if your system chooses -2 or -3 as the answer.
                    498:
                    499:  The integer expression "1/0" may be used to generate an "undefined" flag,
                    500:  which causes a point to ignored; the `ternary` operator gives an example.
                    501:
                    502:  The real and imaginary parts of complex expressions are always real, whatever
                    503:  the form in which they are entered: in {3,2} the "3" and "2" are reals, not
                    504:  integers.
                    505: 3 Functions
                    506: ?expressions functions
                    507: ?functions
                    508:  The functions in `gnuplot` are the same as the corresponding functions in
                    509:  the Unix math library, except that all functions accept integer, real, and
                    510:  complex arguments, unless otherwise noted.
                    511:
                    512:  For those functions that accept or return angles that may be given in either
                    513:  degrees or radians (sin(x), cos(x), tan(x), asin(x), acos(x), atan(x),
                    514:  atan2(x) and arg(z)), the unit may be selected by `set angles`, which
                    515:  defaults to radians.
                    516:
                    517: @start table
                    518: #\begin{tabular}{|ccl|} \hline
                    519: #\multicolumn{3}{|c|}{Math library functions} \\ \hline \hline
                    520: #Function & Arguments & Returns \\ \hline
                    521: %c c l .
                    522: %Function@Arguments@Returns
                    523: %_
                    524: 4 abs
                    525: ?expressions functions abs
                    526: ?functions abs
                    527: ?abs
                    528: #abs(x) & any  &  absolute value of $x$, $|x|$; same type \\
                    529: #abs(x) & complex &  length of $x$, $\sqrt{{\mbox{real}(x)^{2} +
                    530: #\mbox{imag}(x)^{2}}}$ \\
                    531: %abs(x)@any@absolute value of $x$, $|x|$; same type
                    532: %abs(x)@complex@length of $x$, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$
1.1.1.2 ! maekawa   533:  The `abs(x)` function returns the absolute value of its argument.  The
        !           534:  returned value is of the same type as the argument.
1.1       maekawa   535:
                    536:  For complex arguments, abs(x) is defined as the length of x in the complex
                    537:  plane [i.e.,  sqrt(real(x)**2 + imag(x)**2) ].
                    538: 4 acos
                    539: ?expressions functions acos
                    540: ?functions acos
                    541: ?acos
                    542: #acos(x) & any  & $\cos^{-1} x$ (inverse cosine) \\
                    543: %acos(x)@any@$cos sup -1 x$ (inverse cosine)
1.1.1.2 ! maekawa   544:  The `acos(x)` function returns the arc cosine (inverse cosine) of its
        !           545:  argument.  `acos` returns its argument in radians or degrees, as selected by
        !           546:  `set angles`.
1.1       maekawa   547: 4 acosh
                    548: ?expressions functions acosh
                    549: ?functions acosh
                    550: ?acosh
                    551: #acosh(x) & any  & $\cosh^{-1} x$ (inverse hyperbolic cosine) in radians \\
                    552: %acosh(x)@any@$cosh sup -1 x$ (inverse hyperbolic cosine) in radians
1.1.1.2 ! maekawa   553:  The `acosh(x)` function returns the inverse hyperbolic cosine of its argument
        !           554:  in radians.
1.1       maekawa   555: 4 arg
                    556: ?expressions functions arg
                    557: ?functions arg
                    558: ?arg
                    559: #arg(x) & complex & the phase of $x$ \\
                    560: %arg(x)@complex@the phase of $x$
1.1.1.2 ! maekawa   561:  The `arg(x)` function returns the phase of a complex number in radians or
1.1       maekawa   562:  degrees, as selected by `set angles`.
                    563: 4 asin
                    564: ?expressions functions asin
                    565: ?functions asin
                    566: ?asin
                    567: #asin(x) & any  & $\sin^{-1} x$ (inverse sin) \\
                    568: %asin(x)@any@$sin sup -1 x$ (inverse sin)
1.1.1.2 ! maekawa   569:  The `asin(x)` function returns the arc sin (inverse sin) of its argument.
1.1       maekawa   570:  `asin` returns its argument in radians or degrees, as selected by `set
                    571:  angles`.
                    572: 4 asinh
                    573: ?expressions functions asinh
                    574: ?functions asinh
                    575: ?asinh
                    576: #asinh(x) & any  & $\sinh^{-1} x$ (inverse hyperbolic sin) in radians \\
                    577: %asinh(x)@any@$sinh sup -1 x$ (inverse hyperbolic sin) in radians
1.1.1.2 ! maekawa   578:  The `asinh(x)` function returns the inverse hyperbolic sin of its argument in
1.1       maekawa   579:  radians.
                    580: 4 atan
                    581: ?expressions functions atan
                    582: ?functions atan
                    583: ?atan
                    584: #atan(x) & any  & $\tan^{-1} x$ (inverse tangent) \\
                    585: %atan(x)@any@$tan sup -1 x$ (inverse tangent)
1.1.1.2 ! maekawa   586:  The `atan(x)` function returns the arc tangent (inverse tangent) of its
1.1       maekawa   587:  argument.  `atan` returns its argument in radians or degrees, as selected by
                    588:  `set angles`.
                    589: 4 atan2
                    590: ?expressions functions atan2
                    591: ?functions atan2
                    592: ?atan2
                    593: #atan2(y,x) & int or real & $\tan^{-1} (y/x)$ (inverse tangent) \\
                    594: %atan2(y,x)@int or real@$tan sup -1 (y/x)$ (inverse tangent)
1.1.1.2 ! maekawa   595:  The `atan2(y,x)` function returns the arc tangent (inverse tangent) of the
        !           596:  ratio of the real parts of its arguments.  `atan2` returns its argument in
        !           597:  radians or degrees, as selected by `set angles`, in the correct quadrant.
1.1       maekawa   598: 4 atanh
                    599: ?expressions functions atanh
                    600: ?functions atanh
1.1.1.2 ! maekawa   601: ?atanh
1.1       maekawa   602: #atanh(x) & any  & $\tanh^{-1} x$ (inverse hyperbolic tangent) in radians \\
                    603: %atanh(x)@any@$tanh sup -1 x$ (inverse hyperbolic tangent) in radians
1.1.1.2 ! maekawa   604:  The `atanh(x)` function returns the inverse hyperbolic tangent of its
        !           605:  argument in radians.
1.1       maekawa   606: 4 besj0
                    607: ?expressions functions besj0
                    608: ?functions besj0
                    609: ?besj0
                    610: #besj0(x) & int or real &  $j_{0}$ Bessel function of $x$, in radians \\
                    611: %besj0(x)@int or real@$j sub 0$ Bessel function of $x$, in radians
1.1.1.2 ! maekawa   612:  The `besj0(x)` function returns the j0th Bessel function of its argument.
1.1       maekawa   613:  `besj0` expects its argument to be in radians.
                    614: 4 besj1
                    615: ?expressions functions besj1
                    616: ?functions besj1
                    617: ?besj1
                    618: #besj1(x) & int or real & $j_{1}$ Bessel function of $x$, in radians \\
                    619: %besj1(x)@int or real@$j sub 1$ Bessel function of $x$, in radians
1.1.1.2 ! maekawa   620:  The `besj1(x)` function returns the j1st Bessel function of its argument.
1.1       maekawa   621:  `besj1` expects its argument to be in radians.
                    622: 4 besy0
                    623: ?expressions functions besy0
                    624: ?functions besy0
                    625: ?besy0
                    626: #besy0(x) & int or real & $y_{0}$ Bessel function of $x$, in radians \\
                    627: %besy0(x)@int or real@$y sub 0$ Bessel function of $x$, in radians
                    628:  The `besy0` function returns the y0th Bessel function of its argument.
                    629:  `besy0` expects its argument to be in radians.
                    630: 4 besy1
                    631: ?expressions functions besy1
                    632: ?functions besy1
                    633: ?besy1
                    634: #besy1(x) & int or real & $y_{1}$ Bessel function of $x$, in radians \\
                    635: %besy1(x)@int or real@$y sub 1$ Bessel function of $x$, in radians
1.1.1.2 ! maekawa   636:  The `besy1(x)` function returns the y1st Bessel function of its argument.
1.1       maekawa   637:  `besy1` expects its argument to be in radians.
                    638: 4 ceil
                    639: ?expressions functions ceil
                    640: ?functions ceil
                    641: ?ceil
                    642: #ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$
                    643: #(real part) \\
                    644: %ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part)
1.1.1.2 ! maekawa   645:  The `ceil(x)` function returns the smallest integer that is not less than its
1.1       maekawa   646:  argument.  For complex numbers, `ceil` returns the smallest integer not less
                    647:  than the real part of its argument.
                    648: 4 cos
                    649: ?expressions functions cos
                    650: ?functions cos
                    651: ?cos
                    652: #cos(x) & any & $\cos x$, cosine of $x$ \\
                    653: %cos(x)@radians@$cos~x$, cosine of $x$
1.1.1.2 ! maekawa   654:  The `cos(x)` function returns the cosine of its argument.  `cos` accepts its
1.1       maekawa   655:  argument in radians or degrees, as selected by `set angles`.
                    656: 4 cosh
                    657: ?expressions functions cosh
                    658: ?functions cosh
                    659: ?cosh
                    660: #cosh(x) & any & $\cosh x$, hyperbolic cosine of $x$ in radians \\
                    661: %cosh(x)@any@$cosh~x$, hyperbolic cosine of $x$ in radians
1.1.1.2 ! maekawa   662:  The `cosh(x)` function returns the hyperbolic cosine of its argument.  `cosh`
1.1       maekawa   663:  expects its argument to be in radians.
                    664: 4 erf
                    665: ?expressions functions erf
                    666: ?functions erf
                    667: ?erf
                    668: #erf(x) & any & $\mbox{erf}(\mbox{real}(x))$,  error function of real($x$) \\
                    669: %erf(x)@any@$erf ( roman real (x))$, error function of real ($x$)
1.1.1.2 ! maekawa   670:  The `erf(x)` function returns the error function of the real part of its
1.1       maekawa   671:  argument.  If the argument is a complex value, the imaginary component is
                    672:  ignored.
                    673: 4 erfc
                    674: ?expressions functions erfc
                    675: ?functions erfc
                    676: ?erfc
                    677: #erfc(x) & any & $\mbox{erfc}(\mbox{real}(x))$,  1.0 - error function of real($x$) \\
                    678: %erfc(x)@any@$erfc ( roman real (x))$, 1.0 - error function of real ($x$)
1.1.1.2 ! maekawa   679:  The `erfc(x)` function returns 1.0 - the error function of the real part of
        !           680:  its argument.  If the argument is a complex value, the imaginary component is
1.1       maekawa   681:  ignored.
                    682: 4 exp
                    683: ?expressions functions exp
                    684: ?functions exp
                    685: ?exp
                    686: #exp(x) & any & $e^{x}$,  exponential function of $x$ \\
                    687: %exp(x)@any@$e sup x$, exponential function of $x$
1.1.1.2 ! maekawa   688:  The `exp(x)` function returns the exponential function of its argument (`e`
1.1       maekawa   689:  raised to the power of its argument).  On some implementations (notably
                    690:  suns), exp(-x) returns undefined for very large x.  A user-defined function
                    691:  like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases.
                    692: 4 floor
                    693: ?expressions functions floor
                    694: ?functions floor
                    695: ?floor
                    696: #floor(x) & any & $\lfloor x \rfloor$,  largest integer not greater
                    697: #than $x$ (real part) \\
                    698: %floor(x)@any@$left floor x right floor$, largest integer not greater than $x$ (real part)
1.1.1.2 ! maekawa   699:  The `floor(x)` function returns the largest integer not greater than its
1.1       maekawa   700:  argument.  For complex numbers, `floor` returns the largest integer not
                    701:  greater than the real part of its argument.
                    702: 4 gamma
                    703: ?expressions functions gamma
                    704: ?functions gamma
                    705: ?gamma
                    706: #gamma(x) & any & $\mbox{gamma}(\mbox{real}(x))$,  gamma function of real($x$) \\
                    707: %gamma(x)@any@$GAMMA ( roman real (x))$, gamma function of real ($x$)
1.1.1.2 ! maekawa   708:  The `gamma(x)` function returns the gamma function of the real part of its
1.1       maekawa   709:  argument.  For integer n, gamma(n+1) = n!.  If the argument is a complex
                    710:  value, the imaginary component is ignored.
                    711: 4 ibeta
                    712: ?expressions functions ibeta
                    713: ?functions ibeta
                    714: ?ibeta
                    715: #ibeta(p,q,x) & any & $\mbox{ibeta}(\mbox{real}(p,q,x))$,  ibeta function of real($p$,$q$,$x$) \\
                    716: %ibeta(p,q,x)@any@$ibeta ( roman real (p,q,x))$, ibeta function of real ($p$,$q$,$x$)
1.1.1.2 ! maekawa   717:  The `ibeta(p,q,x)` function returns the incomplete beta function of the real
        !           718:  parts of its arguments. p, q > 0 and x in [0:1].  If the arguments are
        !           719:  complex, the imaginary components are ignored.
1.1       maekawa   720: 4 inverf
                    721: ?expressions functions inverf
                    722: ?functions inverf
                    723: ?inverf
                    724: #inverf(x) & any &  inverse error function of real($x$)  \\
                    725: %inverf(x)@any@inverse error function real($x$)
1.1.1.2 ! maekawa   726:  The `inverf(x)` function returns the inverse error function of the real part
1.1       maekawa   727:  of its argument.
                    728: 4 igamma
                    729: ?expressions functions igamma
                    730: ?functions igamma
                    731: ?igamma
                    732: #igamma(a,x) & any & $\mbox{igamma}(\mbox{real}(a,x))$,  igamma function of real($a$,$x$) \\
                    733: %igamma(a,x)@any@$igamma ( roman real (a,x))$, igamma function of real ($a$,$x$)
1.1.1.2 ! maekawa   734:  The `igamma(a,x)` function returns the incomplete gamma function of the real
1.1       maekawa   735:  parts of its arguments.  a > 0 and x >= 0.  If the arguments are complex,
                    736:  the imaginary components are ignored.
                    737: 4 imag
                    738: ?expressions functions imag
                    739: ?functions imag
                    740: ?imag
                    741: #imag(x) & complex &  imaginary part of $x$ as a real number \\
                    742: %imag(x)@complex@imaginary part of $x$ as a real number
1.1.1.2 ! maekawa   743:  The `imag(x)` function returns the imaginary part of its argument as a real
1.1       maekawa   744:  number.
                    745: 4 invnorm
                    746: ?expressions functions invnorm
                    747: ?functions invnorm
                    748: ?invnorm
                    749: #invnorm(x) & any &  inverse normal distribution function of real($x$)  \\
                    750: %invnorm(x)@any@inverse normal distribution function real($x$)
1.1.1.2 ! maekawa   751:  The `invnorm(x)` function returns the inverse normal distribution function of
1.1       maekawa   752:  the real part of its argument.
                    753: 4 int
                    754: ?expressions functions int
                    755: ?functions int
                    756: ?int
                    757: #int(x) & real &  integer part of $x$, truncated toward zero \\
                    758: %int(x)@real@integer part of $x$, truncated toward zero
1.1.1.2 ! maekawa   759:  The `int(x)` function returns the integer part of its argument, truncated
1.1       maekawa   760:  toward zero.
                    761: 4 lgamma
                    762: ?expressions functions lgamma
                    763: ?functions lgamma
                    764: ?lgamma
                    765: #lgamma(x) & any & $\mbox{lgamma}(\mbox{real}(x))$,  lgamma function of real($x$) \\
                    766: %lgamma(x)@any@$lgamma ( roman real (x))$, lgamma function of real ($x$)
1.1.1.2 ! maekawa   767:  The `lgamma(x)` function returns the natural logarithm of the gamma function
1.1       maekawa   768:  of the real part of its argument.  If the argument is a complex value, the
                    769:  imaginary component is ignored.
                    770: 4 log
                    771: ?expressions functions log
                    772: ?functions log
                    773: ?log
                    774: #log(x) & any & $\log_{e} x$,  natural logarithm (base $e$) of $x$ \\
                    775: %log(x)@any@$ln~x$, natural logarithm (base $e$) of $x$
1.1.1.2 ! maekawa   776:  The `log(x)` function returns the natural logarithm (base `e`) of its
        !           777:  argument.
1.1       maekawa   778: 4 log10
                    779: ?expressions functions log10
                    780: ?functions log10
                    781: ?log10
                    782: #log10(x) & any & $\log_{10} x$,  logarithm (base $10$) of $x$ \\
                    783: %log10(x)@any@${log sub 10}~x$, logarithm (base $10$) of $x$
1.1.1.2 ! maekawa   784:  The `log10(x)` function returns the logarithm (base 10) of its argument.
1.1       maekawa   785: 4 norm
                    786: ?expressions functions norm
                    787: ?functions norm
                    788: ?norm
                    789: #norm(x) & any & normal distribution (Gaussian) function of real($x$) \\
                    790: %norm(x)@any@$norm(x)$, normal distribution function of real($x$)
1.1.1.2 ! maekawa   791:  The `norm(x)` function returns the normal distribution function (or Gaussian)
1.1       maekawa   792:  of the real part of its argument.
                    793: 4 rand
                    794: ?expressions functions rand
                    795: ?functions rand
                    796: ?rand
                    797: #rand(x) & any & $\mbox{rand}(\mbox{real}(x))$,  pseudo random number generator \\
                    798: %rand(x)@any@$rand ( roman real (x))$, pseudo random number generator
1.1.1.2 ! maekawa   799:  The `rand(x)` function returns a pseudo random number in the interval [0:1]
1.1       maekawa   800:  using the real part of its argument as a seed.  If seed < 0, the sequence
                    801:  is (re)initialized.  If the argument is a complex value, the imaginary
                    802:  component is ignored.
                    803: 4 real
                    804: ?expressions functions real
                    805: ?functions real
                    806: ?real
                    807: #real(x) & any &  real part of $x$ \\
                    808: %real(x)@any@real part of $x$
1.1.1.2 ! maekawa   809:  The `real(x)` function returns the real part of its argument.
1.1       maekawa   810: 4 sgn
                    811: ?expressions functions sgn
                    812: ?functions sgn
                    813: ?sgn
                    814: #sgn(x) & any & 1 if $x>0$, -1 if $x<0$, 0 if $x=0$. imag($x$) ignored \\
                    815: %sgn(x)@any@1 if $x > 0$, -1 if $x < 0$, 0 if $x = 0$. $roman imag (x)$ ignored
1.1.1.2 ! maekawa   816:  The `sgn(x)` function returns 1 if its argument is positive, -1 if its
        !           817:  argument is negative, and 0 if its argument is 0.  If the argument is a
        !           818:  complex value, the imaginary component is ignored.
1.1       maekawa   819: 4 sin
                    820: ?expressions functions sin
                    821: ?functions sin
                    822: ?sin
                    823: #sin(x) & any & $\sin x$, sine of $x$ \\
                    824: %sin(x)@any@$sin~x$, sine of $x$
1.1.1.2 ! maekawa   825:  The `sin(x)` function returns the sine of its argument.  `sin` expects its
1.1       maekawa   826:  argument to be in radians or degrees, as selected by `set angles`.
                    827: 4 sinh
                    828: ?expressions functions sinh
                    829: ?functions sinh
                    830: ?sinh
                    831: #sinh(x) & any & $\sinh x$, hyperbolic sine $x$ in radians \\
                    832: %sinh(x)@any@$sinh~x$, hyperbolic sine $x$ in radians
1.1.1.2 ! maekawa   833:  The `sinh(x)` function returns the hyperbolic sine of its argument.  `sinh`
1.1       maekawa   834:  expects its argument to be in radians.
                    835: 4 sqrt
                    836: ?expressions functions sqrt
                    837: ?functions sqrt
                    838: ?sqrt
                    839: #sqrt(x) & any & $\sqrt{x}$,  square root of $x$ \\
                    840: %sqrt(x)@any@$sqrt x $, square root of $x$
1.1.1.2 ! maekawa   841:  The `sqrt(x)` function returns the square root of its argument.
1.1       maekawa   842: 4 tan
                    843: ?expressions functions tan
                    844: ?functions tan
                    845: ?tan
                    846: #tan(x) & any & $\tan x$,  tangent of $x$ \\
                    847: %tan(x)@any@$tan~x$, tangent of $x$
1.1.1.2 ! maekawa   848:  The `tan(x)` function returns the tangent of its argument.  `tan` expects
1.1       maekawa   849:  its argument to be in radians or degrees, as selected by `set angles`.
                    850: 4 tanh
                    851: ?expressions functions tanh
                    852: ?functions tanh
                    853: ?tanh
                    854: #tanh(x) & any & $\tanh x$, hyperbolic tangent of $x$ in radians\\
                    855: %tanh(x)@any@$tanh~x$, hyperbolic tangent of $x$ in radians
1.1.1.2 ! maekawa   856:  The `tanh(x)` function returns the hyperbolic tangent of its argument.  `tanh`
1.1       maekawa   857:  expects its argument to be in radians.
                    858: @end table
                    859:
                    860:  A few additional functions are also available.
                    861:
                    862: @start table
                    863: #\begin{tabular}{|ccl|} \hline
                    864: #\multicolumn{3}{|c|}{other {\bf gnuplot} functions} \\ \hline \hline
                    865: #Function & Arguments & Returns \\ \hline
                    866: %c c l .
                    867: %Function@Arguments@Returns
                    868: %_
                    869: 4 column
                    870: ?expressions functions column
                    871: ?functions column
                    872: ?column
                    873: #column(x) & int & column $x$ during datafile manipulation. \\
                    874: %column(x)@int@ column $x$ during datafile manipulation.
                    875:  `column(x)` may be used only in expressions as part of `using` manipulations
                    876:  to fits or datafile plots.  See `plot datafile using`.
                    877: 4 tm_hour
                    878: ?expressions tm_hour
                    879: ?functions tm_hour
                    880: #tm\_hour(x) & int & the hour \\
                    881: %tm_hour(x)@int@the hour
                    882:  The `tm_hour` function interprets its argument as a time, in seconds from
                    883:  1 Jan 2000.  It returns the hour (an integer in the range 0--23) as a real.
                    884: 4 tm_mday
                    885: ?expressions tm_mday
                    886: ?functions tm_mday
                    887: #tm\_mday(x) & int & the day of the month \\
                    888: %tm_mday(x)@int@the day of the month
                    889:  The `tm_mday` function interprets its argument as a time, in seconds from
                    890:  1 Jan 2000.  It returns the day of the month (an integer in the range 1--31)
                    891:  as a real.
                    892: 4 tm_min
                    893: ?expressions tm_min
                    894: ?functions tm_min
                    895: #tm\_min(x) & int & the minute \\
                    896: %tm_min(x)@int@the minute
                    897:  The `tm_min` function interprets its argument as a time, in seconds from
                    898:  1 Jan 2000.  It returns the minute (an integer in the range 0--59) as a real.
                    899: 4 tm_mon
                    900: ?expressions tm_mon
                    901: ?functions tm_mon
                    902: #tm\_mon(x) & int & the month \\
                    903: %tm_mon(x)@int@the month
                    904:  The `tm_mon` function interprets its argument as a time, in seconds from
                    905:  1 Jan 2000.  It returns the month (an integer in the range 1--12) as a real.
                    906: 4 tm_sec
                    907: ?expressions tm_sec
                    908: ?functions tm_sec
                    909: #tm\_sec(x) & int & the second \\
                    910: %tm_sec(x)@int@the second
                    911:  The `tm_sec` function interprets its argument as a time, in seconds from
                    912:  1 Jan 2000.  It returns the second (an integer in the range 0--59) as a real.
                    913: 4 tm_wday
                    914: ?expressions tm_wday
                    915: ?functions tm_wday
                    916: #tm\_wday(x) & int & the day of the week \\
                    917: %tm_wday(x)@int@the day of the week
                    918:  The `tm_wday` function interprets its argument as a time, in seconds from
                    919:  1 Jan 2000.  It returns the day of the week (an integer in the range 1--7) as
                    920:  a real.
                    921: 4 tm_yday
                    922: ?expressions tm_yday
                    923: ?functions tm_yday
                    924: #tm\_yday(x) & int & the day of the year \\
                    925: %tm_yday(x)@int@the day of the year
                    926:  The `tm_yday` function interprets its argument as a time, in seconds from
                    927:  1 Jan 2000.  It returns the day of the year (an integer in the range 1--366)
                    928:  as a real.
                    929: 4 tm_year
                    930: ?expressions tm_year
                    931: ?functions tm_year
                    932: #tm\_year(x) & int & the year \\
                    933: %tm_year(x)@int@the year
                    934:  The `tm_year` function interprets its argument as a time, in seconds from
                    935:  1 Jan 2000.  It returns the year (an integer) as a real.
                    936: 4 valid
                    937: ?expressions functions valid
                    938: ?functions valid
                    939: ?valid
                    940: #valid(x) & int & test validity of $\mbox{column}(x)$ during datafile manip.\\
                    941: %valid(x)@int@ test validity of column($x$) during datafile manip.
                    942:  `valid(x)` may be used only in expressions as part of `using` manipulations
                    943:  to fits or datafile plots.  See `plot datafile using`.
                    944: @end table
1.1.1.2 ! maekawa   945: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/airfoil.html">Use of functions and complex variables for airfoils </a>
1.1       maekawa   946: 3 Operators
                    947: ?expressions operators
                    948: ?operators
                    949:  The operators in `gnuplot` are the same as the corresponding operators in the
                    950:  C programming language, except that all operators accept integer, real, and
                    951:  complex arguments, unless otherwise noted.  The ** operator (exponentiation)
                    952:  is supported, as in FORTRAN.
                    953:
                    954:  Parentheses may be used to change order of evaluation.
                    955: 4 Unary
                    956: ?expressions operators unary
                    957: ?operators unary
                    958: ?unary
                    959:  The following is a list of all the unary operators and their usages:
                    960:
                    961: @start table - first is interactive cleartext form
                    962:      Symbol      Example    Explanation
                    963:        -           -a          unary minus
                    964:        +           +a          unary plus (no-operation)
                    965:        ~           ~a        * one's complement
                    966:        !           !a        * logical negation
                    967:        !           a!        * factorial
                    968:        $           $3        * call arg/column during `using` manipulation
                    969: #\begin{tabular}{|ccl|} \hline
                    970: #\multicolumn{3}{|c|}{Unary Operators}\\ \hline \hline
                    971: #Symbol & Example & Explanation \\ \hline
                    972: #\verb@-@ & \verb@-a@ & unary minus \\
                    973: #\verb@+@ & \verb@+a@ & unary plus (no-operation) \\
                    974: #\verb@~@ & \verb@~a@ & * one's complement \\
                    975: #\verb@!@ & \verb@!a@ & * logical negation \\
                    976: #\verb@!@ & \verb@a!@ & * factorial \\
                    977: #\verb@$@ & \verb@$3@ & * call arg/column during `using` manipulation \\
                    978: C ugly hack: doc2ms uses $ as delimiter for eqn's so it doesn't seem to
                    979: C be able to print them. So we have to typeset this table without using
                    980: C eqn (at least that's the only solution I found, without any real docs
                    981: C on *roff and eqn
                    982: C First, terminate the table doc2ms.c already started:
                    983: %.TE
                    984: C ... then turn off eqn delimiters:
                    985: %.EQ
                    986: %delim off
                    987: %.EN
                    988: C ... and restart the table:
                    989: %.TS
                    990: %center box tab (@) ;
                    991: %c c l .
                    992: %Symbol@Example@Explanation
                    993: %_
                    994: %-@-a@unary minus
                    995: %+@+a@unary plus (no-operation)
                    996: %~@~a@* one's complement
                    997: %!@!a@* logical negation
                    998: %!@a!@* factorial
                    999: %$@$3@* call arg/column during `using` manipulation
                   1000: %_
                   1001: @end table
                   1002:  (*) Starred explanations indicate that the operator requires an integer
                   1003:  argument.
                   1004:
                   1005:  Operator precedence is the same as in Fortran and C.  As in those languages,
                   1006:  parentheses may be used to change the order of operation.  Thus -2**2 = -4,
                   1007:  but (-2)**2 = 4.
                   1008:
                   1009:  The factorial operator returns a real number to allow a greater range.
                   1010: 4 Binary
                   1011: ?expressions operators binary
                   1012: ?operators binary
                   1013: ?binary
                   1014:  The following is a list of all the binary operators and their usages:
                   1015:
                   1016: @start table - first is interactive cleartext form
                   1017:      Symbol       Example      Explanation
                   1018:        **          a**b          exponentiation
                   1019:        *           a*b           multiplication
                   1020:        /           a/b           division
                   1021:        %           a%b         * modulo
                   1022:        +           a+b           addition
                   1023:        -           a-b           subtraction
                   1024:        ==          a==b          equality
                   1025:        !=          a!=b          inequality
                   1026:        <           a<b           less than
                   1027:        <=          a<=b          less than or equal to
                   1028:        >           a>b           greater than
                   1029:        >=          a>=b          greater than or equal to
                   1030:        &           a&b         * bitwise AND
                   1031:        ^           a^b         * bitwise exclusive OR
                   1032:        |           a|b         * bitwise inclusive OR
                   1033:        &&          a&&b        * logical AND
                   1034:        ||          a||b        * logical OR
                   1035: #\begin{tabular}{|ccl|} \hline
                   1036: #\multicolumn{3}{|c|}{Binary Operators} \\ \hline \hline
                   1037: #Symbol & Example & Explanation \\ \hline
                   1038: #\verb~**~ & \verb~a**b~ & exponentiation\\
                   1039: #\verb~*~ & \verb~a*b~ & multiplication\\
                   1040: #\verb~/~ & \verb~a/b~ & division\\
                   1041: #\verb~%~ & \verb~a%b~ & * modulo\\
                   1042: #\verb~+~ & \verb~a+b~ & addition\\
                   1043: #\verb~-~ & \verb~a-b~ & subtraction\\
                   1044: #\verb~==~ & \verb~a==b~ & equality\\
                   1045: #\verb~!=~ & \verb~a!=b~ & inequality\\
                   1046: #\verb~<~ & \verb~a<b~ & less than\\
                   1047: #\verb~<=~ & \verb~a<=b~ & less than or equal to\\
                   1048: #\verb~>~ & \verb~a>b~ & greater than\\
                   1049: #\verb~>=~ & \verb~a>=b~ & greater than or equal to\\
                   1050: #\verb~&~ & \verb~a&b~ & * bitwise AND\\
                   1051: #\verb~^~ & \verb~a^b~ & * bitwise exclusive OR\\
                   1052: #\verb~|~ & \verb~a|b~ & * bitwise inclusive OR\\
                   1053: #\verb~&&~ & \verb~a&&b~ & * logical AND\\
                   1054: #\verb~||~ & \verb~a||b~ & * logical OR\\
                   1055: %c c l .
                   1056: %Symbol@Example@Explanation
                   1057: %_
                   1058: %**@a**b@exponentiation
                   1059: %*@a*b@multiplication
                   1060: %/@a/b@division
                   1061: %%@a%b@* modulo
                   1062: %+@a+b@addition
                   1063: %-@a-b@subtraction
                   1064: %==@a==b@equality
                   1065: %!=@a!=b@inequality
                   1066: %<@a<b@less than
                   1067: %<=@a<=b@less than or equal to
                   1068: %>@a>b@greater than
                   1069: %>=@a>=b@greater than or equal to
                   1070: %&@a&b@* bitwise AND
                   1071: %^@a^b@* bitwise exclusive OR
                   1072: %|@a|b@* bitwise inclusive OR
                   1073: %&&@a&&b@* logical AND
                   1074: %||@a||b@* logical OR
                   1075:
                   1076: @end table
                   1077:  (*) Starred explanations indicate that the operator requires integer
                   1078:  arguments.
                   1079:
                   1080:  Logical AND (&&) and OR (||) short-circuit the way they do in C.  That is,
                   1081:  the second `&&` operand is not evaluated if the first is false; the second
                   1082:  `||` operand is not evaluated if the first is true.
                   1083: 4 Ternary
                   1084: ?expressions operators ternary
                   1085: ?operators ternary
                   1086: ?ternary
                   1087:  There is a single ternary operator:
                   1088:
                   1089: @start table - first is interactive cleartext form
                   1090:      Symbol       Example      Explanation
                   1091:        ?:          a?b:c     ternary operation
                   1092: #\begin{tabular}{|ccl|} \hline
                   1093: #\multicolumn{3}{|c|}{Ternary Operator} \\ \hline \hline
                   1094: #Symbol & Example & Explanation \\ \hline
                   1095: #\verb~?:~ & \verb~a?b:c~ & ternary operation\\
                   1096: %c c l .
                   1097: %Symbol@Example@Explanation
                   1098: %_
                   1099: %?:@a?b:c@* ternary operation
                   1100:
                   1101: @end table
                   1102:  The ternary operator behaves as it does in C.  The first argument (a), which
                   1103:  must be an integer, is evaluated.  If it is true (non-zero), the second
                   1104:  argument (b) is evaluated and returned; otherwise the third argument (c) is
                   1105:  evaluated and returned.
                   1106:
                   1107:  The ternary operator is very useful both in constructing piecewise functions
                   1108:  and in plotting points only when certain conditions are met.
                   1109:
                   1110:  Examples:
                   1111:
                   1112:  Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2,
                   1113:  and undefined elsewhere:
                   1114:        f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0
                   1115:        plot f(x)
                   1116: ^ <img align=bottom src="http://www.nas.nasa.gov/~woo/gnuplot/doc/ternary.gif" alt="[ternary.gif]" width=640 height=480>
                   1117:  Note that `gnuplot` quietly ignores undefined values, so the final branch of
                   1118:  the function (1/0) will produce no plottable points.  Note also that f(x)
                   1119:  will be plotted as a continuous function across the discontinuity if a line
                   1120:  style is used.  To plot it discontinuously, create separate functions for the
                   1121:  two pieces.  (Parametric functions are also useful for this purpose.)
                   1122:
                   1123:  For data in a file, plot the average of the data in columns 2 and 3 against
                   1124:  the datum in column 1, but only if the datum in column 4 is non-negative:
                   1125:
                   1126:        plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 )
                   1127:
                   1128:  Please see `plot data-file using` for an explanation of the `using` syntax.
                   1129: 3 User-defined
                   1130: ?expressions user-defined
                   1131: ?user-defined
                   1132: ?variables
                   1133:  New user-defined variables and functions of one through five variables may
                   1134:  be declared and used anywhere, including on the `plot` command itself.
                   1135:
                   1136:  User-defined function syntax:
                   1137:        <func-name>( <dummy1> {,<dummy2>} ... {,<dummy5>} ) = <expression>
                   1138:
                   1139:  where <expression> is defined in terms of <dummy1> through <dummy5>.
                   1140:
                   1141:  User-defined variable syntax:
                   1142:        <variable-name> = <constant-expression>
                   1143:
                   1144:  Examples:
                   1145:        w = 2
                   1146:        q = floor(tan(pi/2 - 0.1))
                   1147:        f(x) = sin(w*x)
                   1148:        sinc(x) = sin(pi*x)/(pi*x)
                   1149:        delta(t) = (t == 0)
                   1150:        ramp(t) = (t > 0) ? t : 0
                   1151:        min(a,b) = (a < b) ? a : b
                   1152:        comb(n,k) = n!/(k!*(n-k)!)
                   1153:        len3d(x,y,z) = sqrt(x*x+y*y+z*z)
                   1154:        plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x)
                   1155:
                   1156: ^ <img align=bottom src="http://www.nas.nasa.gov/~woo/gnuplot/doc/userdefined.gif" alt="[userdefined.gif]" width=640 height=480>
                   1157:  Note that the variable `pi` is already defined.  But it is in no way magic;
                   1158:  you may redefine it to be whatever you like.
                   1159:
                   1160:  Valid names are the same as in most programming languages: they must begin
                   1161:  with a letter, but subsequent characters may be letters, digits, "$", or "_".
                   1162:  Note, however, that the `fit` mechanism uses several variables with names
                   1163:  that begin "FIT_".  It is safest to avoid using such names.  "FIT_LIMIT",
                   1164:  however, is one that you may wish to redefine. See the documentation
                   1165:  on `fit` for details.
                   1166:
                   1167:
                   1168:  See `show functions`, `show variables`, and `fit`.
                   1169: 2 Glossary
                   1170: ?glossary
                   1171:  Throughout this document an attempt has been made to maintain consistency of
                   1172:  nomenclature.  This cannot be wholly successful because as `gnuplot` has
                   1173:  evolved over time, certain command and keyword names have been adopted that
                   1174:  preclude such perfection.  This section contains explanations of the way
                   1175:  some of these terms are used.
                   1176:
                   1177:  A "page" or "screen" is the entire area addressable by `gnuplot`.  On a
                   1178:  monitor, it is the full screen; on a plotter, it is a single sheet of paper.
                   1179:
                   1180:  A screen may contain one or more "plots".  A plot is defined by an abscissa
                   1181:  and an ordinate, although these need not actually appear on it, as well as
                   1182:  the margins and any text written therein.
                   1183:
                   1184:  A plot contains one "graph".  A graph is defined by an abscissa and an
                   1185:  ordinate, although these need not actually appear on it.
                   1186:
                   1187:  A graph may contain one or more "lines".  A line is a single function or
                   1188:  data set.  "Line" is also a plotting style.  The word will also be used in
                   1189:  sense "a line of text".  Presumably the context will remove any ambiguity.
                   1190:
                   1191:  The lines on a graph may have individual names.  These may be listed
                   1192:  together with a sample of the plotting style used to represent them in
                   1193:  the "key", sometimes also called the "legend".
                   1194:
                   1195:  The word "title" occurs with multiple meanings in `gnuplot`.  In this
                   1196:  document, it will always be preceded by the adjective "plot", "line", or
                   1197:  "key" to differentiate among them.
                   1198:
                   1199:  A graph may have up to four labelled axes.  Various commands have the name of
                   1200:  an axis built into their names, such as `set xlabel`.  Other commands have
                   1201:  one or more axis names as options, such as `set logscale xy`.  The names of
                   1202:  the four axes for these usages are "x" for the axis along the bottom border
                   1203:  of the plot, "y" for the left border, "x2" for the top border, and "y2" for
                   1204:  the right border.  "z" also occurs in commands used with 3-d plotting.
                   1205:
                   1206:  When discussing data files, the term "record" will be resurrected and used
                   1207:  to denote a single line of text in the file, that is, the characters between
                   1208:  newline or end-of-record characters.  A "point" is the datum extracted from
                   1209:  a single record.  A "datablock" is a set of points from consecutive records,
                   1210:  delimited by blank records.  A line, when referred to in the context of a
                   1211:  data file, is a subset of a datablock.
                   1212: 2 Plotting
                   1213: ?plotting
                   1214:  There are three `gnuplot` commands which actually create a plot: `plot`,
                   1215:  `splot` and `replot`.  `plot` generates 2-d plots, `splot` generates 3-d
                   1216:  plots (actually 2-d projections, of course), and `replot` appends its
                   1217:  arguments to the previous `plot` or `splot` and executes the modified
                   1218:  command.
                   1219:
                   1220:  Much of the general information about plotting can be found in the discussion
                   1221:  of `plot`; information specific to 3-d can be found in the `splot` section.
                   1222:
                   1223:  `plot` operates in either rectangular or polar coordinates -- see `set polar`
                   1224:  for details of the latter.  `splot` operates only in rectangular coordinates,
                   1225:  but the `set mapping` command allows for a few other coordinate systems to be
                   1226:  treated.  In addition, the `using` option allows both `plot` and `splot` to
                   1227:  treat almost any coordinate system you'd care to define.
                   1228:
                   1229:  `splot` can plot surfaces and contours in addition to points and/or lines.
                   1230:  In addition to `splot`, see `set isosamples` for information about defining
                   1231:  the grid for a 3-d function;  `splot datafile` for information about the
                   1232:  requisite file structure for 3-d data values; and `set contour` and `set
                   1233:  cntrparam` for information about contours.
                   1234: 2 Start-up
                   1235: ?startup
                   1236: ?start
                   1237: ?.gnuplot
                   1238:  When `gnuplot` is run, it looks for an initialization file to load.  This
                   1239:  file is called `.gnuplot` on Unix and AmigaOS systems, and `GNUPLOT.INI` on
                   1240:  other systems.  If this file is not found in the current directory, the
                   1241:  program will look for it in the home directory (under AmigaOS,
                   1242:  Atari(single)TOS, MS-DOS and OS/2, the environment variable `gnuplot` should
                   1243:  contain the name of this directory).  Note: if NOCWDRC is defined during the
                   1244:  installation, `gnuplot` will not read from the current directory.
                   1245:
                   1246:  If the initialization file is found, `gnuplot` executes the commands in it.
                   1247:  These may be any legal `gnuplot` commands, but typically they are limited to
                   1248:  setting the terminal and defining frequently-used functions or variables.
                   1249: 2 Substitution
                   1250: ?substitution
                   1251:  Command-line substitution is specified by a system command enclosed in
                   1252:  backquotes.  This command is spawned and the output it produces replaces
                   1253:  the name of the command (and backquotes) on the command line.  Some
                   1254:  implementations also support pipes;  see `plot data-file special-filenames`.
                   1255:
                   1256:  Newlines in the output produced by the spawned command are replaced with
                   1257:  blanks.
                   1258:
                   1259:  Command-line substitution can be used anywhere on the `gnuplot` command
                   1260:  line.
                   1261:
                   1262:  Example:
                   1263:
                   1264:  This will run the program `leastsq` and replace `leastsq` (including
                   1265:  backquotes) on the command line with its output:
                   1266:        f(x) = `leastsq`
                   1267:
                   1268:  or, in VMS
                   1269:        f(x) = `run leastsq`
                   1270: 2 Syntax
                   1271: ?syntax
                   1272: ?specify
                   1273: ?punctuation
                   1274:  The general rules of syntax and punctuation in `gnuplot` are that keywords
                   1275:  and options are order-dependent.  Options and any accompanying parameters are
                   1276:  separated by spaces whereas lists and coordinates are separated by commas.
                   1277:  Ranges are separated by colons and enclosed in brackets [], text and file
                   1278:  names are enclosed in quotes, and a few miscellaneous things are enclosed
                   1279:  in parentheses.  Braces {} are used for a few special purposes.
                   1280:
                   1281:  Commas are used to separate coordinates on the `set` commands `arrow`,
                   1282:  `key`, and `label`; the list of variables being fitted (the list after the
                   1283:  `via` keyword on the `fit` command); lists of discrete contours or the loop
                   1284:  parameters which specify them on the `set cntrparam` command; the arguments
                   1285:  of the `set` commands `dgrid3d`, `dummy`, `isosamples`, `offsets`, `origin`,
                   1286:  `samples`, `size`, `time`, and `view`; lists of tics or the loop parameters
                   1287:  which specify them; the offsets for titles and axis labels; parametric
                   1288:  functions to be used to calculate the x, y, and z coordinates on the `plot`,
                   1289:  `replot` and `splot` commands; and the complete sets of keywords specifying
                   1290:  individual plots (data sets or functions) on the `plot`, `replot` and `splot`
                   1291:  commands.
                   1292:
                   1293:  Parentheses are used to delimit sets of explicit tics (as opposed to loop
                   1294:  parameters) and to indicate computations in the `using` filter of the `fit`,
                   1295:  `plot`, `replot` and `splot` commands.
                   1296:
                   1297:  (Parentheses and commas are also used as usual in function notation.)
                   1298:
                   1299:  Brackets are used to delimit ranges, whether they are given on `set`, `plot`
                   1300:  or `splot` commands.
                   1301:
                   1302:  Colons are used to separate extrema in `range` specifications (whether they
                   1303:  are given on `set`, `plot` or `splot` commands) and to separate entries in
                   1304:  the `using` filter of the `plot`, `replot`, `splot` and `fit` commands.
                   1305:
                   1306:  Semicolons are used to separate commands given on a single command line.
                   1307:
                   1308:  Braces are used in text to be specially processed by some terminals, like
                   1309:  `postscript`.  They are also used to denote complex numbers: {3,2} = 3 + 2i.
                   1310:
                   1311:  Text may be enclosed in single- or double-quotes.  Backslash processing of
                   1312:  sequences like \n (newline) and \345 (octal character code) is performed for
                   1313:  double-quoted strings, but not for single-quoted strings.
                   1314:
                   1315:  The justification is the same for each line of a multi-line string.  Thus the
                   1316:  center-justified string
                   1317:        "This is the first line of text.\nThis is the second line."
                   1318:  will produce
                   1319:                         This is the first line of text.
                   1320:                            This is the second line.
                   1321:  but
                   1322:        'This is the first line of text.\nThis is the second line.'
                   1323:  will produce
                   1324:            This is the first line of text.\nThis is the second line.
                   1325:
                   1326:  Filenames may be entered with either single- or double-quotes.  In this
                   1327:  manual the command examples generally single-quote filenames and double-quote
                   1328:  other string tokens for clarity.
                   1329:
                   1330:  At present you should not embed \n inside {} when using the enhanced option
                   1331:  of the postscript terminal.
                   1332:
                   1333:  The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be
                   1334:  specified by \\ in a single-quoted string or \\\\ in a double-quoted string.
                   1335:
                   1336:  Back-quotes are used to enclose system commands for substitution.
                   1337: 2 Time/Date data
                   1338: ?time/date
                   1339:  `gnuplot` supports the use of time and/or date information as input data.
                   1340:  This feature is activated by the commands `set xdata time`, `set ydata time`,
                   1341:  etc.
                   1342:
                   1343:  Internally all times and dates are converted to the number of seconds from
                   1344:  the year 2000.  The command `set timefmt` defines the format for all inputs:
                   1345:  data files, ranges, tics, label positions---in short, anything that accepts a
                   1346:  data value must receive it in this format.  Since only one input format can
                   1347:  be in force at a given time, all time/date quantities being input at the same
                   1348:  time must be presented in the same format.  Thus if both x and y data in a
                   1349:  file are time/date, they must be in the same format.
                   1350:
                   1351:  The conversion to and from seconds assumes Universal Time (which is the same
                   1352:  as Greenwich Standard Time).  There is no provision for changing the time
                   1353:  zone or for daylight savings.  If all your data refer to the same time zone
                   1354:  (and are all either daylight or standard) you don't need to worry about these
                   1355:  things.  But if the absolute time is crucial for your application, you'll
                   1356:  need to convert to UT yourself.
                   1357:
                   1358:  Commands like `show xrange` will re-interpret the integer according to
                   1359:  `timefmt`.  If you change `timefmt`, and then `show` the quantity again, it
                   1360:  will be displayed in the new `timefmt`.  For that matter, if you give the
                   1361:  deactivation command (like `set xdata`), the quantity will be shown in its
                   1362:  numerical form.
                   1363:
                   1364:  The command `set format` defines the format that will be used for tic labels,
                   1365:  whether or not the specified axis is time/date.
                   1366:
                   1367:  If time/date information is to be plotted from a file, the `using` option
                   1368:  _must_ be used on the `plot` or `splot` command.  These commands simply use
                   1369:  white space to separate columns, but white space may be embedded within the
                   1370:  time/date string.  If you use tabs as a separator, some trial-and-error may
                   1371:  be necessary to discover how your system treats them.
                   1372:
                   1373:  The following example demonstrates time/date plotting.
                   1374:
                   1375:  Suppose the file "data" contains records like
                   1376:
                   1377:        03/21/95 10:00  6.02e23
                   1378:
                   1379:  This file can be plotted by
                   1380:
                   1381:        set xdata time
                   1382:        set timefmt "%m/%d/%y"
                   1383:        set xrange ["03/21/95":"03/22/95"]
                   1384:        set format x "%m/%d"
                   1385:        set timefmt "%m/%d/%y %H:%M"
                   1386:        plot "data" using 1:3
                   1387:
                   1388:  which will produce xtic labels that look like "03/21".
                   1389:
                   1390:  See the descriptions of each command for more details.
                   1391: 1 Commands
                   1392: ?commands
                   1393:  This section lists the commands acceptable to `gnuplot` in alphabetical
                   1394:  order.  Printed versions of this document contain all commands; on-line
                   1395:  versions may not be complete.  Indeed, on some systems there may be no
                   1396:  commands at all listed under this heading.
                   1397:
                   1398:  Note that in most cases unambiguous abbreviations for command names and their
                   1399:  options are permissible, i.e., "`p f(x) w l`" instead of "`plot f(x) with
                   1400:  lines`".
                   1401:
                   1402:  In the syntax descriptions, braces ({}) denote optional arguments and a
                   1403:  vertical bar (|) separates mutually exclusive choices.
                   1404: 2 cd
                   1405: ?commands cd
                   1406: ?cd
                   1407:  The `cd` command changes the working directory.
                   1408:
                   1409:  Syntax:
                   1410:        cd '<directory-name>'
                   1411:
                   1412:  The directory name must be enclosed in quotes.
                   1413:
                   1414:  Examples:
                   1415:        cd 'subdir'
                   1416:        cd ".."
                   1417:
                   1418:  DOS users _must_ use single-quotes---backslash [\] has special significance
                   1419:  inside double-quotes.  For example,
                   1420:        cd "c:\newdata"
                   1421:  fails, but
                   1422:        cd 'c:\newdata'
                   1423:  works as expected.
                   1424: 2 call
                   1425: ?commands call
                   1426: ?call
                   1427:  The `call` command is identical to the load command with one exception: you
                   1428:  can have up to ten additional parameters to the command (delimited according
                   1429:  to the standard parser rules) which can be substituted into the lines read
                   1430:  from the file.  As each line is read from the `call`ed input file, it is
                   1431:  scanned for the sequence `$` (dollar-sign) followed by a digit (0--9).  If
                   1432:  found, the sequence is replaced by the corresponding parameter from the
                   1433:  `call` command line.  If the parameter was specified as a string in the
                   1434:  `call` line, it is substituted without its enclosing quotes.  `$` followed by
                   1435:  any character other than a digit will be that character.  E.g. use `$$` to
                   1436:  get a single `$`.  Providing more than ten parameters on the `call` command
                   1437:  line will cause an error.  A parameter that was not provided substitutes as
                   1438:  nothing.  Files being `call`ed may themselves contain `call` or `load`
                   1439:  commands.
                   1440:
                   1441:  The `call` command _must_ be the last command on a multi-command line.
                   1442:
                   1443:  Syntax:
                   1444:        call "<input-file>" <parameter-0> <parm-1> ... <parm-9>
                   1445:
                   1446:  The name of the input file must be enclosed in quotes, and it is recommended
                   1447:  that parameters are similarly enclosed in quotes (future versions of gnuplot
                   1448:  may treat quoted and unquoted arguments differently).
                   1449:
                   1450:  Example:
                   1451:
                   1452:  If the file 'calltest.gp' contains the line:
                   1453:        print "p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x"
                   1454:
                   1455:  entering the command:
                   1456:        call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2"
                   1457:
                   1458:  will display:
                   1459:        p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx
                   1460:
                   1461:  NOTE: there is a clash in syntax with the datafile `using` callback
                   1462:  operator.  Use `$$n` or `column(n)` to access column n from a datafile inside
                   1463:  a `call`ed datafile plot.
                   1464: 2 clear
                   1465: ?commands clear
                   1466: ?clear
                   1467:  The `clear` command erases the current screen or output device as specified
                   1468:  by `set output`.  This usually generates a formfeed on hardcopy devices.  Use
                   1469:  `set terminal` to set the device type.
                   1470:
                   1471:  For some terminals `clear` erases only the portion of the plotting surface
                   1472:  defined by `set size`, so for these it can be used in conjunction with `set
                   1473:  multiplot` to create an inset.
                   1474:
                   1475:  Example:
                   1476:        set multiplot
                   1477:        plot sin(x)
                   1478:        set origin 0.5,0.5
                   1479:        set size 0.4,0.4
                   1480:        clear
                   1481:        plot cos(x)
                   1482:        set nomultiplot
                   1483:
                   1484:  Please see `set multiplot`, `set size`, and `set origin` for details of these
                   1485:  commands.
                   1486: 2 exit
                   1487: ?commands exit
                   1488: ?exit
                   1489:  The commands `exit` and `quit` and the END-OF-FILE character will exit the
                   1490:  current `gnuplot` command file and `load` the next one.  See "help
                   1491:  batch/interactive" for more details.
                   1492:
                   1493:  Each of these commands will clear the output device (as does the `clear`
                   1494:  command) before exiting.
                   1495: 2 fit
                   1496: ?commands fit
                   1497: ?fit
                   1498: ?least-squares
                   1499: ?Marquardt
                   1500:  The `fit` command can fit a user-defined function to a set of data points
                   1501:  (x,y) or (x,y,z), using an implementation of the nonlinear least-squares
                   1502:  (NLLS) Marquardt-Levenberg algorithm.  Any user-defined variable occurring in
                   1503:  the function body may serve as a fit parameter, but the return type of the
                   1504:  function must be real.
                   1505:
                   1506:  Syntax:
                   1507:        fit {[xrange] {[yrange]}} <function> '<datafile>'
                   1508:            {datafile-modifiers}
                   1509:            via '<parameter file>' | <var1>{,<var2>,...}
                   1510:
                   1511:  Ranges may be specified to temporarily limit the data which is to be fitted;
                   1512:  any out-of-range data points are ignored. The syntax is
                   1513:        [{dummy_variable=}{<min>}{:<max>}],
                   1514:  analogous to `plot`; see `plot ranges`.
                   1515:
                   1516:  <function> is any valid `gnuplot` expression, although it is usual to use a
                   1517:  previously user-defined function of the form f(x) or f(x,y).
                   1518:
                   1519:  <datafile> is treated as in the `plot` command.  All the `plot datafile`
                   1520:  modifiers (`using`, `every`,...) except `smooth` are applicable to `fit`.
                   1521:  See `plot datafile`.
                   1522:
                   1523:  The default data formats for fitting functions with a single independent
                   1524:  variable, y=f(x), are {x:}y or x:y:s; those formats can be changed with
                   1525:  the datafile `using` qualifier.  The third item, (a column number or an
                   1526:  expression), if present, is interpreted as the standard deviation of the
                   1527:  corresponding y value and is used to compute a weight for the datum, 1/s**2.
                   1528:  Otherwise, all data points are weighted equally, with a weight of one.
                   1529:
                   1530:  To fit a function with two independent variables, z=f(x,y), the required
                   1531:  format is `using` with four items, x:y:z:s.  The complete format must be
                   1532:  given---no default columns are assumed for a missing token.  Weights for
                   1533:  each data point are evaluated from 's' as above.  If error estimates are
                   1534:  not available, a constant value can be specified as a constant expression
                   1535:  (see `plot datafile using`), e.g., `using 1:2:3:(1)`.
                   1536:
                   1537:  Multiple datasets may be simultaneously fit with functions of one
                   1538:  independent variable by making y a 'pseudo-variable', e.g., the dataline
                   1539:  number, and fitting as two independent variables.  See `fit multibranch`.
                   1540:
                   1541:  The `via` qualifier specifies which parameters are to be adjusted, either
                   1542:  directly, or by referencing a parameter file.
                   1543:
                   1544:  Examples:
                   1545:        f(x) = a*x**2 + b*x + c
                   1546:        g(x,y) = a*x**2 + b*y**2 + c*x*y
                   1547:        FIT_LIMIT = 1e-6
                   1548:        fit f(x) 'measured.dat' via 'start.par'
                   1549:        fit f(x) 'measured.dat' using 3:($7-5) via 'start.par'
                   1550:        fit f(x) './data/trash.dat' using 1:2:3 via a, b, c
                   1551:        fit g(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c
                   1552:
                   1553:  After each iteration step, detailed information about the current state
                   1554:  of the fit is written to the display.  The same information about the
                   1555:  initial and final states is written to a log file, "fit.log".  This file
                   1556:  is always appended to, so as to not lose any previous fit history;  it
                   1557:  should be deleted or renamed as desired.
                   1558:
                   1559:  The fit may be interrupted by pressing Ctrl-C (any key but Ctrl-C under
                   1560:  MSDOS and Atari Multitasking Systems).  After the current iteration
                   1561:  completes, you have the option to (1) stop the fit and accept the current
                   1562:  parameter values, (2) continue the fit, (3) execute a `gnuplot` command
                   1563:  as specified by the environment variable FIT_SCRIPT.  The default for
                   1564:  FIT_SCRIPT is `replot`, so if you had previously plotted both the data
                   1565:  and the fitting function in one graph, you can display the current state
                   1566:  of the fit.
                   1567:
                   1568:  Once `fit` has finished, the `update` command may be used to store final
                   1569:  values in a file for subsequent use as a parameter file.   See `update`
                   1570:  for details.
                   1571: 3 adjustable parameters
                   1572: ?commands fit parameters
                   1573: ?fit parameters
                   1574: ?commands fit adjustable_parameters
                   1575: ?fit adjustable_parameters
                   1576: ?fit_parameters
                   1577:  There are two ways that `via` can specify the parameters to be adjusted,
                   1578:  either directly on the command line or indirectly, by referencing a
                   1579:  parameter file.  The two use different means to set initial values.
                   1580:
                   1581:  Adjustable parameters can be specified by a comma-separated list of variable
                   1582:  names after the `via` keyword.  Any variable that is not already defined is
                   1583:  is created with an initial value of 1.0.  However, the fit is more likely
                   1584:  to converge rapidly if the variables have been previously declared with more
                   1585:  appropriate starting values.
                   1586:
                   1587:  In a parameter file, each parameter to be varied and a corresponding initial
                   1588:  value are specified, one per line, in the form
                   1589:        varname = value
                   1590:
                   1591:  Comments, marked by '#', and blank lines are permissible.  The
                   1592:  special form
                   1593:        varname = value       # FIXED
                   1594:
                   1595:  means that the variable is treated as a 'fixed parameter', initialized by the
                   1596:  parameter file, but not adjusted by `fit`.  For clarity, it may be useful to
                   1597:  designate variables as fixed parameters so that their values are reported by
                   1598:  `fit`.  The keyword `# FIXED` has to appear in exactly this form.
                   1599:
                   1600: 3 beginner's guide
                   1601: ?commands fit beginners_guide
                   1602: ?fit beginners_guide
                   1603: ?fit guide
                   1604: ?fitting
                   1605:  `fit` is used to find a set of parameters that 'best' fits your data to your
                   1606:  user-defined function.  The fit is judged on the basis of the the sum of the
                   1607:  squared differences or 'residuals' (SSR) between the input data points and
                   1608:  the function values, evaluated at the same places.  This quantity is often
                   1609:  called 'chisquare' (i.e., the Greek letter chi, to the power of 2).  The
                   1610:  algorithm attempts to minimize SSR, or more precisely, WSSR, as the residuals
                   1611:  are 'weighted' by the input data errors (or 1.0) before being squared; see
                   1612:  `fit error_estimates` for details.
                   1613:
                   1614:  That's why it is called 'least-squares fitting'.  Let's look at an example
                   1615:  to see what is meant by 'non-linear', but first we had better go over some
                   1616:  terms.  Here it is convenient to use z as the dependent variable for
                   1617:  user-defined functions of either one independent variable, z=f(x), or two
                   1618:  independent variables, z=f(x,y).  A parameter is a user-defined variable
                   1619:  that `fit` will adjust, i.e., an unknown quantity in the function
                   1620:  declaration.  Linearity/non-linearity refers to the relationship of the
                   1621:  dependent variable, z, to the parameters which `fit` is adjusting, not of
                   1622:  z to the independent variables, x and/or y.  (To be technical, the
                   1623:  second {and higher} derivatives of the fitting function with respect to
                   1624:  the parameters are zero for a linear least-squares problem).
                   1625:
                   1626:  For linear least-squares (LLS), the user-defined function will be a sum of
                   1627:  simple functions, not involving any parameters, each multiplied by one
                   1628:  parameter.  NLLS handles more complicated functions in which parameters can
                   1629:  be used in a large number of ways.  An example that illustrates the
                   1630:  difference between linear and nonlinear least-squares is the Fourier series.
                   1631:  One member may be written as
                   1632:       z=a*sin(c*x) + b*cos(c*x).
                   1633:  If a and b are the unknown parameters and c is constant, then estimating
                   1634:  values of the parameters is a linear least-squares problem.  However, if
                   1635:  c is an unknown parameter, the problem is nonlinear.
                   1636:
                   1637:  In the linear case, parameter values can be determined by comparatively
                   1638:  simple linear algebra, in one direct step.  However LLS is a special case
                   1639:  which is also solved along with more general NLLS problems by the iterative
                   1640:  procedure that `gnuplot` uses.  `fit` attempts to find the minimum by doing
                   1641:  a search.  Each step (iteration) calculates WSSR with a new set of parameter
                   1642:  values.  The Marquardt-Levenberg algorithm selects the parameter values for
                   1643:  the next iteration.  The process continues until a preset criterium is met,
                   1644:  either (1) the fit has "converged" (the relative change in WSSR is less than
                   1645:  FIT_LIMIT), or (2) it reaches a preset iteration count limit, FIT_MAXITER
                   1646:  (see `fit control variables`).  The fit may also be interrupted
                   1647:  and subsequently halted from the keyboard (see `fit`).
                   1648:
                   1649:  Often the function to be fitted will be based on a model (or theory) that
                   1650:  attempts to describe or predict the behaviour of the data.  Then `fit` can
                   1651:  be used to find values for the free parameters of the model, to determine
                   1652:  how well the data fits the model, and to estimate an error range for each
                   1653:  parameter.  See `fit error_estimates`.
                   1654:
                   1655:  Alternatively, in curve-fitting, functions are selected independent of
                   1656:  a model (on the basis of experience as to which are likely to describe
                   1657:  the trend of the data with the desired resolution and a minimum number
                   1658:  of parameters*functions.)  The `fit` solution then provides an analytic
                   1659:  representation of the curve.
                   1660:
                   1661:  However, if all you really want is a smooth curve through your data points,
                   1662:  the `smooth` option to `plot` may be what you've been looking for rather
                   1663:  than `fit`.
                   1664: 3 error estimates
                   1665: ?commands fit error_estimate
                   1666: ?fit error_estimate
                   1667: ?fit errors
                   1668:  In `fit`, the term "error" is used in two different contexts, data error
                   1669:  estimates and parameter error estimates.
                   1670:
                   1671:  Data error estimates are used to calculate the relative weight of each data
                   1672:  point when determining the weighted sum of squared residuals, WSSR or
                   1673:  chisquare.  They can affect the parameter estimates, since they determine
                   1674:  how much influence the deviation of each data point from the fitted function
                   1675:  has on the final values.  Some of the `fit` output information, including
                   1676:  the parameter error estimates, is more meaningful if accurate data error
                   1677:  estimates have been provided.
                   1678:
                   1679:  The 'statistical overview' describes some of the `fit` output and gives some
                   1680:  background for the 'practical guidelines'.
                   1681: 4 statistical overview
                   1682: ?commands fit error statistical_overview
                   1683: ?fit error statistical_overview
                   1684: ?statistical_overview
                   1685:  The theory of non-linear least-squares (NLLS) is generally described in terms
                   1686:  of a normal distribution of errors, that is, the input data is assumed to be
                   1687:  a sample from a population having a given mean and a Gaussian (normal)
                   1688:  distribution about the mean with a given standard deviation.  For a sample of
                   1689:  sufficiently large size, and knowing the population standard deviation, one
                   1690:  can use the statistics of the chisquare distribution to describe a "goodness
                   1691:  of fit" by looking at the variable often called "chisquare".  Here, it is
                   1692:  sufficient to say that a reduced chisquare (chisquare/degrees of freedom,
                   1693:  where degrees of freedom is the number of datapoints less the number of
                   1694:  parameters being fitted) of 1.0 is an indication that the weighted sum of
                   1695:  squared deviations between the fitted function and the data points is the
                   1696:  same as that expected for a random sample from a population characterized by
                   1697:  the function with the current value of the parameters and the given standard
                   1698:  deviations.
                   1699:
                   1700:  If the standard deviation for the population is not constant, as in counting
                   1701:  statistics where variance = counts, then each point should be individually
                   1702:  weighted when comparing the observed sum of deviations and the expected sum
                   1703:  of deviations.
                   1704:
                   1705:  At the conclusion `fit` reports 'stdfit', the standard deviation of the fit,
                   1706:  which is the rms of the residuals, and the variance of the residuals, also
                   1707:  called 'reduced chisquare' when the data points are weighted.  The number of
                   1708:  degrees of freedom (the number of data points minus the number of fitted
                   1709:  parameters) is used in these estimates because the parameters used in
                   1710:  calculating the residuals of the datapoints were obtained from the same data.
                   1711:
                   1712:  To estimate confidence levels for the parameters, one can use the minimum
                   1713:  chisquare obtained from the fit and chisquare statistics to determine the
                   1714:  value of chisquare corresponding to the desired confidence level, but
                   1715:  considerably more calculation is required to determine the combinations of
                   1716:  parameters which produce such values.
                   1717:
                   1718:  Rather than determine confidence intervals, `fit` reports parameter error
                   1719:  estimates which are readily obtained from the variance-covariance matrix
                   1720:  after the final iteration.  By convention, these estimates are called
                   1721:  "standard errors" or "asymptotic standard errors", since they are calculated
                   1722:  in the same way as the standard errors (standard deviation of each parameter)
                   1723:  of a linear least-squares problem, even though the statistical conditions for
                   1724:  designating the quantity calculated to be a standard deviation are not
                   1725:  generally valid for the NLLS problem.  The asymptotic standard errors are
                   1726:  generally over-optimistic and should not be used for determining confidence
                   1727:  levels, but are useful for qualitative purposes.
                   1728:
                   1729:  The final solution also produces a correlation matrix, which gives an
                   1730:  indication of the correlation of parameters in the region of the solution;
                   1731:  if one parameter is changed, increasing chisquare, does changing another
                   1732:  compensate?  The main diagonal elements, autocorrelation, are all 1; if
                   1733:  all parameters were independent, all other elements would be nearly 0.  Two
                   1734:  variables which completely compensate each other would have an off-diagonal
                   1735:  element of unit magnitude, with a sign depending on whether the relation is
                   1736:  proportional or inversely proportional.  The smaller the magnitudes of the
                   1737:  off-diagonal elements, the closer the estimates of the standard deviation
                   1738:  of each parameter would be to the asymptotic standard error.
                   1739: 4 practical guidelines
                   1740: ?commands fit error practical_guidelines
                   1741: ?fit error practical_guidelines
                   1742: ?practical_guidelines
                   1743: ?guidelines
                   1744:  If you have a basis for assigning weights to each data point, doing so lets
                   1745:  you make use of additional knowledge about your measurements, e.g., take into
                   1746:  account that some points may be more reliable than others.  That may affect
                   1747:  the final values of the parameters.
                   1748:
                   1749:  Weighting the data provides a basis for interpreting the additional `fit`
                   1750:  output after the last iteration.  Even if you weight each point equally,
                   1751:  estimating an average standard deviation rather than using a weight of 1
                   1752:  makes WSSR a dimensionless variable, as chisquare is by definition.
                   1753:
                   1754:  Each fit iteration will display information which can be used to evaluate
                   1755:  the progress of the fit.  (An '*' indicates that it did not find a smaller
                   1756:  WSSR and is trying again.)  The 'sum of squares of residuals', also called
                   1757:  'chisquare', is the WSSR between the data and your fitted function; `fit`
                   1758:  has minimized that.  At this stage, with weighted data, chisquare is expected
                   1759:  to approach the number of degrees of freedom (data points minus parameters).
                   1760:  The WSSR can be used to calculate the reduced chisquare (WSSR/ndf) or stdfit,
                   1761:  the standard deviation of the fit, sqrt(WSSR/ndf).  Both of these are
                   1762:  reported for the final WSSR.
                   1763:
                   1764:  If the data are unweighted, stdfit is the rms value of the deviation of the
                   1765:  data from the fitted function, in user units.
                   1766:
                   1767:  If you supplied valid data errors, the number of data points is large enough,
                   1768:  and the model is correct, the reduced chisquare should be about unity.  (For
                   1769:  details, look up the 'chi-squared distribution' in your favourite statistics
                   1770:  reference.)  If so, there are additional tests, beyond the scope of this
                   1771:  overview, for determining how well the model fits the data.
                   1772:
                   1773:  A reduced chisquare much larger than 1.0 may be due to incorrect data error
                   1774:  estimates, data errors not normally distributed, systematic measurement
                   1775:  errors, 'outliers', or an incorrect model function.  A plot of the residuals,
                   1776:  e.g., `plot 'datafile' using 1:($2-f($1))`, may help to show any systematic
                   1777:  trends.  Plotting both the data points and the function may help to suggest
                   1778:  another model.
                   1779:
                   1780:  Similarly, a reduced chisquare less than 1.0 indicates WSSR is less than that
                   1781:  expected for a random sample from the function with normally distributed
                   1782:  errors.  The data error estimates may be too large, the statistical
                   1783:  assumptions may not be justified, or the model function may be too general,
                   1784:  fitting fluctuations in a particular sample in addition to the underlying
                   1785:  trends.  In the latter case, a simpler function may be more appropriate.
                   1786:
                   1787:  You'll have to get used to both `fit` and the kind of problems you apply it
                   1788:  to before you can relate the standard errors to some more practical estimates
                   1789:  of parameter uncertainties or evaluate the significance of the correlation
                   1790:  matrix.
                   1791:
                   1792:  Note that `fit`, in common with most NLLS implementations, minimizes the
                   1793:  weighted sum of squared distances (y-f(x))**2.  It does not provide any means
                   1794:  to account for "errors" in the values of x, only in y.  Also, any "outliers"
                   1795:  (data points outside the normal distribution of the model) will have an
                   1796:  exaggerated effect on the solution.
                   1797: 3 fit controlling
                   1798: ?commands fit_control
                   1799: ?fit_control
                   1800: ?fit control
                   1801:  There are a number of `gnuplot` variables that can be defined to affect
                   1802:  `fit`.  Those which can be defined once `gnuplot` is running are listed
                   1803:  under 'control_variables' while those defined before starting `gnuplot`
                   1804:  are listed under 'environment_variables'.
                   1805: 4 control variables
                   1806: ?commands fit_control variables
                   1807: ?fit_control variables
                   1808: ?fit control variables
                   1809:  The default epsilon limit (1e-5) may be changed by declaring a value for
                   1810:        FIT_LIMIT
                   1811:  When the sum of squared residuals changes between two iteration steps by
                   1812:  a factor less than this number (epsilon), the fit is considered to have
                   1813:  'converged'.
                   1814:
                   1815:  The maximum number of iterations may be limited by declaring a value for
                   1816:        FIT_MAXITER
                   1817:  A value of 0 (or not defining it at all)  means that there is no limit.
                   1818:
                   1819:  If you need even more control about the algorithm, and know the
                   1820:  Marquardt-Levenberg algorithm well, there are some more variables to
                   1821:  influence it. The startup value of `lambda` is normally calculated
                   1822:  automatically from the ML-matrix, but if you want to, you may provide
                   1823:  your own one with
                   1824:        FIT_START_LAMBDA
                   1825:  Specifying FIT_START_LAMBDA as zero or less will re-enable the automatic
                   1826:  selection. The variable
                   1827:        FIT_LAMBDA_FACTOR
                   1828:  gives the factor by which `lambda` is increased or decreased whenever
                   1829:  the chi-squared target function increased or decreased significantly.
                   1830:  Setting FIT_LAMBDA_FACTOR to zero re-enables the default factor of
                   1831:  10.0.
                   1832:
                   1833:  Oher variables with the FIT_ prefix may be added to `fit`, so it is safer
                   1834:  not to use that prefix for user-defined variables.
                   1835:
                   1836:  The variables FIT_SKIP and FIT_INDEX were used by earlier releases of
                   1837:  `gnuplot` with a 'fit' patch called `gnufit` and are no longer available.
                   1838:  The datafile `every` modifier provides the functionality of FIT_SKIP.
                   1839:  FIT_INDEX was used for multi-branch fitting, but multi-branch fitting of
                   1840:  one independent variable is now done as a pseudo-3D fit in which the
                   1841:  second independent variable and `using` are used to specify the branch.
                   1842:  See `fit multi-branch`.
                   1843: 4 environment variables
                   1844: ?commands fit_control environment
                   1845: ?fit_control environment
                   1846: ?fit control environment
                   1847:  The environment variables must be defined before `gnuplot` is executed; how
                   1848:  to do so depends on your operating system.
                   1849:
                   1850:        FIT_LOG
                   1851:  changes the name (and/or path) of the file to which the fit log will be
                   1852:  written from the default of "fit.log" in the working directory.
                   1853:
                   1854:        FIT_SCRIPT
                   1855:  specifies a command that may be executed after an user interrupt. The default
                   1856:  is `replot`, but a `plot` or `load` command may be useful to display a plot
                   1857:  customized to highlight the progress of the fit.
                   1858: 3 multi-branch
                   1859: ?commands fit multi-branch
                   1860: ?fit multi-branch
                   1861: ?multi-branch
                   1862: ?branch
                   1863:  In multi-branch fitting, multiple data sets can be simultaneously fit with
                   1864:  functions of one independent variable having common parameters by minimizing
                   1865:  the total WSSR.  The function and parameters (branch) for each data set are
                   1866:  selected by using a 'pseudo-variable', e.g., either the dataline number (a
                   1867:  'column' index of -1) or the datafile index (-2), as the second independent
                   1868:  variable.
                   1869:
                   1870:  Example:  Given two exponential decays of the form, z=f(x), each describing
                   1871:  a different data set but having a common decay time, estimate the values of
                   1872:  the parameters.  If the datafile has the format x:z:s, then
                   1873:       f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau)
                   1874:       fit f(x,y) 'datafile' using  1:-1:2:3  via a, b, tau
                   1875:
                   1876:  For a more complicated example, see the file "hexa.fnc" used by the
                   1877:  "fit.dem" demo.
                   1878:
                   1879:  Appropriate weighting may be required since unit weights may cause one
                   1880:  branch to predominate if there is a difference in the scale of the dependent
                   1881:  variable.  Fitting each branch separately, using the multi-branch solution
                   1882:  as initial values, may give an indication as to the relative effect of each
                   1883:  branch on the joint solution.
                   1884: 3 starting values
                   1885: ?commands fit starting_values
                   1886: ?fit starting_values
                   1887: ?starting_values
                   1888:  Nonlinear fitting is not guaranteed to converge to the global optimum (the
                   1889:  solution with the smallest sum of squared residuals, SSR), and can get stuck
                   1890:  at a local minimum.  The routine has no way to determine that;  it is up to
                   1891:  you to judge whether this has happened.
                   1892:
                   1893:  `fit` may, and often will get "lost" if started far from a solution, where
                   1894:  SSR is large and changing slowly as the parameters are varied, or it may
                   1895:  reach a numerically unstable region (e.g., too large a number causing a
                   1896:  floating point overflow) which results in an "undefined value" message
                   1897:  or `gnuplot` halting.
                   1898:
                   1899:  To improve the chances of finding the global optimum, you should set the
                   1900:  starting values at least roughly in the vicinity of the solution, e.g.,
                   1901:  within an order of magnitude, if possible.  The closer your starting values
                   1902:  are to the solution, the less chance of stopping at another minimum.  One way
                   1903:  to find starting values is to plot data and the fitting function on the same
                   1904:  graph and change parameter values and `replot` until reasonable similarity
                   1905:  is reached.  The same plot is also useful to check whether the fit stopped at
                   1906:  a minimum with a poor fit.
                   1907:
                   1908:  Of course, a reasonably good fit is not proof there is not a "better" fit (in
                   1909:  either a statistical sense, characterized by an improved goodness-of-fit
                   1910:  criterion, or a physical sense, with a solution more consistent with the
                   1911:  model.)  Depending on the problem, it may be desirable to `fit` with various
                   1912:  sets of starting values, covering a reasonable range for each parameter.
                   1913: 3 tips
                   1914: ?commands fit tips
                   1915: ?fit tips
                   1916: ?tips
                   1917:  Here are some tips to keep in mind to get the most out of `fit`.  They're not
                   1918:  very organized, so you'll have to read them several times until their essence
                   1919:  has sunk in.
                   1920:
                   1921:  The two forms of the `via` argument to `fit` serve two largely distinct
                   1922:  purposes.  The `via "file"` form is best used for (possibly unattended) batch
                   1923:  operation, where you just supply the startup values in a file and can later
                   1924:  use `update` to copy the results back into another (or the same) parameter
                   1925:  file.
                   1926:
                   1927:  The `via var1, var2, ...` form is best used interactively, where the command
                   1928:  history mechanism may be used to edit the list of parameters to be fitted or
                   1929:  to supply new startup values for the next try.  This is particularly useful
                   1930:  for hard problems, where a direct fit to all parameters at once won't work
                   1931:  without good starting values.  To find such, you can iterate several times,
                   1932:  fitting only some of the parameters, until the values are close enough to the
                   1933:  goal that the final fit to all parameters at once will work.
                   1934:
                   1935:  Make sure that there is no mutual dependency among parameters of the function
                   1936:  you are fitting.  For example, don't try to fit a*exp(x+b), because
                   1937:  a*exp(x+b)=a*exp(b)*exp(x).  Instead, fit either a*exp(x) or exp(x+b).
                   1938:
                   1939:  A technical issue:  the parameters must not be too different in magnitude.
                   1940:  The larger the ratio of the largest and the smallest absolute parameter
                   1941:  values, the slower the fit will converge.  If the ratio is close to or above
                   1942:  the inverse of the machine floating point precision, it may take next to
                   1943:  forever to converge, or refuse to converge at all.  You will have to adapt
                   1944:  your function to avoid this, e.g., replace 'parameter' by '1e9*parameter' in
                   1945:  the function definition, and divide the starting value by 1e9.
                   1946:
                   1947:  If you can write your function as a linear combination of simple functions
                   1948:  weighted by the parameters to be fitted, by all means do so.  That helps a
                   1949:  lot, because the problem is no longer nonlinear and should converge with only
                   1950:  a small number of iterations, perhaps just one.
                   1951:
                   1952:  Some prescriptions for analysing data, given in practical experimentation
                   1953:  courses, may have you first fit some functions to your data, perhaps in a
                   1954:  multi-step process of accounting for several aspects of the underlying
                   1955:  theory one by one, and then extract the information you really wanted from
                   1956:  the fitting parameters of those functions.  With `fit`, this may often be
                   1957:  done in one step by writing the model function directly in terms of the
                   1958:  desired parameters.  Transforming data can also quite often be avoided,
                   1959:  though sometimes at the cost of a more difficult fit problem.  If you think
                   1960:  this contradicts the previous paragraph about simplifying the fit function,
                   1961:  you are correct.
                   1962:
                   1963:  A "singular matrix" message indicates that this implementation of the
                   1964:  Marquardt-Levenberg algorithm can't calculate parameter values for the next
                   1965:  iteration.  Try different starting values, writing the function in another
                   1966:  form, or a simpler function.
                   1967:
                   1968:  Finally, a nice quote from the manual of another fitting package (fudgit),
                   1969:  that kind of summarizes all these issues:  "Nonlinear fitting is an art!"
                   1970: 2 help
                   1971: ?commands help
                   1972: ?help
                   1973:  The `help` command displays on-line help. To specify information on a
                   1974:  particular topic use the syntax:
                   1975:
                   1976:        help {<topic>}
                   1977:
                   1978:  If <topic> is not specified, a short message is printed about `gnuplot`.
                   1979:  After help for the requested topic is given, a menu of subtopics is given;
                   1980:  help for a subtopic may be requested by typing its name, extending the help
                   1981:  request.  After that subtopic has been printed, the request may be extended
                   1982:  again or you may go back one level to the previous topic.  Eventually, the
                   1983:  `gnuplot` command line will return.
                   1984:
                   1985:  If a question mark (?) is given as the topic, the list of topics currently
                   1986:  available is printed on the screen.
                   1987: 2 if
                   1988: ?commands if
                   1989: ?if
                   1990:  The `if` command allows commands to be executed conditionally.
                   1991:
                   1992:  Syntax:
                   1993:        if (<condition>) <command-line>
                   1994:
                   1995:  <condition> will be evaluated.  If it is true (non-zero), then the command(s)
                   1996:  of the <command-line> will be executed.  If <condition> is false (zero), then
                   1997:  the entire <command-line> is ignored.  Note that use of `;` to allow multiple
                   1998:  commands on the same line will _not_ end the conditionalized commands.
                   1999:
                   2000:  Examples:
                   2001:        pi=3
                   2002:        if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi
                   2003:  will display:
                   2004:        ?Fixing pi!
                   2005:        3.14159265358979
                   2006:  but
                   2007:        if (1==2) print "Never see this"; print "Or this either"
                   2008:  will not display anything.
                   2009:
                   2010:  See `reread` for an example of how `if` and `reread` can be used together to
                   2011:  perform a loop.
                   2012: 2 load
                   2013: ?commands load
                   2014: ?load
                   2015:  The `load` command executes each line of the specified input file as if it
                   2016:  had been typed in interactively.  Files created by the `save` command can
                   2017:  later be `load`ed.  Any text file containing valid commands can be created
                   2018:  and then executed by the `load` command.  Files being `load`ed may themselves
                   2019:  contain `load` or `call` commands.  See `comment` for information about
                   2020:  comments in commands.  To `load` with arguments, see `call`.
                   2021:
                   2022:  The `load` command _must_ be the last command on a multi-command line.
                   2023:
                   2024:  Syntax:
                   2025:        load "<input-file>"
                   2026:
                   2027:  The name of the input file must be enclosed in quotes.
                   2028:
                   2029:  The special filename "-" may be used to `load` commands from standard input.
                   2030:  This allows a `gnuplot` command file to accept some commands from standard
                   2031:  input.  Please see "help batch/interactive" for more details.
                   2032:
                   2033:  Examples:
                   2034:        load 'work.gnu'
                   2035:        load "func.dat"
                   2036:
                   2037:  The `load` command is performed implicitly on any file names given as
                   2038:  arguments to `gnuplot`.  These are loaded in the order specified, and
                   2039:  then `gnuplot` exits.
                   2040: 2 pause
                   2041: ?commands pause
                   2042: ?pause
                   2043:  The `pause` command displays any text associated with the command and then
                   2044:  waits a specified amount of time or until the carriage return is pressed.
                   2045:  `pause` is especially useful in conjunction with `load` files.
                   2046:
                   2047:  Syntax:
                   2048:        pause <time> {"<string>"}
                   2049:
                   2050:  <time> may be any integer constant or expression.  Choosing -1 will wait
                   2051:  until a carriage return is hit, zero (0) won't pause at all, and a positive
                   2052:  integer will wait the specified number of seconds.  `pause 0` is synonymous
                   2053:  with `print`.
                   2054:
                   2055:  Note: Since `pause` communicates with the operating system rather than the
                   2056:  graphics, it may behave differently with different device drivers (depending
                   2057:  upon how text and graphics are mixed).
                   2058:
                   2059:  Examples:
                   2060:        pause -1    # Wait until a carriage return is hit
                   2061:        pause 3     # Wait three seconds
                   2062:        pause -1  "Hit return to continue"
                   2063:        pause 10  "Isn't this pretty?  It's a cubic spline."
                   2064:
                   2065: 2 plot
                   2066: ?commands plot
                   2067: ?plot
                   2068:  `plot` is the primary command for drawing plots with `gnuplot`.  It creates
                   2069:  plots of functions and data in many, many ways.  `plot` is used to draw 2-d
                   2070:  functions and data; `splot` draws 2-d projections of 3-d surfaces and data.
                   2071:  `plot` and `splot` contain many common features; see `splot` for differences.
                   2072:  Note specifically that `splot`'s `binary` and `matrix` options do not exist
                   2073:  for `plot`.
                   2074:
                   2075:  Syntax:
                   2076:        plot {<ranges>}
                   2077:             {<function> | {"<datafile>" {datafile-modifiers}}}
                   2078:             {axes <axes>} {<title-spec>} {with <style>}
                   2079:             {, {definitions,} <function> ...}
                   2080:
                   2081:  where either a <function> or the name of a data file enclosed in quotes is
                   2082:  supplied.  A function is a mathematical expression or a pair of mathematical
                   2083:  expressions in parametric mode.  The expressions may be defined completely or
                   2084:  in part earlier in the stream of `gnuplot` commands (see `user-defined`).
                   2085:
                   2086:  It is also possible to define functions and parameters on the `plot` command
                   2087:  itself.  This is done merely by isolating them from other items with commas.
                   2088:
                   2089:  There are four possible sets of axes available; the keyword <axes> is used to
                   2090:  select the axes for which a particular line should be scaled.  `x1y1` refers
                   2091:  to the axes on the bottom and left; `x2y2` to those on the top and right;
                   2092:  `x1y2` to those on the bottom and right; and `x2y1` to those on the top and
                   2093:  left.  Ranges specified on the `plot` command apply only to the first set of
                   2094:  axes (bottom left).
                   2095:
                   2096:  Examples:
                   2097:        plot sin(x)
                   2098:        plot f(x) = sin(x*a), a = .2, f(x), a = .4, f(x)
                   2099:        plot [t=1:10] [-pi:pi*2] tan(t), \
                   2100:             "data.1" using (tan($2)):($3/$4) smooth csplines \
                   2101:                      axes x1y2 notitle with lines 5
                   2102:
                   2103: 3 data-file
                   2104: ?commands plot datafile
                   2105: ?plot datafile
                   2106: ?data-file
                   2107: ?datafile
                   2108: ?data
                   2109:  Discrete data contained in a file can be displayed by specifying the name of
                   2110:  the data file (enclosed in single or double quotes) on the `plot` command line.
                   2111:
                   2112:  Syntax:
                   2113:        plot '<file_name>' {index <index list>}
                   2114:                              {every <every list>}
                   2115:                              {thru <thru expression>}
                   2116:                              {using <using list>}
                   2117:                              {smooth <option>}
                   2118:
                   2119:  The modifiers `index`, `every`, `thru`, `using`, and `smooth` are discussed
                   2120:  separately.  In brief, `index` selects which data sets in a multi-data-set
                   2121:  file are to be plotted, `every` specifies which points within a single data
                   2122:  set are to be plotted, `using` determines how the columns within a single
                   2123:  record are to be interpreted (`thru` is a special case of `using`), and
                   2124:  `smooth` allows for simple interpolation and approximation.  ('splot' has a
                   2125:  similar syntax, but does not support the `smooth` and `thru` options.)
                   2126:
                   2127:  Data files should contain at least one data point per record (`using` can
                   2128:  select one data point from the record).  Records beginning with `#` (and
                   2129:  also with `!` on VMS) will be treated as comments and ignored.  Each data
                   2130:  point represents an (x,y) pair.  For `plot`s with error bars (see `set style
                   2131:  errorbars`), each data point is (x,y,ydelta), (x,y,ylow,yhigh), (x,y,xdelta),
                   2132:  (x,y,xlow,xhigh), or (x,y,xlow,xhigh,ylow,yhigh).  In all cases, the numbers
                   2133:  on each record of a data file must be separated by white space (one or more
                   2134:  blanks or tabs), unless a format specifier is provided by the `using` option.
                   2135:  This white space divides each record into columns.
                   2136:
                   2137:  Data may be written in exponential format with the exponent preceded by the
                   2138:  letter e, E, d, D, q, or Q.
                   2139:
                   2140:  Only one column (the y value) need be provided.  If x is omitted, `gnuplot`
                   2141:  provides integer values starting at 0.
                   2142:
                   2143:  In datafiles, blank records (records with no characters other than blanks and
                   2144:  a newline and/or carriage return) are significant---pairs of blank records
                   2145:  separate `index`es (see `plot datafile index`).  Data separated by double
                   2146:  blank records are treated as if they were in separate data files.
                   2147:
                   2148:  Single blank records designate discontinuities in a `plot`; no line will join
                   2149:  points separated by a blank records (if they are plotted with a line style).
                   2150:
                   2151:  If autoscaling has been enabled (`set autoscale`), the axes are automatically
                   2152:  extended to include all datapoints, with a whole number of tic marks if tics
                   2153:  are being drawn.  This has two consequences: i) For `splot`, the corner of
                   2154:  the surface may not coincide with the corner of the base.  In this case, no
                   2155:  vertical line is drawn.  ii) When plotting data with the same x range on a
                   2156:  dual-axis graph, the x coordinates may not coincide if the x2tics are not
                   2157:  being drawn.  This is because the x axis has been autoextended to a whole
                   2158:  number of tics, but the x2 axis has not.  The following example illustrates
                   2159:  the problem:
                   2160:
                   2161:        reset; plot '-', '-'
                   2162:        1 1
                   2163:        19 19
                   2164:        e
                   2165:        1 1
                   2166:        19 19
                   2167:        e
                   2168: 4 every
                   2169: ?commands plot datafile every
                   2170: ?plot datafile every
                   2171: ?plot every
                   2172: ?data-file every
                   2173: ?datafile every
                   2174: ?every
                   2175:  The `every` keyword allows a periodic sampling of a data set to be plotted.
                   2176:
                   2177:  In the discussion a "point" is a datum defined by a single record in the
                   2178:  file; "block" here will mean the same thing as "datablock" (see `glossary`).
                   2179:
                   2180:  Syntax:
                   2181:        plot 'file' every {<point_incr>}
                   2182:                            {:{<block_incr>}
                   2183:                              {:{<start_point>}
                   2184:                                {:{<start_block>}
                   2185:                                  {:{<end_point>}
                   2186:                                    {:<end_block>}}}}}
                   2187:
                   2188:  The data points to be plotted are selected according to a loop from
                   2189:  <`start_point`> to <`end_point`> with increment <`point_incr`> and the
                   2190:  blocks according to a loop from <`start_block`> to <`end_block`> with
                   2191:  increment <`block_incr`>.
                   2192:
                   2193:  The first datum in each block is numbered '0', as is the first block in the
                   2194:  file.
                   2195:
                   2196:  Note that records containing unplottable information are counted.
                   2197:
                   2198:  Any of the numbers can be omitted; the increments default to unity, the start
                   2199:  values to the first point or block, and the end values to the last point or
                   2200:  block.  If `every` is not specified, all points in all lines are plotted.
                   2201:
                   2202:  Examples:
                   2203:        every :::3::3    # selects just the fourth block ('0' is first)
                   2204:        every :::::9     # selects the first 10 blocks
                   2205:        every 2:2        # selects every other point in every other block
                   2206:        every ::5::15    # selects points 5 through 15 in each block
1.1.1.2 ! maekawa  2207: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/simple.html">Simple Plot Demos </a>,
1.1       maekawa  2208: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/surfacea/surfacea.html">Non-parametric splot demos </a>, and
                   2209: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/surfaceb/surfaceb.html">Parametric splot demos.</a>
                   2210: 4 example datafile
                   2211: ?commands plot datafile example
                   2212: ?plot datafile example
                   2213: ?plot example
                   2214: ?datafile example
                   2215: ?data-file example
                   2216: ?example
                   2217:  This example plots the data in the file "population.dat" and a theoretical
                   2218:  curve:
                   2219:
                   2220:        pop(x) = 103*exp((1965-x)/10)
                   2221:        plot [1960:1990] 'population.dat', pop(x)
                   2222:
                   2223:  The file "population.dat" might contain:
                   2224:
                   2225:        # Gnu population in Antarctica since 1965
                   2226:           1965   103
                   2227:           1970   55
                   2228:           1975   34
                   2229:           1980   24
                   2230:           1985   10
                   2231:
                   2232: ^ <img align=bottom src="http://www.nas.nasa.gov/~woo/gnuplot/doc/population.gif" alt="[population.gif]" width=640 height=480>
                   2233: 4 index
                   2234: ?commands plot datafile index
                   2235: ?plot datafile index
                   2236: ?plot index
                   2237: ?data-file index
                   2238: ?datafile index
                   2239: ?index
                   2240:  The `index` keyword allows only some of the data sets in a multi-data-set
                   2241:  file to be plotted.
                   2242:
                   2243:  Syntax:
                   2244:        plot 'file' index <m>{{:<n>}:<p>}
                   2245:
                   2246:  Data sets are separated by pairs of blank records.  `index <m>` selects only
                   2247:  set <m>; `index <m>:<n>` selects sets in the range <m> to <n>; and `index
                   2248:  <m>:<n>:<p>` selects indices <m>, <m>+<p>, <m>+2<p>, etc., but stopping at
                   2249:  <n>.  Following C indexing, the index 0 is assigned to the first data set in
                   2250:  the file.  Specifying too large an index results in an error message.  If
                   2251:  `index` is not specified, all sets are plotted as a single data set.
                   2252:
                   2253:  Example:
                   2254:        plot 'file' index 4:5
1.1.1.2 ! maekawa  2255: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/multimsh.html"> splot with indices demo. </a>
1.1       maekawa  2256: 4 smooth
                   2257: ?commands plot datafile smooth
                   2258: ?plot datafile smooth
                   2259: ?plot smooth
                   2260: ?data-file smooth
                   2261: ?datafile smooth
                   2262: ?smooth
                   2263:  `gnuplot` includes a few general-purpose routines for interpolation and
                   2264:  approximation of data; these are grouped under the `smooth` option.  More
                   2265:  sophisticated data processing may be performed by preprocessing the data
                   2266:  externally or by using `fit` with an appropriate model.
                   2267:
                   2268:  Syntax:
                   2269:        smooth {unique | csplines | acsplines | bezier | sbezier}
                   2270:
                   2271:  `unique` plots the data after making them monotonic.  Each of the other
                   2272:  routines uses the data to determine the coefficients of a continuous curve
                   2273:  between the endpoints of the data.  This curve is then plotted in the same
                   2274:  manner as a function, that is, by finding its value at uniform intervals
                   2275:  along the abscissa (see `set samples`) and connecting these points with
                   2276:  straight line segments (if a line style is chosen).
                   2277:
                   2278:  If `autoscale` is in effect, the ranges will be computed such that the
                   2279:  plotted curve lies within the borders of the graph.
                   2280:
                   2281:  If too few points are available to allow the selected option to be applied,
                   2282:  an error message is produced.  The minimum number is one for `unique`, four
                   2283:  for `acsplines`, and three for the others.
                   2284:
                   2285:  The `smooth` options have no effect on function plots.
                   2286: 5 acsplines
                   2287: ?commands plot datafile smooth acsplines
                   2288: ?plot datafile smooth acsplines
                   2289: ?data-file smooth acsplines
                   2290: ?datafile smooth acsplines
                   2291: ?plot smooth acsplines
                   2292: ?plot acsplines
                   2293: ?smooth acsplines
                   2294: ?acsplines
                   2295:  The `acsplines` option approximates the data with a "natural smoothing spline".
                   2296:  After the data are made monotonic in x (see `smooth unique`), a curve is
                   2297:  piecewise constructed from segments of cubic polynomials whose coefficients
                   2298:  are found by the weighting the data points; the weights are taken from the
                   2299:  third column in the data file.  That default can be modified by the third
                   2300:  entry in the `using` list, e.g.,
                   2301:        plot 'data-file' using 1:2:(1.0) smooth acsplines
                   2302:
                   2303:  Qualitatively, the absolute magnitude of the weights determines the number
                   2304:  of segments used to construct the curve.  If the weights are large, the
                   2305:  effect of each datum is large and the curve approaches that produced by
                   2306:  connecting consecutive points with natural cubic splines.  If the weights are
                   2307:  small, the curve is composed of fewer segments and thus is smoother; the
                   2308:  limiting case is the single segment produced by a weighted linear least
                   2309:  squares fit to all the data.  The smoothing weight can be expressed in terms
                   2310:  of errors as a statistical weight for a point divided by a "smoothing factor"
                   2311:  for the curve so that (standard) errors in the file can be used as smoothing
                   2312:  weights.
                   2313:
                   2314:  Example:
                   2315:        sw(x,S)=1/(x*x*S)
                   2316:        plot 'data_file' using 1:2:(sw($3,100)) smooth acsplines
                   2317: 5 bezier
                   2318: ?commands plot datafile smooth bezier
                   2319: ?plot datafile smooth bezier
                   2320: ?plot smooth bezier
                   2321: ?data-file smooth bezier
                   2322: ?datafile smooth bezier
                   2323: ?plot bezier
                   2324: ?smooth bezier
                   2325: ?bezier
                   2326:  The `bezier` option approximates the data with a Bezier curve of degree n
                   2327:  (the number of data points) that connects the endpoints.
                   2328: 5 csplines
                   2329: ?commands plot datafile smooth csplines
                   2330: ?plot datafile smooth csplines
                   2331: ?plot smooth csplines
                   2332: ?data-file smooth csplines
                   2333: ?datafile smooth csplines
                   2334: ?plot csplines
                   2335: ?smooth csplines
                   2336: ?csplines
                   2337:  The `csplines` option connects consecutive points by natural cubic splines
                   2338:  after rendering the data monotonic (see `smooth unique`).
                   2339: 5 sbezier
                   2340: ?commands plot datafile smooth sbezier
                   2341: ?plot datafile smooth sbezier
                   2342: ?plot smooth sbezier
                   2343: ?data-file smooth sbezier
                   2344: ?datafile smooth sbezier
                   2345: ?plot sbezier
                   2346: ?smooth sbezier
                   2347: ?sbezier
                   2348:  The `sbezier` option first renders the data monotonic (`unique`) and then
                   2349:  applies the `bezier` algorithm.
                   2350: 5 unique
                   2351: ?commands plot datafile smooth unique
                   2352: ?plot datafile smooth unique
                   2353: ?plot smooth unique
                   2354: ?data-file smooth unique
                   2355: ?datafile smooth unique
                   2356: ?plot unique
                   2357: ?smooth unique
                   2358: ?unique
                   2359:  The `unique` option makes the data monotonic in x; points with the same
                   2360:  x-value are replaced by a single point having the average y-value.  The
                   2361:  resulting points are then connected by straight line segments.
1.1.1.2 ! maekawa  2362: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/mgr.html"> See demos. </a>
1.1       maekawa  2363: 4 special-filenames
                   2364: ?commands plot datafile special-filenames
                   2365: ?plot datafile special-filenames
                   2366: ?plot special-filenames
                   2367: ?datafile special-filenames
                   2368: ?special-filenames
                   2369:  A special filename of `'-'` specifies that the data are inline; i.e., they
                   2370:  follow the command.  Only the data follow the command; `plot` options like
                   2371:  filters, titles, and line styles remain on the 'plot' command line.  This is
                   2372:  similar to << in unix shell script, and $DECK in VMS DCL.  The data are
                   2373:  entered as though they are being read from a file, one data point per record.
                   2374:  The letter "e" at the start of the first column terminates data entry.  The
                   2375:  `using` option can be applied to these data---using it to filter them through
                   2376:  a function might make sense, but selecting columns probably doesn't!
                   2377:
                   2378:  `'-'` is intended for situations where it is useful to have data and commands
                   2379:  together, e.g., when `gnuplot` is run as a sub-process of some front-end
                   2380:  application.  Some of the demos, for example, might use this feature.  While
                   2381:  `plot` options such as `index` and `every` are recognized, their use forces
                   2382:  you to enter data that won't be used.  For example, while
                   2383:
                   2384:        plot '-' index 0, '-' index 1
                   2385:        2
                   2386:        4
                   2387:        6
                   2388:
                   2389:
                   2390:        10
                   2391:        12
                   2392:        14
                   2393:        e
                   2394:        2
                   2395:        4
                   2396:        6
                   2397:
                   2398:
                   2399:        10
                   2400:        12
                   2401:        14
                   2402:        e
                   2403:
                   2404:  does indeed work,
                   2405:
                   2406:        plot '-', '-'
                   2407:        2
                   2408:        4
                   2409:        6
                   2410:        e
                   2411:        10
                   2412:        12
                   2413:        14
                   2414:        e
                   2415:
                   2416:  is a lot easier to type.
                   2417:
                   2418:  If you use `'-'` with `replot`, you may need to enter the data more than once
                   2419:  (see `replot`).
                   2420:
                   2421:  A blank filename ('') specifies that the previous filename should be reused.
                   2422:  This can be useful with things like
                   2423:
                   2424:        plot 'a/very/long/filename' using 1:2, '' using 1:3, '' using 1:4
                   2425:
                   2426:  (If you use both `'-'` and `''` on the same `plot` command, you'll need to
                   2427:  have two sets of inline data, as in the example above.)
                   2428:
                   2429:  On some computer systems with a popen function (Unix), the datafile can be
                   2430:  piped through a shell command by starting the file name with a '<'.  For
                   2431:  example,
                   2432:
                   2433:        pop(x) = 103*exp(-x/10)
                   2434:        plot "< awk '{print $1-1965, $2}' population.dat", pop(x)
                   2435:
                   2436:  would plot the same information as the first population example but with
                   2437:  years since 1965 as the x axis.  If you want to execute this example, you
                   2438:  have to delete all comments from the data file above or substitute the
                   2439:  following command for the first part of the command above (the part up to
                   2440:  the comma):
                   2441:
                   2442:        plot "< awk '$0 !~ /^#/ {print $1-1965, $2}' population.dat"
                   2443:
                   2444:  While this approach is most flexible, it is possible to achieve simple
                   2445:  filtering with the `using` or `thru` keywords.
                   2446: 4 thru
                   2447: ?commands plot datafile thru
                   2448: ?plot datafile thru
                   2449: ?plot thru
                   2450: ?data-file thru
                   2451: ?datafile thru
                   2452: ?thru
                   2453:  The `thru` function is provided for backward compatibility.
                   2454:
                   2455:  Syntax:
                   2456:        plot 'file' thru f(x)
                   2457:
                   2458:  It is equivalent to:
                   2459:
                   2460:        plot 'file' using 1:(f($2))
                   2461:
                   2462:  While the latter appears more complex, it is much more flexible.  The more
                   2463:  natural
                   2464:
                   2465:        plot 'file' thru f(y)
                   2466:
                   2467:  also works (i.e. you can use y as the dummy variable).
                   2468:
                   2469:  `thru` is parsed for `splot` and `fit` but has no effect.
                   2470: 4 using
                   2471: ?commands plot datafile using
                   2472: ?plot datafile using
                   2473: ?plot using
                   2474: ?data-file using
                   2475: ?datafile using
                   2476: ?using
                   2477:  The most common datafile modifier is `using`.
                   2478:
                   2479:  Syntax:
                   2480:        plot 'file' using {<entry> {:<entry> {:<entry> ...}}} {'format'}
                   2481:
                   2482:  If a format is specified, each datafile record is read using the C library's
                   2483:  'scanf' function, with the specified format string.  Otherwise the record is
                   2484:  read and broken into columns at spaces or tabs.  A format cannot be specified
                   2485:  if time-format data is being used (this must be done by `set data time`).
                   2486:
                   2487:  The resulting array of data is then sorted into columns according to the
                   2488:  entries.  Each <entry> may be a simple column number, which selects the
                   2489:  datum, an expression enclosed in parentheses, or empty.  The expression can
                   2490:  use $1 to access the first item read, $2 for the second item, and so on.  It
                   2491:  can also use `column(x)` and `valid(x)` where x is an arbitrary expression
                   2492:  resulting in an integer.  `column(x)` returns the x'th datum; `valid(x)`
                   2493:  tests that the datum in the x'th column is a valid number.  A column number
                   2494:  of 0 generates a number increasing (from zero) with each point, and is reset
                   2495:  upon encountering two blank records.  A column number of -1 gives the
                   2496:  dataline number, which starts at 0, increments at single blank records, and
                   2497:  is reset at double blank records.  A column number of -2 gives the index
                   2498:  number, which is incremented only when two blank records are found.  An empty
                   2499:  <entry> will default to its order in the list of entries.  For example,
                   2500:  `using ::4` is interpreted as `using 1:2:4`.
                   2501:
                   2502:  N.B.---the `call` command also uses $'s as a special character.  See `call`
                   2503:  for details about how to include a column number in a `call` argument list.
                   2504:
                   2505:  If the `using` list has but a single entry, that <entry> will be used for y
                   2506:  and the data point number is used for x; for example, "`plot 'file' using 1`"
                   2507:  is identical to "`plot 'file' using 0:1`".  If the `using` list has two
                   2508:  entries, these will be used for x and y.  Additional entries are usually
                   2509:  errors in x and/or y.  See `set style` for details about plotting styles that
                   2510:  make use of error information, and `fit` for use of error information in
                   2511:  curve fitting.
                   2512:
                   2513:  'scanf' accepts several numerical specifications but `gnuplot` requires all
                   2514:  inputs to be double-precision floating-point variables, so `lf` is the only
                   2515:  permissible specifier.  'scanf' expects to see white space---a blank, tab
                   2516:  ("\t"), newline ("\n"), or formfeed ("\f")---between numbers; anything else
                   2517:  in the input stream must be explicitly skipped.
                   2518:
                   2519:  Note that the use of "\t", "\n", or "\f" or requires use of double-quotes
                   2520:  rather than single-quotes.
                   2521:
                   2522:  Examples:
                   2523:
                   2524:  This creates a plot of the sum of the 2nd and 3rd data against the first:
                   2525:  (The format string specifies comma- rather than space-separated columns.)
                   2526:        plot 'file' using 1:($2+$3) '%lf,%lf,%lf'
                   2527:
                   2528:  In this example the data are read from the file "MyData" using a more
                   2529:  complicated format:
                   2530:        plot 'MyData' using "%*lf%lf%*20[^\n]%lf"
                   2531:
                   2532:  The meaning of this format is:
                   2533:
                   2534:        %*lf        ignore a number
                   2535:        %lf         read a double-precision number (x by default)
                   2536:        %*20[^\n]   ignore 20 non-newline characters
                   2537:        %lf         read a double-precision number (y by default)
                   2538:
                   2539:  One trick is to use the ternary `?:` operator to filter data:
                   2540:
                   2541:        plot 'file' using 1:($3>10 ? $2 : 1/0)
                   2542:
                   2543:  which plots the datum in column two against that in column one provided
                   2544:  the datum in column three exceeds ten.  `1/0` is undefined; `gnuplot`
                   2545:  quietly ignores undefined points, so unsuitable points are suppressed.
                   2546:
                   2547:  In fact, you can use a constant expression for the column number, provided it
                   2548:  doesn't start with an opening parenthesis; constructs like `using
                   2549:  0+(complicated expression)` can be used.  The crucial point is that the
                   2550:  expression is evaluated once if it doesn't start with a left parenthesis, or
                   2551:  once for each data point read if it does.
                   2552:
                   2553:  If timeseries data are being used, the time can span multiple columns.  The
                   2554:  starting column should be specified.  Note that the spaces within the time
                   2555:  must be included when calculating starting columns for other data.  E.g., if
                   2556:  the first element on a line is a time with an embedded space, the y value
                   2557:  should be specified as column three.
                   2558:
                   2559:  It should be noted that `plot 'file'`, `plot 'file' using 1:2`, and `plot
                   2560:  'file' using ($1):($2)` can be subtly different: 1) if `file` has some lines
                   2561:  with one column and some with two, the first will invent x values when they
                   2562:  are missing, the second will quietly ignore the lines with one column, and
                   2563:  the third will store an undefined value for lines with one point (so that in
                   2564:  a plot with lines, no line joins points across the bad point); 2) if a line
                   2565:  contains text at the first column, the first will abort the plot on an error,
                   2566:  but the second and third should quietly skip the garbage.
                   2567:
                   2568:  In fact, it is often possible to plot a file with lots of lines of garbage at
                   2569:  the top simply by specifying
                   2570:
                   2571:        plot 'file' using 1:2
                   2572:
                   2573:  However, if you want to leave text in your data files, it is safer to put the
                   2574:  comment character (#) in the first column of the text lines.
1.1.1.2 ! maekawa  2575: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/using.html"> Feeble using demos. </a>
1.1       maekawa  2576: 3 errorbars
                   2577: ?commands plot errorbars
                   2578: ?commands splot errorbars
                   2579: ?plot errorbars
                   2580: ?splot errorbars
                   2581: ?errorbars
                   2582:  Error bars are supported for 2-d data file plots by reading one to four
                   2583:  additional columns (or `using` entries); these additional values are used in
                   2584:  different ways by the various errorbar styles.
                   2585:
                   2586:  In the default situation, `gnuplot` expects to see three, four, or six
                   2587:  numbers on each line of the data file---either
                   2588:
                   2589:        (x, y, ydelta),
                   2590:        (x, y, ylow, yhigh),
                   2591:        (x, y, xdelta),
                   2592:        (x, y, xlow, xhigh),
                   2593:        (x, y, xdelta, ydelta), or
                   2594:        (x, y, xlow, xhigh, ylow, yhigh).
                   2595:
                   2596:  The x coordinate must be specified.  The order of the numbers must be
                   2597:  exactly as given above, though the `using` qualifier can manipulate the order
                   2598:  and provide values for missing columns.  For example,
                   2599:
                   2600:        plot 'file' with errorbars
                   2601:        plot 'file' using 1:2:(sqrt($1)) with xerrorbars
                   2602:        plot 'file' using 1:2:($1-$3):($1+$3):4:5 with xyerrorbars
                   2603:
                   2604:  The last example is for a file containing an unsupported combination of
                   2605:  relative x and absolute y errors.  The `using` entry generates absolute x min
                   2606:  and max from the relative error.
                   2607:
                   2608:  The y error bar is a vertical line plotted from (x, ylow) to (x, yhigh).
                   2609:  If ydelta is specified instead of ylow and yhigh, ylow = y - ydelta and
                   2610:  yhigh = y + ydelta are derived.  If there are only two numbers on the record,
                   2611:  yhigh and ylow are both set to y.  The x error bar is a horizontal line
                   2612:  computed in the same fashion.  To get lines plotted between the data points,
                   2613:  `plot` the data file twice, once with errorbars and once with lines (but
                   2614:  remember to use the `notitle` option on one to avoid two entries in the key).
                   2615:
                   2616:  The error bars have crossbars at each end unless `set bar` is used (see `set
                   2617:  bar` for details).
                   2618:
                   2619:  If autoscaling is on, the ranges will be adjusted to include the error bars.
                   2620: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/errorbar/errorbar.html"> Errorbar demos. </a>
                   2621:
                   2622:  See `plot using`, `plot with`, and `set style` for more information.
                   2623: 3 parametric
                   2624: ?commands plot parametric
                   2625: ?commands splot parametric
                   2626: ?plot parametric
                   2627: ?splot parametric
                   2628: ?parametric
                   2629:  When in parametric mode (`set parametric`) mathematical expressions must be
                   2630:  given in pairs for `plot` and in triplets for `splot`.
                   2631:
                   2632:  Examples:
                   2633:        plot sin(t),t**2
                   2634:        splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
                   2635:
                   2636:  Data files are plotted as before, except any preceding parametric function
                   2637:  must be fully specified before a data file is given as a plot.  In other
                   2638:  words, the x parametric function (`sin(t)` above) and the y parametric
                   2639:  function (`t**2` above) must not be interrupted with any modifiers or data
                   2640:  functions; doing so will generate a syntax error stating that the parametric
                   2641:  function is not fully specified.
                   2642:
                   2643:  Other modifiers, such as `with` and `title`, may be specified only after the
                   2644:  parametric function has been completed:
                   2645:
                   2646:        plot sin(t),t**2 title 'Parametric example' with linespoints
1.1.1.2 ! maekawa  2647: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/param.html"> Parametric Mode Demos. </a>
1.1       maekawa  2648: 3 ranges
                   2649: ?commands plot ranges
                   2650: ?commands splot ranges
                   2651: ?plot ranges
                   2652: ?splot ranges
                   2653: ?ranges
                   2654:  The optional ranges specify the region of the graph that will be displayed.
                   2655:
                   2656:  Syntax:
                   2657:        [{<dummy-var>=}{{<min>}:{<max>}}]
                   2658:        [{{<min>}:{<max>}}]
                   2659:
                   2660:  The first form applies to the independent variable (`xrange` or `trange`, if
                   2661:  in parametric mode).  The second form applies to the dependent variable
                   2662:  `yrange` (and `xrange`, too, if in parametric mode).  <dummy-var> is a new
                   2663:  name for the independent variable.  (The defaults may be changed with `set
                   2664:  dummy`.)  The optional <min> and <max> terms can be constant expressions or *.
                   2665:
                   2666:  In non-parametric mode, the order in which ranges must be given is `xrange`
                   2667:  and `yrange`.
                   2668:
                   2669:  In parametric mode, the order for the `plot` command is `trange`, `xrange`,
                   2670:  and `yrange`.  The following `plot` command shows setting the `trange` to
                   2671:  [-pi:pi], the `xrange` to [-1.3:1.3] and the `yrange` to [-1:1] for the
                   2672:  duration of the graph:
                   2673:
                   2674:        plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
                   2675:
                   2676:  Note that the x2range and y2range cannot be specified here---`set x2range`
                   2677:  and `set y2range` must be used.
                   2678:
                   2679:  Ranges are interpreted in the order listed above for the appropriate mode.
                   2680:  Once all those needed are specified, no further ones must be listed, but
                   2681:  unneeded ones cannot be skipped---use an empty range `[]` as a placeholder.
                   2682:
                   2683:  `*` can be used to allow autoscaling of either of min and max.  See also
                   2684:  `set autoscale`.
                   2685:
                   2686:  Ranges specified on the `plot` or `splot` command line affect only that
                   2687:  graph; use the `set xrange`, `set yrange`, etc., commands to change the
                   2688:  default ranges for future graphs.
                   2689:
                   2690:  With time data, you must provide the range (in the same manner as the time
                   2691:  appears in the datafile) within quotes.  `gnuplot` uses the `timefmt` string
                   2692:  to read the value---see `set timefmt`.
                   2693:
                   2694:  Examples:
                   2695:
                   2696:  This uses the current ranges:
                   2697:        plot cos(x)
                   2698:
                   2699:  This sets the x range only:
                   2700:        plot [-10:30] sin(pi*x)/(pi*x)
                   2701:
                   2702:  This is the same, but uses t as the dummy-variable:
                   2703:        plot [t = -10 :30]  sin(pi*t)/(pi*t)
                   2704:
                   2705:  This sets both the x and y ranges:
                   2706:        plot [-pi:pi] [-3:3]  tan(x), 1/x
                   2707:
                   2708:  This sets only the y range, and turns off autoscaling on both axes:
                   2709:        plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)
                   2710:
                   2711:  This sets xmax and ymin only:
                   2712:        plot [:200] [-pi:]  exp(sin(x))
                   2713:
                   2714:  This sets the x range for a timeseries:
                   2715:        set timefmt "%d/%m/%y %H:%M"
                   2716:        plot ["1/6/93 12:00":"5/6/93 12:00"] 'timedata.dat'
                   2717:
                   2718: ^<a href="http://www.nas.nasa.gov/~woo/gnuplot/ranges/ranges.html"> See Demo. </a>
                   2719: 3 title
                   2720: ?commands plot title
                   2721: ?commands splot title
                   2722: ?plot title
                   2723: ?splot title
                   2724:  A line title for each function and data set appears in the key, accompanied
                   2725:  by a sample of the line and/or symbol used to represent it.  It can be
                   2726:  changed by using the `title` option.
                   2727:
                   2728:  Syntax:
                   2729:        title "<title>" | notitle
                   2730:
                   2731:  where <title> is the new title of the line and must be enclosed in quotes.
                   2732:  The quotes will not be shown in the key.  A special character may be given as
                   2733:  a backslash followed by its octal value ("\345").  The tab character "\t" is
                   2734:  understood.  Note that backslash processing occurs only for strings enclosed
                   2735:  in double quotes---use single quotes to prevent such processing.  The newline
                   2736:  character "\n" is not processed in key entries in either type of string.
                   2737:
                   2738:  The line title and sample can be omitted from the key by using the keyword
                   2739:  `notitle`.  A null title (`title ''`) is equivalent to `notitle`.  If only
                   2740:  the sample is wanted, use one or more blanks (`title ' '`).
                   2741:
                   2742:  By default the line title is the function or file name as it appears on the
                   2743:  `plot` command.  If it is a file name, any datafile modifiers specified will
                   2744:  be included in the default title.
                   2745:
                   2746:  The layout of the key itself (position, title justification, etc.) can be
                   2747:  controlled by `set key`.  Please see `set key` for details.
                   2748:
                   2749:  Examples:
                   2750:
                   2751:  This plots y=x with the title 'x':
                   2752:        plot x
                   2753:
                   2754:  This plots x squared with title "x^2" and file "data.1" with title
                   2755:  "measured data":
                   2756:        plot x**2 title "x^2", 'data.1' t "measured data"
                   2757:
                   2758:  This puts an untitled circular border around a polar graph:
                   2759:        set polar; plot my_function(t), 1 notitle
                   2760: 3 with
                   2761: ?commands plot with
                   2762: ?commands splot with
                   2763: ?commands plot style
                   2764: ?commands splot style
                   2765: ?plot with
                   2766: ?plot style
                   2767: ?splot with
                   2768: ?splot style
                   2769: ?style
                   2770: ?with
                   2771:  Functions and data may be displayed in one of a large number of styles.
                   2772:  The `with` keyword provides the means of selection.
                   2773:
                   2774:  Syntax:
                   2775:        with <style> { {linestyle | ls <line_style>}
                   2776:                       | {{linetype | lt <line_type>}
                   2777:                          {linewidth | lw <line_width>}
                   2778:                          {pointtype | pt <point_type>}
                   2779:                          {pointsize | ps <point_size>}} }
                   2780:
                   2781:  where <style> is either `lines`, `points`, `linespoints`, `impulses`, `dots`,
                   2782:  `steps`, `fsteps`, `histeps`, `errorbars`, `xerrorbars`, `yerrorbars`,
                   2783:  `xyerrorbars`, `boxes`, `boxerrorbars`, `boxxyerrorbars`, `financebars`,
                   2784:  `candlesticks` or `vector`.  Some of these styles require additional
                   2785:  information.  See `set style <style>` for details of each style.
                   2786:
                   2787:  Default styles are chosen with the `set function style` and `set data style`
                   2788:  commands.
                   2789:
                   2790:  By default, each function and data file will use a different line type and
                   2791:  point type, up to the maximum number of available types.  All terminal
                   2792:  drivers support at least six different point types, and re-use them, in
                   2793:  order, if more are required.  The LaTeX driver supplies an additional six
                   2794:  point types (all variants of a circle), and thus will only repeat after 12
                   2795:  curves are plotted with points.  The PostScript drivers (`postscript`)
                   2796:  supplies a total of 64.
                   2797:
                   2798:  If you wish to choose the line or point type for a single plot, <line_type>
                   2799:  and <point_type> may be specified.  These are positive integer constants (or
                   2800:  expressions) that specify the line type and point type to be used for the
                   2801:  plot.  Use `test` to display the types available for your terminal.
                   2802:
                   2803:  You may also scale the line width and point size for a plot by using
                   2804:  <line_width> and <point_size>, which are specified relative to the default
                   2805:  values for each terminal.  The pointsize may also be altered globally---see
                   2806:  `set pointsize` for details.  But note that both <point_size> as set here and
                   2807:  as set by `set pointsize` multiply the default point size---their effects are
                   2808:  not cumulative.  That is, `set pointsize 2; plot x w p ps 3` will use points
                   2809:  three times default size, not six.
                   2810:
                   2811:  If you have defined specific line type/width and point type/size combinations
                   2812:  with `set linestyle`, one of these may be selected by setting <line_style> to
                   2813:  the index of the desired style.
                   2814:
                   2815:  The keywords may be abbreviated as indicated.
                   2816:
                   2817:  Note that the `linewidth` and `pointsize` options are not supported by all
                   2818:  terminals.
                   2819:
                   2820:  Examples:
                   2821:
                   2822:  This plots sin(x) with impulses:
                   2823:        plot sin(x) with impulses
                   2824:
                   2825:  This plots x with points, x**2 with the default:
                   2826:        plot x*y w points, x**2 + y**2
                   2827:
                   2828:  This plots tan(x) with the default function style, file "data.1" with lines:
                   2829:        plot [ ] [-2:5] tan(x), 'data.1' with l
                   2830:
                   2831:  This plots "leastsq.dat" with impulses:
                   2832:        plot 'leastsq.dat' w i
                   2833:
                   2834:  This plots the data file "population" with boxes:
                   2835:        plot 'population' with boxes
                   2836:
                   2837:  This plots "exper.dat" with errorbars and lines connecting the points
                   2838:  (errorbars require three or four columns):
                   2839:        plot 'exper.dat' w lines, 'exper.dat' notitle w errorbars
                   2840:
                   2841:  This plots sin(x) and cos(x) with linespoints, using the same line type but
                   2842:  different point types:
                   2843:        plot sin(x) with linesp lt 1 pt 3, cos(x) with linesp lt 1 pt 4
                   2844:
                   2845:  This plots file "data" with points of type 3 and twice usual size:
                   2846:        plot 'data' with points pointtype 3 pointsize 2
                   2847:
                   2848:  This plots two data sets with lines differing only by weight:
                   2849:        plot 'd1' t "good" w l lt 2 lw 3, 'd2' t "bad" w l lt 2 lw 1
                   2850:
                   2851:  See `set style` to change the default styles.
                   2852: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/styles/styles.html"> Styles demos. </a>
                   2853: 2 print
                   2854: ?commands print
                   2855: ?print
                   2856:  The `print` command prints the value of <expression> to the screen.  It is
                   2857:  synonymous with `pause 0`.  <expression> may be anything that `gnuplot` can
                   2858:  evaluate that produces a number, or it can be a string.
                   2859:
                   2860:  Syntax:
                   2861:        print <expression> {, <expression>, ...}
                   2862:
                   2863:  See `expressions`.
                   2864: 2 pwd
                   2865: ?commands pwd
                   2866: ?pwd
                   2867:  The `pwd` command prints the name of the working directory to the screen.
                   2868: 2 quit
                   2869: ?commands quit
                   2870: ?quit
                   2871:  The `exit` and `quit` commands and END-OF-FILE character will exit `gnuplot`.
                   2872:  Each of these commands will clear the output device (as does the `clear`
                   2873:  command) before exiting.
                   2874: 2 replot
                   2875: ?commands replot
                   2876: ?replot
                   2877:  The `replot` command without arguments repeats the last `plot` or `splot`
                   2878:  command.  This can be useful for viewing a plot with different `set` options,
                   2879:  or when generating the same plot for several devices.
                   2880:
                   2881:  Arguments specified after a `replot` command will be added onto the last
                   2882:  `plot` or `splot` command (with an implied ',' separator) before it is
                   2883:  repeated.  `replot` accepts the same arguments as the `plot` and `splot`
                   2884:  commands except that ranges cannot be specified.  Thus you can use `replot`
                   2885:  to plot a function against the second axes if the previous command was `plot`
                   2886:  but not if it was `splot`, and similarly you can use `replot` to add a plot
                   2887:  from a binary file only if the previous command was `splot`.
                   2888:
                   2889:  N.B.---use of
                   2890:
                   2891:        plot '-' ; ... ; replot
                   2892:
                   2893:  is not recommended.  `gnuplot` does not store the inline data internally, so
                   2894:  since `replot` appends new information to the previous `plot` and then
                   2895:  executes the modified command, the `'-'` from the initial `plot` will expect
                   2896:  to read inline data again.
                   2897:
                   2898:  Note that `replot` does not work in `multiplot` mode, since it reproduces
                   2899:  only the last plot rather than the entire screen.
                   2900:
                   2901:  See also `command-line-editing` for ways to edit the last `plot` (`splot`)
                   2902:  command.
                   2903: 2 reread
                   2904: ?commands reread
                   2905: ?reread
                   2906:  The `reread` command causes the current `gnuplot` command file, as specified
                   2907:  by a `load` command or on the command line, to be reset to its starting
                   2908:  point before further commands are read from it.  This essentially implements
                   2909:  an endless loop of the commands from the beginning of the command file to
                   2910:  the `reread` command.  (But this is not necessarily a disaster---`reread` can
                   2911:  be very useful when used in conjunction with `if`.  See `if` for details.)
                   2912:  The `reread` command has no effect if input from standard input.
                   2913:
                   2914:  Examples:
                   2915:
                   2916:  Suppose the file "looper" contains the commands
                   2917:        a=a+1
                   2918:        plot sin(x*a)
                   2919:        pause -1
                   2920:        if(a<5) reread
                   2921:  and from within `gnuplot` you submit the commands
                   2922:        a=0
                   2923:        load 'looper'
                   2924:  The result will be four plots (separated by the `pause` message).
                   2925:
                   2926:  Suppose the file "data" contains six columns of numbers with a total yrange
                   2927:  from 0 to 10; the first is x and the next are five different functions of x.
                   2928:  Suppose also that the file "plotter" contains the commands
                   2929:        c_p = c_p+1
                   2930:        plot "$0" using 1:c_p with lines linetype c_p
                   2931:        if(c_p <  n_p) reread
                   2932:  and from within `gnuplot` you submit the commands
                   2933:        n_p=6
                   2934:        c_p=1
                   2935:        set nokey
                   2936:        set yrange [0:10]
                   2937:        set multiplot
                   2938:        call 'plotter' 'data'
                   2939:        set nomultiplot
                   2940:  The result is a single graph consisting of five plots.  The yrange must be
                   2941:  set explicitly to guarantee that the five separate graphs (drawn on top of
                   2942:  each other in multiplot mode) will have exactly the same axes.  The linetype
                   2943:  must be specified; otherwise all the plots would be drawn with the same type.
1.1.1.2 ! maekawa  2944: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/animate.html"> Reread Animation Demo</a>
1.1       maekawa  2945: 2 reset
                   2946: ?commands reset
                   2947: ?reset
                   2948:  The `reset` command causes all options that can be set with the `set`
                   2949:  command to take on their default values.  The only exceptions are that the
                   2950:  terminal set with `set term` and the output file set with `set output` are
                   2951:  left unchanged.  This command is useful, e.g., to restore the default
                   2952:  settings at the end of a command file, or to return to a defined state after
                   2953:  lots of settings have been changed within a command file.  Please refer to
                   2954:  the `set` command to see the default values that the various options take.
                   2955: 2 save
                   2956: ?commands save
                   2957: ?save
                   2958:  The `save` command saves user-defined functions, variables, `set` options,
                   2959:  or all three, plus the last `plot` (`splot`) command to the specified file.
                   2960:
                   2961:  Syntax:
                   2962:        save  {<option>} '<filename>'
                   2963:
                   2964:  where <option> is `functions`, `variables` or `set`. If no option is used,
                   2965:  `gnuplot` saves functions, variables, `set` options and the last `plot`
                   2966:  (`splot`) command.
                   2967:
                   2968:  `save`d files are written in text format and may be read by the `load`
                   2969:  command.
                   2970:
                   2971:  The filename must be enclosed in quotes.
                   2972:
                   2973:  Examples:
                   2974:        save 'work.gnu'
                   2975:        save functions 'func.dat'
                   2976:        save var 'var.dat'
                   2977:        save set 'options.dat'
                   2978: 2 set-show
                   2979: ?commands set
                   2980: ?commands show
                   2981: ?set
                   2982: ?show
                   2983: ?show all
                   2984:  The `set` command can be used to sets _lots_ of options.  No screen is
                   2985:  drawn, however, until a `plot`, `splot`, or `replot` command is given.
                   2986:
                   2987:  The `show` command shows their settings;  `show all` shows all the
                   2988:  settings.
                   2989:
                   2990:  If a variable contains time/date data, `show` will display it according to
                   2991:  the format currently defined by `set timefmt`, even if that was not in effect
                   2992:  when the variable was initially defined.
                   2993: 3 angles
                   2994: ?commands set angles
                   2995: ?commands show angles
                   2996: ?set angles
                   2997: ?show angles
                   2998: ?angles
                   2999: ?commands set angles degrees
                   3000: ?set angles degrees
                   3001: ?angles degrees
                   3002: ?degrees
                   3003:  By default, `gnuplot` assumes the independent variable in polar graphs is in
                   3004:  units of radians.  If `set angles degrees` is specified before `set polar`,
                   3005:  then the default range is [0:360] and the independent variable has units of
                   3006:  degrees.  This is particularly useful for plots of data files.  The angle
                   3007:  setting also applies to 3-d mapping as set via the `set mapping` command.
                   3008:
                   3009:  Syntax:
                   3010:        set angles {degrees | radians}
                   3011:        show angles
                   3012:
                   3013:  The angle specified in `set grid polar` is also read and displayed in the
                   3014:  units specified by `set angles`.
                   3015:
                   3016:  `set angles` also affects the arguments of the machine-defined functions
                   3017:  sin(x), cos(x) and tan(x), and the outputs of asin(x), acos(x), atan(x),
                   3018:  atan2(x), and arg(x).  It has no effect on the arguments of hyperbolic
                   3019:  functions or Bessel functions.  However, the output arguments of inverse
                   3020:  hyperbolic functions of complex arguments are affected; if these functions
                   3021:  are used, `set angles radians` must be in effect to maintain consistency
                   3022:  between input and output arguments.
                   3023:
                   3024:        x={1.0,0.1}
                   3025:        set angles radians
                   3026:        y=sinh(x)
                   3027:        print y         #prints {1.16933, 0.154051}
                   3028:        print asinh(y)  #prints {1.0, 0.1}
                   3029:  but
                   3030:        set angles degrees
                   3031:        y=sinh(x)
                   3032:        print y         #prints {1.16933, 0.154051}
                   3033:        print asinh(y)  #prints {57.29578, 5.729578}
1.1.1.2 ! maekawa  3034: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/poldat.html"> Polar plot using `set angles`. </a>
1.1       maekawa  3035: 3 arrow
                   3036: ?commands set arrow
                   3037: ?commands set noarrow
                   3038: ?commands show arrow
                   3039: ?set arrow
                   3040: ?set noarrow
                   3041: ?show arrow
                   3042: ?arrow
                   3043: ?noarrow
                   3044:  Arbitrary arrows can be placed on a plot using the `set arrow` command.
                   3045:
                   3046:  Syntax:
                   3047:        set arrow {<tag>} {from <position>} {to <position>} {{no}head}
                   3048:                  { {linestyle | ls <line_style>}
                   3049:                    | {linetype | lt <line_type>}
                   3050:                      {linewidth | lw <line_width} }
                   3051:        set noarrow {<tag>}
                   3052:        show arrow
                   3053:
                   3054:  <tag> is an integer that identifies the arrow.  If no tag is given, the
                   3055:  lowest unused tag value is assigned automatically.  The tag can be used to
                   3056:  delete or change a specific arrow.  To change any attribute of an existing
                   3057:  arrow, use the `set arrow` command with the appropriate tag and specify the
                   3058:  parts of the arrow to be changed.
                   3059:
                   3060:  The <position>s are specified by either x,y or x,y,z, and may be preceded by
                   3061:  `first`, `second`, `graph`, or `screen` to select the coordinate system.
                   3062:  Unspecified coordinates default to 0.  The endpoints can be specified in
                   3063:  one of four coordinate systems---`first` or `second` axes, `graph` or
                   3064:  `screen`.  See `coordinates` for details.  A coordinate system specifier
                   3065:  does not carry over from the "from" position to the "to" position.  Arrows
                   3066:  outside the screen boundaries are permitted but may cause device errors.
                   3067:
                   3068:  Specifying `nohead` produces an arrow drawn without a head---a line segment.
                   3069:  This gives you yet another way to draw a line segment on the plot.  By
                   3070:  default, arrows have heads.
                   3071:
                   3072:  The line style may be selected from a user-defined list of line styles (see
                   3073:  `set linestyle`) or may be defined here by providing values for <line_type>
                   3074:  (an index from the default list of styles) and/or <line_width> (which is a
                   3075:  multiplier for the default width).
                   3076:
                   3077:  Note, however, that if a user-defined line style has been selected, its
                   3078:  properties (type and width) cannot be altered merely by issuing another
                   3079:  `set arrow` command with the appropriate index and `lt` or `lw`.
                   3080:
                   3081:  Examples:
                   3082:
                   3083:  To set an arrow pointing from the origin to (1,2) with user-defined style 5,
                   3084:  use:
                   3085:        set arrow to 1,2 ls 5
                   3086:
                   3087:  To set an arrow from bottom left of plotting area to (-5,5,3), and tag the
                   3088:  arrow number 3, use:
                   3089:        set arrow 3 from graph 0,0 to -5,5,3
                   3090:
                   3091:  To change the preceding arrow to end at 1,1,1, without an arrow head and
                   3092:  double its width, use:
                   3093:        set arrow 3 to 1,1,1 nohead lw 2
                   3094:
                   3095:  To draw a vertical line from the bottom to the top of the graph at x=3, use:
                   3096:        set arrow from 3, graph 0 to 3, graph 1 nohead
                   3097:
                   3098:  To delete arrow number 2, use:
                   3099:        set noarrow 2
                   3100:
                   3101:  To delete all arrows, use:
                   3102:        set noarrow
                   3103:
                   3104:  To show all arrows (in tag order), use:
                   3105:        show arrow
                   3106: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/arrows/arrows.html"> Arrows Demos. </a>
                   3107: 3 autoscale
                   3108: ?commands set autoscale
                   3109: ?commands set noautoscale
                   3110: ?commands show autoscale
                   3111: ?set autoscale
                   3112: ?set noautoscale
                   3113: ?show autoscale
                   3114: ?autoscale
                   3115: ?noautoscale
                   3116:  Autoscaling may be set individually on the x, y or z axis or globally on all
                   3117:  axes. The default is to autoscale all axes.
                   3118:
                   3119:  Syntax:
                   3120:        set autoscale {<axes>{min|max}}
                   3121:        set noautoscale {<axes>{min|max}}
                   3122:        show autoscale
                   3123:
                   3124:  where <axes> is either `x`, `y`, `z`, `x2`, `y2` or `xy`.  A keyword with
                   3125:  `min` or `max` appended (this cannot be done with `xy`) tells `gnuplot` to
                   3126:  autoscale just the minimum or maximum of that axis.  If no keyword is given,
                   3127:  all axes are autoscaled.
                   3128:
                   3129:  When autoscaling, the axis range is automatically computed and the dependent
                   3130:  axis (y for a `plot` and z for `splot`) is scaled to include the range of the
                   3131:  function or data being plotted.
                   3132:
                   3133:  If autoscaling of the dependent axis (y or z) is not set, the current y or z
                   3134:  range is used.
                   3135:
                   3136:  Autoscaling the independent variables (x for `plot` and x,y for `splot`) is a
                   3137:  request to set the domain to match any data file being plotted.  If there are
                   3138:  no data files, autoscaling an independent variable has no effect.  In other
                   3139:  words, in the absence of a data file, functions alone do not affect the x
                   3140:  range (or the y range if plotting z = f(x,y)).
                   3141:
                   3142:  Please see `set xrange` for additional information about ranges.
                   3143:
                   3144:  The behavior of autoscaling remains consistent in parametric mode, (see `set
                   3145:  parametric`).  However, there are more dependent variables and hence more
                   3146:  control over x, y, and z axis scales.  In parametric mode, the independent or
                   3147:  dummy variable is t for `plot`s and u,v for `splot`s.  `autoscale` in
                   3148:  parametric mode, then, controls all ranges (t, u, v, x, y, and z) and allows
                   3149:  x, y, and z to be fully autoscaled.
                   3150:
                   3151:  Autoscaling works the same way for polar mode as it does for parametric mode
                   3152:  for `plot`, with the extension that in polar mode `set dummy` can be used to
                   3153:  change the independent variable from t (see `set dummy`).
                   3154:
                   3155:  When tics are displayed on second axes but no plot has been specified for
                   3156:  those axes, x2range and y2range are inherited from xrange and yrange.  This
                   3157:  is done _before_ xrange and yrange are autoextended to a whole number of
                   3158:  tics, which can cause unexpected results.
                   3159:
                   3160:  Examples:
                   3161:
                   3162:  This sets autoscaling of the y axis (other axes are not affected):
                   3163:        set autoscale y
                   3164:
                   3165:  This sets autoscaling only for the minimum of the y axis (the maximum of the
                   3166:  y axis and the other axes are not affected):
                   3167:        set autoscale ymin
                   3168:
                   3169:  This sets autoscaling of the x and y axes:
                   3170:        set autoscale xy
                   3171:
                   3172:  This sets autoscaling of the x, y, z, x2 and y2 axes:
                   3173:        set autoscale
                   3174:
                   3175:  This disables autoscaling of the x, y, z, x2 and y2 axes:
                   3176:        set noautoscale
                   3177:
                   3178:  This disables autoscaling of the z axis only:
                   3179:        set noautoscale z
                   3180: 4 parametric mode
                   3181: ?commands set autoscale parametric
                   3182: ?set autoscale parametric
                   3183: ?set autoscale t
                   3184:  When in parametric mode (`set parametric`), the xrange is as fully scalable
                   3185:  as the y range.  In other words, in parametric mode the x axis can be
                   3186:  automatically scaled to fit the range of the parametric function that is
                   3187:  being plotted.  Of course, the y axis can also be automatically scaled just
                   3188:  as in the non-parametric case.  If autoscaling on the x axis is not set, the
                   3189:  current x range is used.
                   3190:
                   3191:  Data files are plotted the same in parametric and non-parametric mode.
                   3192:  However, there is a difference in mixed function and data plots: in
                   3193:  non-parametric mode with autoscaled x, the x range of the datafile controls
                   3194:  the x range of the functions; in parametric mode it has no influence.
                   3195:
                   3196:  For completeness a last command `set autoscale t` is accepted.  However, the
                   3197:  effect of this "scaling" is very minor.  When `gnuplot` determines that the
                   3198:  t range would be empty, it makes a small adjustment if autoscaling is true.
                   3199:  Otherwise, `gnuplot` gives an error.  Such behavior may, in fact, not be very
                   3200:  useful and the command `set autoscale t` is certainly questionable.
                   3201:
                   3202:  `splot` extends the above ideas as you would expect.  If autoscaling is set,
                   3203:  then x, y, and z ranges are computed and each axis scaled to fit the
                   3204:  resulting data.
                   3205: 4 polar mode
                   3206: ?commands set autoscale polar
                   3207: ?set autoscale polar
                   3208: ?set autoscale t
                   3209:  When in polar mode (`set polar`), the xrange and the yrange are both found
                   3210:  from the polar coordinates, and thus they can both be automatically scaled.
                   3211:  In other words, in polar mode both the x and y axes can be automatically
                   3212:  scaled to fit the ranges of the polar function that is being plotted.
                   3213:
                   3214:  When plotting functions in polar mode, the rrange may be autoscaled.  When
                   3215:  plotting data files in polar mode, the trange may also be autoscaled.  Note
                   3216:  that if the trange is contained within one quadrant, autoscaling will produce
                   3217:  a polar plot of only that single quadrant.
                   3218:
                   3219:  Explicitly setting one or two ranges but not others may lead to unexpected
                   3220:  results.
1.1.1.2 ! maekawa  3221: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/poldat.html"> See polar demos </a>
1.1       maekawa  3222: 3 bar
                   3223: ?commands set bar
                   3224: ?commands show bar
                   3225: ?set bar
                   3226: ?show bar
                   3227:  The `set bar` command controls the tics at the ends of errorbars.
                   3228:
                   3229:  Syntax:
                   3230:        set bar {small | large | <size>}
                   3231:        show bar
                   3232:
                   3233:  `small` is a synonym for 0.0, and `large` for 1.0.
                   3234:  The default is 1.0 if no size is given.
                   3235: 3 bmargin
                   3236: ?commands set bmargin
                   3237: ?set bmargin
                   3238: ?bmargin
                   3239:  The command `set bmargin` sets the size of the bottom margin.  Please see
                   3240:  `set margin` for details.
                   3241: 3 border
                   3242: ?commands set border
                   3243: ?commands set noborder
                   3244: ?commands show border
                   3245: ?set border
                   3246: ?set noborder
                   3247: ?show border
                   3248: ?border
                   3249: ?noborder
                   3250:  The `set border` and `set noborder` commands control the display of the graph
                   3251:  borders for the `plot` and `splot` commands.
                   3252:
                   3253:  Syntax:
                   3254:        set border {<integer> { {linestyle | ls <line_style>}
                   3255:                                | {linetype | lt <line_type> }
                   3256:                                  {linewidth | lw <line_width>} } }
                   3257:        set noborder
                   3258:        show border
                   3259:
                   3260:  The borders are encoded in a 12-bit integer: the bottom four bits control the
                   3261:  border for `plot` and the sides of the base for `splot`; The next four bits
                   3262:  control the verticals in `splot`; the top four bits control the edges on top
                   3263:  of the `splot`.  In detail, the `<integer>` should be the sum of the
                   3264:  appropriate entries from the following table:
                   3265:
                   3266: @start table - first is interactive cleartext form
                   3267:                          plot border     splot         splot
                   3268:            Side          splot base    verticals        top
                   3269:        bottom (south)         1            16           256
                   3270:        left   (west)          2            32           512
                   3271:        top    (north)         4            64          1024
                   3272:        right  (east)          8           128          2048
                   3273: #\begin{tabular}{|cc|ccc|} \hline
                   3274: #\multicolumn{5}{|c|}{Graph Border Encoding} \\ \hline \hline
                   3275: # & & \multicolumn{3}{|c|}{Integer value of selection bit} \\ \cline{3-5}
                   3276: # & & plot border & splot & splot \\
                   3277: #\multicolumn{2}{|c|}{Side}& splot base & verticals & top \\ \hline
                   3278: #bottom & (south) & 1 & 16 & 256 \\
                   3279: #left   & (west)  & 2 & 32 & 512 \\
                   3280: #top    & (north) & 4 & 64 & 1024 \\
                   3281: #right  & (east)  & 8 & 128 & 2048 \\
                   3282: %c c c c c .
                   3283: %@plot border@splot@splot
                   3284: %@splot base@verticals@top
                   3285: %_
                   3286: %bottom (south)@1@16@256
                   3287: %left   (west)@2@32@512
                   3288: %top    (north)@4@64@1024
                   3289: %right  (east)@8@128@2048
                   3290: @end table
                   3291:
                   3292:  The default is 31, which is all four sides for `plot`, and base and z axis
                   3293:  for `splot`.
                   3294:
                   3295:  Using the optional <line_style>, <line_type> and <line_width>
                   3296:  specifiers, the way the border lines are drawn can be influenced
1.1.1.2 ! maekawa  3297:  (limited by what the current terminal driver supports).  By default,
        !          3298:  the border is drawn with twice the usual linewidth.  The <line_width>
        !          3299:  specifier scales this default value; for example, `set border 15 lw 2`
        !          3300:  will produce a border with four times the usual linewidth.
1.1       maekawa  3301:
                   3302:  Various axes or combinations of axes may be added together in the command.
                   3303:
                   3304:  To have tics on edges other than bottom and left, disable the usual tics and
                   3305:  enable the second axes.
                   3306:
                   3307:  Examples:
                   3308:
                   3309:  Draw all borders:
                   3310:        set border
                   3311:
                   3312:  Draw only the SOUTHWEST borders:
                   3313:        set border 3
                   3314:
                   3315:  Draw a complete box around a `splot`:
                   3316:        set border 4095
                   3317:
                   3318:  Draw a partial box, omitting the front vertical:
                   3319:        set border 127+256+512
                   3320:
                   3321:  Draw only the NORTHEAST borders:
                   3322:        set noxtics; set noytics; set x2tics; set y2tics; set border 12
                   3323:
                   3324: ^ <a href="http://www.nas.nasa.gov/~woo/gnuplot/borders/borders.html"> Borders Demo. </a>
                   3325: 3 boxwidth
                   3326: ?commands set boxwidth
                   3327: ?commands show boxwidth
                   3328: ?set boxwidth
                   3329: ?show boxwidth
                   3330: ?boxwidth
                   3331:  The `set boxwidth` command is used to set the default width of boxes in the
                   3332:  `boxes` and `boxerrorbars` styles.
                   3333:
                   3334:  Syntax:
                   3335:        set boxwidth {<width>}
                   3336:        show boxwidth
                   3337:
                   3338:  If a data file is plotted without the width being specified in the third,
                   3339:  fourth, or fifth column (or `using` entry), or if a function is plotted, the
                   3340:  width of each box is set by the `set boxwidth` command.  (If a width is given
                   3341:  both in the file and by the `set boxwidth` command, the one in the file is
                   3342:  used.)  If the width is not specified in one of these ways, the width of each
                   3343:  box will be calculated automatically so that it touches the adjacent boxes.
                   3344:  In a four-column data set, the fourth column will be interpreted as the box
                   3345:  width unless the width is set to -2.0, in which case the width will be
                   3346:  calculated automatically.  See `set style boxerrorbars` for more details.
                   3347:
                   3348:  To set the box width to automatic use the command
                   3349:        set boxwidth
                   3350:  or, for four-column data,
                   3351:        set boxwidth -2
                   3352:
                   3353:  The same effect can be achieved with the `using` keyword in `plot`:
                   3354:        plot 'file' using 1:2:3:4:(-2)
                   3355: 3 clabel
                   3356: ?commands set clabel
                   3357: ?commands set noclabel
                   3358: ?commands show clabel
                   3359: ?set clabel
                   3360: ?set noclabel
                   3361: ?show clabel
                   3362: ?clabel
                   3363: ?noclabel
                   3364:  `gnuplot` will vary the linetype used for each contour level when clabel is
                   3365:  set.  When this option on (the default), a legend labels each linestyle with
                   3366:  the z level it represents.  It is not possible at present to separate the
                   3367:  contour labels from the surface key.
                   3368:
                   3369:  Syntax:
                   3370:        set clabel {'<format>'}
                   3371:        set noclabel
                   3372:        show clabel
                   3373:
                   3374:  The default for the format string is %8.3g, which gives three decimal places.
                   3375:  This may produce poor label alignment if the key is altered from its default
                   3376:  configuration.
                   3377:
                   3378:  The first contour linetype, or only contour linetype when clabel is off, is
                   3379:  the surface linetype +1; contour points are the same style as surface points.
                   3380:
                   3381:  See also `set contour`.
                   3382: 3 clip
                   3383: ?commands set clip
                   3384: ?commands set noclip
                   3385: ?commands show clip
                   3386: ?set clip
                   3387: ?set noclip
                   3388: ?show clip
                   3389: ?clip
                   3390: ?noclip
                   3391:  `gnuplot` can clip data points and lines that are near the boundaries of a
                   3392:  graph.
                   3393:
                   3394:  Syntax:
                   3395:        set clip <clip-type>
                   3396:        set noclip <clip-type>
                   3397:        show clip
                   3398:
                   3399:  Three clip types are supported by `gnuplot`: `points`, `one`, and `two`.
                   3400:  One, two, or all three clip types may be active for a single graph.
                   3401:
                   3402:  The `points` clip type forces `gnuplot` to clip (actually, not plot at all)
                   3403:  data points that fall within but too close to the boundaries.  This is done
                   3404:  so that large symbols used for points will not extend outside the boundary
                   3405:  lines.  Without clipping points near the boundaries, the plot may look bad.
                   3406:  Adjusting the x and y ranges may give similar results.
                   3407:
                   3408:  Setting the `one` clip type causes `gnuplot` to draw a line segment which has
                   3409:  only one of its two endpoints within the graph.  Only the in-range portion of
                   3410:  the line is drawn.  The alternative is to not draw any portion of the line
                   3411:  segment.
                   3412:
                   3413:  Some lines may have both endpoints out of range, but pass through the graph.
                   3414:  Setting the `two` clip-type allows the visible portion of these lines to be
                   3415:  drawn.
                   3416:
                   3417:  In no case is a line drawn outside the graph.
                   3418:
                   3419:  The defaults are `noclip points`, `clip one`, and `noclip two`.
                   3420:
                   3421:  To check the state of all forms of clipping, use
                   3422:        show clip
                   3423:
                   3424:  For backward compatibility with older versions, the following forms are also
                   3425:  permitted:
                   3426:        set clip
                   3427:        set noclip
                   3428:
                   3429:  `set clip` is synonymous with `set clip points`; `set noclip` turns off all
                   3430:  three types of clipping.
                   3431: 3 cntrparam
                   3432: ?commands set cntrparam
                   3433: ?commands show cntrparam
                   3434: ?set cntrparam
                   3435: ?show cntrparam
                   3436: ?cntrparam
                   3437:  `set cntrparam` controls the generation of contours and their smoothness for
                   3438:  a contour plot. `show contour` displays current settings of `cntrparam` as
                   3439:  well as `contour`.
                   3440:
                   3441:  Syntax:
                   3442:        set cntrparam {  {linear | cubicspline | bspline}
                   3443:                        { points <n>} { order <n> }
                   3444:                        { levels   auto {<n>} | <n>
                   3445:                                 | discrete <z1> {,<z2>{,<z3>...}}
                   3446:                                 | incremental <start>, <incr> {,<end>}
                   3447:                         }
                   3448:                       }
                   3449:        show contour
                   3450:
                   3451:  This command has two functions.  First, it sets the values of z for which
                   3452:  contour points are to be determined (by linear interpolation between data
                   3453:  points or function isosamples.)  Second, it controls the way contours are
                   3454:  drawn between the points determined to be of equal z.  <n> should be an
                   3455:  integral constant expression and <z1>, <z2> ... any constant expressions.
                   3456:  The parameters are:
                   3457:
                   3458:  `linear`, `cubicspline`, `bspline`---Controls type of approximation or
                   3459:  interpolation.  If `linear`, then straight line segments connect points of
                   3460:  equal z magnitude.  If `cubicspline`, then piecewise-linear contours are
                   3461:  interpolated between the same equal z points to form somewhat smoother
                   3462:  contours, but which may undulate.  If `bspline`, a guaranteed-smoother curve
                   3463:  is drawn, which only approximates the position of the points of equal-z.
                   3464:
                   3465:  `points`---Eventually all drawings are done with piecewise-linear strokes.
                   3466:  This number controls the number of line segments used to approximate the
                   3467:  `bspline` or `cubicspline` curve.  Number of cubicspline or bspline
                   3468:  segments (strokes) = `points` * number of linear segments.
                   3469:
                   3470:  `order`---Order of the bspline approximation to be used.  The bigger this
                   3471:  order is, the smoother the resulting contour.  (Of course, higher order
                   3472:  bspline curves will move further away from the original piecewise linear
                   3473:  data.)  This option is relevant for `bspline` mode only.  Allowed values are
                   3474:  integers in the range from 2 (linear) to 10.
                   3475:
                   3476:  `levels`--- Selection of contour levels,  controlled by `auto` (default),
                   3477:  `discrete`, `incremental`, and <n>, number of contour levels, limited to
                   3478:   MAX_DISCRETE_LEVELS as defined in plot.h (30 is standard.)
                   3479:
                   3480:  For `auto`, <n> specifies a nominal number of levels; the actual number will
                   3481:  be adjusted to give simple labels. If the surface is bounded by zmin and zmax,
                   3482:  contours will be generated at integer multiples of dz between zmin and zmax,
                   3483:  where dz is 1, 2, or 5 times some power of ten (like the step between two
                   3484:  tic marks).
                   3485:
                   3486:  For `levels discrete`, contours will be generated at z = <z1>, <z2> ... as
                   3487:  specified; the number of discrete levels sets the number of contour levels.
                   3488:  In `discrete` mode, any `set cntrparms levels <n>` are ignored.
                   3489:
                   3490:  For `incremental`, contours are generated at values of z beginning at <start>
                   3491:  and increasing by <increment>, until the number of contours is reached. <end>
                   3492:  is used to determine the number of contour levels, which will be changed by
                   3493:  any subsequent `set cntrparam levels <n>`.
                   3494:
                   3495:  If the command `set cntrparam` is given without any arguments specified,  the
                   3496:  defaults are used: linear, 5 points, order 4, 5 auto levels.
                   3497:
                   3498:  Examples:
                   3499:        set cntrparam bspline
                   3500:        set cntrparam points 7
                   3501:        set cntrparam order 10
                   3502:
                   3503:  To select levels automatically, 5 if the level increment criteria are met:
                   3504:        set cntrparam levels auto 5
                   3505:
                   3506:  To specify discrete levels at .1, .37, and .9:
                   3507:        set cntrparam levels discrete .1,1/exp(1),.9
                   3508:
                   3509:  To specify levels from 0 to 4 with increment 1:
                   3510:        set cntrparam levels incremental  0,1,4
                   3511:
                   3512:  To set the number of levels to 10 (changing an incremental end or possibly
                   3513:  the number of auto levels):
                   3514:        set cntrparam levels 10
                   3515:
                   3516:  To set the start and increment while retaining the number of levels:
                   3517:        set cntrparam levels incremental 100,50
                   3518:
                   3519:  See also `set contour` for control of where the contours are drawn, and `set
                   3520:  clabel` for control of the format of the contour labels and linetypes.
1.1.1.2 ! maekawa  3521: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/contours.html">Contours Demo</a> and
        !          3522: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/discrete.html">contours with User Defined Levels.</a>
1.1       maekawa  3523: 3 contour
                   3524: ?commands set contour
                   3525: ?commands set nocontour
                   3526: ?commands show contour
                   3527: ?set contour
                   3528: ?set nocontour
                   3529: ?show contour
                   3530: ?contour
                   3531: ?nocontour
                   3532:  `set contour` enables contour drawing for surfaces. This option is available
                   3533:  for `splot` only.
                   3534:
                   3535:  Syntax:
                   3536:        set contour {base | surface | both}
                   3537:        set nocontour
                   3538:        show contour
                   3539:
                   3540:  The three options specify where to draw the contours: `base` draws the
                   3541:  contours on the grid base where the x/ytics are placed, `surface` draws the
                   3542:  contours on the surfaces themselves, and `both` draws the contours on both
                   3543:  the base and the surface.  If no option is provided, the default is `base`.
                   3544:
                   3545:  See also `set cntrparam` for the parameters that affect the drawing of
                   3546:  contours, and `set clabel` for control of labelling of the contours.
                   3547:
                   3548:  The surface can be switched off (see `set surface`), giving a contour-only
                   3549:  graph.  Though it is possible to use `set size` to enlarge the plot to fill
                   3550:  the screen, more control over the output format can be obtained by writing
                   3551:  the contour information to a file, and rereading it as a 2-d datafile plot:
                   3552:
                   3553:        set nosurface
                   3554:        set contour
                   3555:        set cntrparam ...
                   3556:        set term table
                   3557:        set out 'filename'
                   3558:        splot ...
                   3559:        set out
                   3560:        # contour info now in filename
                   3561:        set term <whatever>
                   3562:        plot 'filename'
                   3563:
                   3564:  In order to draw contours, the data should be organized as "grid data".  In
                   3565:  such a file all the points for a single y-isoline are listed, then all the
                   3566:  points for the next y-isoline, and so on.  A single blank line (a line
                   3567:  containing no characters other than blank spaces and a carriage return and/or
                   3568:  a line feed) separates one y-isoline from the next.  See also `splot datafile`.
                   3569:
                   3570:  If contours are desired from non-grid data, `set dgrid3d` can be used to
                   3571:  create an appropriate grid.  See `set dgrid3d` for more information.
1.1.1.2 ! maekawa  3572: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/contours.html">Contours Demo</a> and
        !          3573: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/discrete.html">contours with User Defined Levels.</a>
1.1       maekawa  3574: 3 data style
                   3575: ?commands set data style
                   3576: ?commands show data style
                   3577: ?set data style
                   3578: ?show data style
                   3579: ?data style
                   3580:  The `set data style` command changes the default plotting style for data
                   3581:  plots.
                   3582:
                   3583:  Syntax:
                   3584:        set data style <style-choice>
                   3585:        show data style
                   3586:
                   3587:  See `set style` for the choices.  If no choice is given, the choices are
                   3588:  listed.  `show data style` shows the current default data plotting style.
                   3589: 3 dgrid3d
                   3590: ?commands set dgrid3d
                   3591: ?commands set nodgrid3d
                   3592: ?commands show dgrid3d
                   3593: ?set dgrid3d
                   3594: ?set nodgrid3d
                   3595: ?show dgrid3d
                   3596: ?dgrid3d
                   3597: ?nodgrid3d
                   3598:  The `set dgrid3d` command enables, and can set parameters for, non-grid
                   3599:  to grid data mapping.
                   3600:
                   3601:  Syntax:
                   3602:        set dgrid3d {<row_size>} {,{<col_size>} {,<norm>}}
                   3603:        set nodgrid3d
                   3604:        show dgrid3d
                   3605:
                   3606:  By default `dgrid3d` is disabled.  When enabled, 3-d data read from a file
                   3607:  are always treated as a scattered data set.  A grid with dimensions derived
                   3608:  from a bounding box of the scattered data and size as specified by the
                   3609:  row/col_size parameters is created for plotting and contouring.  The grid
                   3610:  is equally spaced in x (rows) and in y (columns); the z values are computed
                   3611:  as weighted averages of the scattered points' z values.
                   3612:
                   3613:  The third parameter, norm, controls the weighting:  Each data point is
                   3614:  weighted inversely by its distance from the grid point raised to the norm
                   3615:  power.  (Actually, the weights are given by the inverse of dx^norm + dy^norm,
                   3616:  where dx and dy are the components of the separation of the grid point from
                   3617:  each data point.  For some norms that are powers of two, specifically 4, 8,
                   3618:  and 16, the computation is optimized by using the Euclidean distance in the
                   3619:  weight calculation, (dx^2+dx^2)^norm/2.  However, any non-negative integer
                   3620:  can be used.)
                   3621:
                   3622:  The closer the data point is to a grid point, the more effect it has on
                   3623:  that grid point and the larger the value of norm the less effect more
                   3624:  distant data points have on that grid point.
                   3625:
                   3626:  The `dgrid3d` option is a simple low pass filter that converts scattered
                   3627:  data to a grid data set.  More sophisticated approaches to this problem
                   3628:  exist and should be used to preprocess the data outside `gnuplot` if this
                   3629:  simple solution is found inadequate.
                   3630:
                   3631:  (The z values are found by weighting all data points, not by interpolating
                   3632:  between nearby data points;  also edge effects may produce unexpected and/or
                   3633:  undesired results.  In some cases, small norm values produce a grid point
                   3634:  reflecting the average of distant data points rather than a local average,
                   3635:  while large values of norm may produce "steps" with several grid points
                   3636:  having the same value as the closest data point, rather than making a smooth
                   3637:  transition between adjacent data points.  Some areas of a grid may be filled
                   3638:  by extrapolation, to an arbitrary boundary condition.  The variables are
                   3639:  not normalized; consequently the units used for x and y will affect the
                   3640:  relative weights of points in the x and y directions.)
                   3641:
                   3642:  Examples:
                   3643:        set dgrid3d 10,10,1     # defaults
                   3644:        set dgrid3d ,,4
                   3645:
                   3646:  The first specifies that a grid of size 10 by 10 is to be constructed using
                   3647:  a norm value of 1 in the weight computation.  The second only modifies the
                   3648:  norm, changing it to 4.
1.1.1.2 ! maekawa  3649: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/scatter.html"> Dgrid3d Demo.</a>
1.1       maekawa  3650:
                   3651: 3 dummy
                   3652: ?commands set dummy
                   3653: ?commands show dummy
                   3654: ?set dummy
                   3655: ?show dummy
                   3656: ?dummy
                   3657:  The `set dummy` command changes the default dummy variable names.
                   3658:
                   3659:  Syntax:
                   3660:        set dummy {<dummy-var>} {,<dummy-var>}
                   3661:        show dummy
                   3662:
                   3663:  By default, `gnuplot` assumes that the independent, or "dummy", variable for
                   3664:  the `plot` command is "t" if in parametric or polar mode, or "x" otherwise.
                   3665:  Similarly the independent variables for the `splot` command are "u" and "v"
                   3666:  in parametric mode (`splot` cannot be used in polar mode), or "x" and "y"
                   3667:  otherwise.
                   3668:
                   3669:  It may be more convenient to call a dummy variable by a more physically
                   3670:  meaningful or conventional name.  For example, when plotting time functions:
                   3671:
                   3672:        set dummy t
                   3673:        plot sin(t), cos(t)
                   3674:
                   3675:  At least one dummy variable must be set on the command; `set dummy` by itself
                   3676:  will generate an error message.
                   3677:
                   3678:  Examples:
                   3679:        set dummy u,v
                   3680:        set dummy ,s
                   3681:
                   3682:  The second example sets the second variable to s.
                   3683: 3 encoding
                   3684: ?commands set encoding
                   3685: ?commands show encoding
                   3686: ?set encoding
                   3687: ?show encoding
                   3688: ?encoding
                   3689:  The `set encoding` command selects a character encoding.  Valid values are
                   3690:  `default`, which tells a terminal to use its default; `iso_8859_1` (known in
                   3691:  the PostScript world as `ISO-Latin1`), which is used on many Unix workstations
                   3692:  and with MS-Windows; `cp850`, for OS/2; and `cp437`, for MS-DOS.
                   3693:
                   3694:  Syntax:
                   3695:        set encoding {<value>}
                   3696:        show encoding
                   3697:
                   3698:  Note that encoding is not supported by all terminal drivers and that
                   3699:  the device must be able to produce the desired non-standard characters.
                   3700: 3 format
                   3701: ?commands set format
                   3702: ?commands show format
                   3703: ?set format
                   3704: ?show format
                   3705: ?format
                   3706:  The format of the tic-mark labels can be set with the `set format` command.
                   3707:
                   3708:  Syntax:
                   3709:        set format {<axes>} {"<format-string>"}
                   3710:        set format {<axes>} {'<format-string>'}
                   3711:        show format
                   3712:
                   3713:  where <axes> is either `x`, `y`, `z`, `xy`, `x2`, `y2` or nothing (which is
                   3714:  the same as `xy`).  The length of the string representing a tic mark (after
                   3715:  formatting with 'printf') is restricted to 100 characters.  If the format
                   3716:  string is omitted, the format will be returned to the default "%g".  For
                   3717:  LaTeX users, the format "$%g$" is often desirable.  If the empty string "" is
                   3718:  used, no label will be plotted with each tic, though the tic mark will still
                   3719:  be plotted.  To eliminate all tic marks, use `set noxtics` or `set noytics`.
                   3720:
                   3721:  Newline (\n) is accepted in the format string.  Use double-quotes rather than
                   3722:  single-quotes to enable such interpretation.  See also `syntax`.
                   3723:
                   3724:  The default format for both axes is "%g", but other formats such as "%.2f" or
                   3725:  "%3.0em" are often desirable.  Anything accepted by 'printf' when given a
                   3726:  double precision number, and accepted by the terminal, will work.  Some other
                   3727:  options have been added.  If the format string looks like a floating point
                   3728:  format, then `gnuplot` tries to construct a reasonable format.
                   3729:
                   3730:  Characters not preceded by "%" are printed verbatim.  Thus you can include
                   3731:  spaces and labels in your format string, such as "%g m", which will put " m"
                   3732:  after each number.  If you want "%" itself, double it: "%g %%".
                   3733:
                   3734:  See also `set xtics` for more information about tic labels.
1.1.1.2 ! maekawa  3735: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/electron.html"> See demo. </a>
1.1       maekawa  3736: 4 format specifiers
                   3737: ?commands set format specifiers
                   3738: ?set format specifiers
                   3739: ?format specifiers
                   3740: ?format_specifiers
                   3741:  The acceptable formats (if not in time/date mode) are:
                   3742:
                   3743: @start table - first is interactive cleartext form
                   3744:        Format       Explanation
                   3745:        %f           floating point notation
                   3746:        %e or %E     exponential notation; an "e" or "E" before the power
                   3747:        %g or %G     the shorter of %e (or %E) and %f
                   3748:        %x or %X     hex
                   3749:        %o or %O     octal
                   3750:        %t           mantissa to base 10
                   3751:        %l           mantissa to base of current logscale
                   3752:        %s           mantissa to base of current logscale; scientific power
                   3753:        %T           power to base 10
                   3754:        %L           power to base of current logscale
                   3755:        %S           scientific power
                   3756:        %c           character replacement for scientific power
                   3757:        %P           multiple of pi
                   3758: #\begin{tabular}{|cl|} \hline
                   3759: #\multicolumn{2}{|c|}{Tic-mark label numerical format specifiers}\\
                   3760: #\hline \hline
                   3761: #Format & Explanation \\ \hline
                   3762: #\verb@%f@ & floating point notation \\
                   3763: #\verb@%e@ or \verb@%E@ & exponential notation; an "e" or "E" before the power \\
                   3764: #\verb@%g@ or \verb@%G@ & the shorter of \verb@%e@ (or \verb@%E@) and \verb@%f@ \\
                   3765: #\verb@%x@ or \verb@%X@ & hex \\
                   3766: #\verb@%o@ or \verb@%O@ & octal \\
                   3767: #\verb@%t@ & mantissa to base 10 \\
                   3768: #\verb@%l@ & mantissa to base of current logscale \\
                   3769: #\verb@%s@ & mantissa to base of current logscale; scientific power \\
                   3770: #\verb@%T@ & power to base 10 \\
                   3771: #\verb@%L@ & power to base of current logscale \\
                   3772: #\verb@%S@ & scientific power \\
                   3773: #\verb@%c@ & character replacement for scientific power \\
                   3774: #\verb@%P@ & multiple of pi \\
                   3775: %c l .
                   3776: %Format@Explanation
                   3777: %_
                   3778: %%f@floating point notation
                   3779: %%e or %E@exponential notation; an "e" or "E" before the power
                   3780: %%g or %G@the shorter of %e (or %E) and %f
                   3781: %%x or %X@hex
                   3782: %%o or %O@octal
                   3783: %%t@mantissa to base 10
                   3784: %%l@mantissa to base of current logscale
                   3785: %%s@mantissa to base of current logscale; scientific power
                   3786: %%T@power to base 10
                   3787: %%L@power to base of current logscale
                   3788: %%S@scientific power
                   3789: %%c@character replacement for scientific power
                   3790: %%P@multiple of pi
                   3791: %_
                   3792: @end table
                   3793:
                   3794:  A 'scientific' power is one such that the exponent is a multiple of three.
                   3795:  Character replacement of scientific powers (`"%c"`) has been implemented
                   3796:  for powers in the range -18 to +18.  For numbers outside of this range the
                   3797:  format reverts to exponential.
                   3798:
                   3799:  Other acceptable modifiers (which come after the "%" but before the format
                   3800:  specifier) are "-", which left-justifies the number; "+", which forces all
                   3801:  numbers to be explicitly signed; "#", which places a decimal point after
                   3802:  floats that have only zeroes following the decimal point; a positive integer,
                   3803:  which defines the field width; "0" (the digit, not the letter) immediately
                   3804:  preceding the field width, which indicates that leading zeroes are to be used
                   3805:  instead of leading blanks; and a decimal point followed by a non-negative
                   3806:  integer, which defines the precision (the minimum number of digits of an
                   3807:  integer, or the number of digits following the decimal point of a float).
                   3808:
                   3809:  Some releases of 'printf' may not support all of these modifiers but may also
                   3810:  support others; in case of doubt, check the appropriate documentation and
                   3811:  then experiment.
                   3812:
                   3813:  Examples:
                   3814:        set format y "%t"; set ytics (5,10)          # "5.0" and "1.0"
                   3815:        set format y "%s"; set ytics (500,1000)      # "500" and "1.0"
                   3816:        set format y "+-12.3f"; set ytics(12345)     # "+12345.000  "
                   3817:        set format y "%.2t*10^%+03T"; set ytic(12345)# "1.23*10^+04"
                   3818:        set format y "%s*10^{%S}"; set ytic(12345)   # "12.345*10^{3}"
                   3819:        set format y "%s %cg"; set ytic(12345)       # "12.345 kg"
                   3820:        set format y "%.0P pi"; set ytic(6.283185)   # "2 pi"
                   3821:        set format y "%.0P%%"; set ytic(50)          # "50%"
                   3822:
                   3823:        set log y 2; set format y '%l'; set ytics (1,2,3)
                   3824:        #displays "1.0", "1.0" and "1.5" (since 3 is 1.5 * 2^1)
                   3825:
                   3826:  There are some problem cases that arise when numbers like 9.999 are printed
                   3827:  with a format that requires both rounding and a power.
                   3828:
                   3829:  If the data type for the axis is time/date, the format string must contain
                   3830:  valid codes for the 'strftime' function (outside of `gnuplot`, type "man
                   3831:  strftime").  See `set timefmt` for a list of the allowed input format codes.
                   3832: 4 time/date specifiers
                   3833: ?commands set format time/date_specifiers
                   3834: ?set format time/date_specifiers
                   3835: ?set time/date_specifiers
                   3836: ?time/date_specifiers
                   3837:  In time/date mode, the acceptable formats are:
                   3838:
                   3839: @start table - first is interactive cleartext form
                   3840:        Format       Explanation
                   3841:        %a           abbreviated name of day of the week
                   3842:        %A           full name of day of the week
                   3843:        %b or %h     abbreviated name of the month
                   3844:        %B           full name of the month
                   3845:        %d           day of the month, 1--31
                   3846:        %D           shorthand for "%m/%d/%y"
                   3847:        %H or %k     hour, 0--24
                   3848:        %I or %l     hour, 0--12
                   3849:        %j           day of the year, 1--366
                   3850:        %m           month, 1--12
                   3851:        %M           minute, 0--60
                   3852:        %p           "am" or "pm"
                   3853:        %r           shorthand for "%I:%M:%S %p"
                   3854:        %R           shorthand for %H:%M"
                   3855:        %S           second, 0--60
                   3856:        %T           shorthand for "%H:%M:%S"
                   3857:        %U           week of the year (week starts on Sunday)
                   3858:        %w           day of the week, 0--6 (Sunday = 0)
                   3859:        %W           week of the year (week starts on Monday)
                   3860:        %y           year, 0-99
                   3861:        %Y           year, 4-digit
                   3862: #\begin{tabular}{|cl|} \hline
                   3863: #\multicolumn{2}{|c|}{Tic-mark label Date/Time Format Specifiers}\\
                   3864: #\hline \hline
                   3865: #Format & Explanation \\ \hline
                   3866: #\verb@%a@ & abbreviated name of day of the week \\
                   3867: #\verb@%A@ & full name of day of the week \\
                   3868: #\verb@%b@ or \verb@%h@ & abbreviated name of the month \\
                   3869: #\verb@%B@ & full name of the month \\
                   3870: #\verb@%d@ & day of the month, 1--31 \\
                   3871: #\verb@%D@ & shorthand for \verb@"%m/%d/%y"@ \\
                   3872: #\verb@%H@ or \verb@%k@ & hour, 0--24 \\
                   3873: #\verb@%I@ or \verb@%l@ & hour, 0--12 \\
                   3874: #\verb@%j@ & day of the year, 1--366 \\
                   3875: #\verb@%m@ & month, 1--12 \\
                   3876: #\verb@%M@ & minute, 0--60 \\
                   3877: #\verb@%p@ & "am" or "pm" \\
                   3878: #\verb@%r@ & shorthand for \verb@"%I:%M:%S %p"@ \\
                   3879: #\verb@%R@ & shorthand for \verb@%H:%M"@ \\
                   3880: #\verb@%S@ & second, 0--60 \\
                   3881: #\verb@%T@ & shorthand for \verb@"%H:%M:%S"@ \\
                   3882: #\verb@%U@ & week of the year (week starts on Sunday) \\
                   3883: #\verb@%w@ & day of the week, 0--6 (Sunday = 0) \\
                   3884: #\verb@%W@ & week of the year (week starts on Monday) \\
                   3885: #\verb@%y@ & year, 0-99 \\
                   3886: #\verb@%Y@ & year, 4-digit \\
                   3887: %c l .
                   3888: %Format@Explanation
                   3889: %_
                   3890: %%a@abbreviated name of day of the week
                   3891: %%A@full name of day of the week
                   3892: %%b or %h@abbreviated name of the month
                   3893: %%B@full name of the month
                   3894: %%d@day of the month, 1--31
                   3895: %%D@shorthand for "%m/%d/%y"
                   3896: %%H or %k@hour, 0--24
                   3897: %%I or %l@hour, 0--12
                   3898: %%j@day of the year, 1--366
                   3899: %%m@month, 1--12
                   3900: %%M@minute, 0--60
                   3901: %%p@"am" or "pm"
                   3902: %%r@shorthand for "%I:%M:%S %p"
                   3903: %%R@shorthand for %H:%M"
                   3904: %%S@second, 0--60
                   3905: %%T@shorthand for "%H:%M:%S"
                   3906: %%U@week of the year (week starts on Sunday)
                   3907: %%w@day of the week, 0--6 (Sunday = 0)
                   3908: %%W@week of the year (week starts on Monday)
                   3909: %%y@year, 0-99
                   3910: %%Y@year, 4-digit
                   3911: %_
                   3912: @end table
                   3913:
                   3914:  Except for the non-numerical formats, these may be preceded by a "0" ("zero",
                   3915:  not "oh") to pad the field length with leading zeroes, and a positive digit,
                   3916:  to define the minimum field width (which will be overridden if the specified
                   3917:  width is not large enough to contain the number).  There is a 24-character
                   3918:  limit to the length of the printed text; longer strings will be truncated.
                   3919:
                   3920:  Examples:
                   3921:
                   3922:  Suppose the text is "76/12/25 23:11:11".  Then
                   3923:        set format x                 # defaults to "12/25/76" \n "23:11"
                   3924:        set format x "%A, %d %b %Y"  # "Saturday, 25 Dec 1976"
                   3925:        set format x "%r %d"         # "11:11:11 pm 12/25/76"
                   3926:
                   3927:  Suppose the text is "98/07/06 05:04:03".  Then
                   3928:        set format x "%1y/%2m/%3d %01H:%02M:%03S"  # "98/ 7/  6 5:04:003"
                   3929: 3 function style
                   3930: ?commands set function style
                   3931: ?commands show function style
                   3932: ?set function style
                   3933: ?show function style
                   3934: ?function style
                   3935:  The `set function style` command changes the default plotting style for
                   3936:  function plots.
                   3937:
                   3938:  Syntax:
                   3939:        set function style <style-choice>
                   3940:        show function style
                   3941:
                   3942:  See `set style` for the choices.  If no choice is given, the choices are
                   3943:  listed.  `show function style` shows the current default function plotting
                   3944:  style.
                   3945: 3 functions
                   3946: ?commands show functions
                   3947: ?show functions
                   3948:  The `show functions` command lists all user-defined functions and their
                   3949:  definitions.
                   3950:
                   3951:  Syntax:
                   3952:        show functions
                   3953:
                   3954:  For information about the definition and usage of functions in `gnuplot`,
                   3955:  please see `expressions`.
1.1.1.2 ! maekawa  3956: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/spline.html"> Splines as User Defined Functions.</a>
        !          3957: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/airfoil.html">Use of functions and complex variables for airfoils </a>
1.1       maekawa  3958: 3 grid
                   3959: ?commands set grid
                   3960: ?commands set nogrid
                   3961: ?commands show grid
                   3962: ?set grid
                   3963: ?set nogrid
                   3964: ?show grid
                   3965: ?grid
                   3966: ?nogrid
                   3967:  The `set grid` command allows grid lines to be drawn on the plot.
                   3968:
                   3969:  Syntax:
                   3970:        set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}
                   3971:                 {{no}{m}x2tics} {{no}{m}y2tics}
                   3972:                 {polar {<angle>}}
                   3973:                 { {linestyle <major_linestyle>}
                   3974:                   | {linetype | lt <major_linetype>}
                   3975:                     {linewidth | lw <major_linewidth>}
                   3976:                   { , {linestyle | ls <minor_linestyle>}
                   3977:                       | {linetype | lt <minor_linetype>}
                   3978:                         {linewidth | lw <minor_linewidth>} } }
                   3979:        set nogrid
                   3980:        show grid
                   3981:
                   3982:  The grid can be enabled and disabled for the major and/or minor tic
                   3983:  marks on any axis, and the linetype and linewidth can be specified
                   3984:  for major and minor grid lines, also via a predefined linestyle, as
                   3985:  far as the active terminal driver supports this.
                   3986:
                   3987:  Additionally, a polar grid can be selected for 2-d plots---circles are drawn
                   3988:  to intersect the selected tics, and radial lines are drawn at definable
                   3989:  intervals.  (The interval is given in degrees or radians ,depending on the
                   3990:  `set angles` setting.)  Note that a polar grid is no longer automatically
                   3991:  generated in polar mode.
                   3992:
                   3993:  The pertinent tics must be enabled before `set grid` can draw them; `gnuplot`
                   3994:  will quietly ignore instructions to draw grid lines at non-existent tics, but
                   3995:  they will appear if the tics are subsequently enabled.
                   3996:
                   3997:  If no linetype is specified for the minor gridlines, the same linetype as the
                   3998:  major gridlines is used.  The default polar angle is 30 degrees.
                   3999:
1.1.1.2 ! maekawa  4000:  By default, grid lines are drawn with half the usual linewidth. The major and
        !          4001:  minor linewidth specifiers scale this default value; for example, `set grid
        !          4002:  lw .5` will draw grid lines with one quarter the usual linewidth.
        !          4003:
1.1       maekawa  4004:  Z grid lines are drawn on the back of the plot.  This looks better if a
                   4005:  partial box is drawn around the plot---see `set border`.
                   4006: 3 hidden3d
                   4007: ?commands set hidden3d
                   4008: ?commands set nohidden3d
                   4009: ?commands show hidden3d
                   4010: ?set hidden3d
                   4011: ?set nohidden3d
                   4012: ?show hidden3d
                   4013: ?hidden3d
                   4014: ?nohidden3d
                   4015:  The `set hidden3d` command enables hidden line removal for surface plotting
                   4016:  (see `splot`).  Some optional features of the underlying algorithm can also
                   4017:  be controlled using this command.
                   4018:
                   4019:  Syntax:
                   4020:        set hidden3d {defaults} |
                   4021:                     { {{offset <offset>} | {nooffset}}
                   4022:                       {trianglepattern <bitpattern>}
                   4023:                       {{undefined <level>} | {noundefined}}
                   4024:                       {{no}altdiagonal}
                   4025:                       {{no}bentover} }
                   4026:        set nohidden3d
                   4027:        show hidden3d
                   4028:
                   4029:  In contrast to the usual display in gnuplot, hidden line removal actually
                   4030:  treats the given function or data grids as real surfaces that can't be seen
                   4031:  through, so parts behind the surface will be hidden by it.  For this to be
                   4032:  possible, the surface needs to have 'grid structure' (see `splot datafile`
                   4033:  about this), and it has to be drawn `with lines` or `with linespoints`.
                   4034:
                   4035:  When `hidden3d` is set, both the hidden portion of the surface and possibly
                   4036:  its contours drawn on the base (see `set contour`) as well as the grid will
                   4037:  be hidden.  Each surface has its hidden parts removed with respect to itself
                   4038:  and to other surfaces, if more than one surface is plotted.  Contours drawn
                   4039:  on the surface (`set contour surface`) don't work.  Labels and arrows are
                   4040:  always visible and are unaffected.  The key is also never hidden by the
                   4041:  surface.
                   4042:
                   4043:  Functions are evaluated at isoline intersections.  The algorithm interpolates
                   4044:  linearly between function points or data points when determining the visible
                   4045:  line segments.  This means that the appearance of a function may be different
                   4046:  when plotted with `hidden3d` than when plotted with `nohidden3d` because in
                   4047:  the latter case functions are evaluated at each sample.  Please see `set
                   4048:  samples` and `set isosamples` for discussion of the difference.
                   4049:
                   4050:  The algorithm used to remove the hidden parts of the surfaces has some
                   4051:  additional features controllable by this command.  Specifying `defaults` will
                   4052:  set them all to their default settings, as detailed below.  If `defaults` is
                   4053:  not given, only explicitly specified options will be influenced: all others
                   4054:  will keep their previous values, so you can turn on/off hidden line removal
                   4055:  via `set {no}hidden3d`, without modifying the set of options you chose.
                   4056:
                   4057:  The first option, `offset`, influences the linestyle used for lines on the
                   4058:  'back' side.  Normally, they are drawn in a linestyle one index number higher
                   4059:  than the one used for the front, to make the two sides of the surface
                   4060:  distinguishable.  You can specify a different line style offset to add
                   4061:  instead of the default 1, by `offset <offset>`.  Option `nooffset` stands for
                   4062:  `offset 0`, making the two sides of the surface use the same linestyle.
                   4063:
                   4064:  Next comes the option `trianglepattern <bitpattern>`.  <bitpattern> must be
                   4065:  a number between 0 and 7, interpreted as a bit pattern.  Each bit determines
                   4066:  the visibility of one edge of the triangles each surface is split up into.
                   4067:  Bit 0 is for the 'horizontal' edges of the grid, Bit 1 for the 'vertical'
                   4068:  ones, and Bit 2 for the diagonals that split each cell of the original grid
                   4069:  into two triangles.  The default pattern is 3, making all horizontal and
                   4070:  vertical lines visible, but not the diagonals.  You may want to choose 7 to
                   4071:  see those diagonals as well.
                   4072:
                   4073:  The `undefined <level>` option lets you decide what the algorithm is to do
                   4074:  with data points that are undefined (missing data, or undefined function
                   4075:  values), or exceed the given x-, y- or z-ranges.  Such points can either be
                   4076:  plotted nevertheless, or taken out of the input data set.  All surface
                   4077:  elements touching a point that is taken out will be taken out as well, thus
                   4078:  creating a hole in the surface.  If <level> = 3, equivalent to option
                   4079:  `noundefined`, no points will be thrown away at all.  This may produce all
                   4080:  kinds of problems elsewhere, so you should avoid this.  <level> = 2 will
                   4081:  throw away undefined points, but keep the out-of-range ones.  <level> = 1,
                   4082:  the default, will get rid of out-of-range points as well.
                   4083:
                   4084:  By specifying `noaltdiagonal`, you can override the default handling of a
                   4085:  special case can occur if `undefined` is active (i.e. <level> is not 3).
                   4086:  Each cell of the grid-structured input surface will be divided in two
                   4087:  triangles along one of its diagonals.  Normally, all these diagonals have
                   4088:  the same orientation relative to the grid.  If exactly one of the four cell
                   4089:  corners is excluded by the `undefined` handler, and this is on the usual
                   4090:  diagonal, both triangles will be excluded.  However if the default setting
                   4091:  of `altdiagonal` is active, the other diagonal will be chosen for this cell
                   4092:  instead, minimizing the size of the hole in the surface.
                   4093:
                   4094:  The `bentover` option controls what happens to another special case, this
                   4095:  time in conjunction with the `trianglepattern`.  For rather crumply surfaces,
                   4096:  it can happen that the two triangles a surface cell is divided into are seen
                   4097:  from opposite sides (i.e. the original quadrangle is 'bent over'), as
                   4098:  illustrated in the following ASCII art:
                   4099:
                   4100:                                                                C----B
                   4101:      original quadrangle:  A--B      displayed quadrangle:     |\   |
                   4102:        ("set view 0,0")    | /|    ("set view 75,75" perhaps)  | \  |
                   4103:                            |/ |                                |  \ |
                   4104:                            C--D                                |   \|
                   4105:                                                                A    D
                   4106:
                   4107:  If the diagonal edges of the surface cells aren't generally made visible by
                   4108:  bit 2 of the <bitpattern> there, the edge CB above wouldn't be drawn at all,
                   4109:  normally, making the resulting display hard to understand.  Therefore, the
                   4110:  default option of `bentover` will turn it visible in this case.  If you don't
                   4111:  want that, you may choose `nobentover` instead.
1.1.1.2 ! maekawa  4112: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/hidden.html"> Hidden Line Removal Demo</a> and
        !          4113: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/singulr.html"> Complex Hidden Line Demo. </a>
1.1       maekawa  4114: 3 isosamples
                   4115: ?commands set isosamples
                   4116: ?commands show isosamples
                   4117: ?set isosamples
                   4118: ?show isosamples
                   4119: ?isosamples
                   4120:  The isoline density (grid) for plotting functions as surfaces may be changed
                   4121:  by the `set isosamples` command.
                   4122:
                   4123:  Syntax:
                   4124:        set isosamples <iso_1> {,<iso_2>}
                   4125:        show isosamples
                   4126:
                   4127:  Each function surface plot will have <iso_1> iso-u lines and <iso_2> iso-v
                   4128:  lines.  If you only specify <iso_1>, <iso_2> will be set to the same value
                   4129:  as <iso_1>.  By default, sampling is set to 10 isolines per u or v axis.
                   4130:  A higher sampling rate will produce more accurate plots, but will take longer.
                   4131:  These parameters have no effect on data file plotting.
                   4132:
                   4133:  An isoline is a curve parameterized by one of the surface parameters while
                   4134:  the other surface parameter is fixed.  Isolines provide a simple means to
                   4135:  display a surface.  By fixing the u parameter of surface s(u,v), the iso-u
                   4136:  lines of the form c(v) = s(u0,v) are produced, and by fixing the v parameter,
                   4137:  the iso-v lines of the form c(u) = s(u,v0) are produced.
                   4138:
                   4139:  When a function surface plot is being done without the removal of hidden
                   4140:  lines, `set samples`  controls the number of points sampled along each
                   4141:  isoline;  see `set samples` and `set hidden3d`.  The contour algorithm
                   4142:  assumes that a function sample occurs at each isoline intersection, so
                   4143:  change in `samples` as well as `isosamples` may be desired when changing
                   4144:  the resolution of a function surface/contour.
                   4145: 3 key
                   4146: ?commands set key
                   4147: ?commands set nokey
                   4148: ?commands show key
                   4149: ?set key
                   4150: ?set nokey
                   4151: ?show key
                   4152: ?key
                   4153: ?nokey
                   4154: ?legend
                   4155:  The `set key` enables a key (or legend) describing plots on a plot.
                   4156:
                   4157:  The contents of the key, i.e., the names given to each plotted data set and
                   4158:  function and samples of the lines and/or symbols used to represent them, are
                   4159:  determined by the `title` and `with` options of the {`s`}`plot` command.
                   4160:  Please see `plot title` and `plot with` for more information.
                   4161:
                   4162:  Syntax:
                   4163:        set key {  left | right | top | bottom | outside | below
                   4164:                 | <position>}
                   4165:                {Left | Right} {{no}reverse}
                   4166:                {samplen <sample_length>} {spacing <vertical_spacing>}
                   4167:                {width <width_increment>}
                   4168:                {title "<text>"}
                   4169:                {{no}box { {linestyle | ls <line_style>}
                   4170:                           | {linetype | lt <line_type>}
                   4171:                             {linewidth | lw <line_width>}}}
                   4172:        set nokey
                   4173:        show key
                   4174:
                   4175:  By default the key is placed in the upper right corner of the graph.  The
                   4176:  keywords `left`, `right`, `top`, `bottom`, `outside` and `below` may be used
                   4177:  to place the key in the other corners inside the graph or to the right
                   4178:  (outside) or below the graph.  They may be given alone or combined.
                   4179:
                   4180:  Justification of the labels within the key is controlled by `Left` or `Right`
                   4181:  (default is `Right`).  The text and sample can be reversed (`reverse`) and a
                   4182:  box can be drawn around the key (`box {...}`) in a specified `linetype`
                   4183:  and `linewidth`, or a user-defined `linestyle`. Note that not all
                   4184:  terminal drivers support linewidth selection, though.
                   4185:
                   4186:  The length of the sample line can be controlled by `samplen`.  The sample
                   4187:  length is computed as the sum of the tic length and <sample_length> times the
                   4188:  character width.  `samplen` also affects the positions of point samples in
                   4189:  the key since these are drawn at the midpoint of the sample line, even if it
                   4190:  is not drawn.  <sample_length> must be an integer.
                   4191:
                   4192:  The vertical spacing between lines is controlled by `spacing`.  The spacing
                   4193:  is set equal to the product of the pointsize, the vertical tic size, and
                   4194:  <vertical_spacing>.  The program will guarantee that the vertical spacing is
                   4195:  no smaller than the character height.
                   4196:
                   4197:  The <width_increment> is a number of character widths to be added to or
                   4198:  subtracted from the length of the string.  This is useful only when you are
                   4199:  putting a box around the key and you are using control characters in the text.
                   4200:  `gnuplot` simply counts the number of characters in the string when computing
                   4201:  the box width; this allows you to correct it.
                   4202:
                   4203:  A title can be put on the key (`title "<text>"`)---see also `syntax` for the
                   4204:  distinction between text in single- or double-quotes.  The key title uses the
                   4205:  same justification as do the plot titles.
                   4206:
                   4207:  The defaults for `set key` are `right`, `top`, `Right`, `noreverse`, `samplen
                   4208:  4`, `spacing 1.25`, `title ""`, and `nobox`.  The default <linetype> is the
                   4209:  same as that used for the plot borders.  Entering `set key` with no options
                   4210:  returns the key to its default configuration.
                   4211:
                   4212:  The <position> can be a simple x,y,z as in previous versions, but these can
                   4213:  be preceded by one of four keywords (`first`, `second`, `graph`, `screen`)
                   4214:  which selects the coordinate system in which the position is specified.  See
                   4215:  `coordinates` for more details.
                   4216:
                   4217:  The key is drawn as a sequence of lines, with one plot described on each
                   4218:  line.  On the right-hand side (or the left-hand side, if `reverse` is
                   4219:  selected) of each line is a representation that attempts to mimic the way the
                   4220:  curve is plotted.  On the other side of each line is the text description
                   4221:  (the line title), obtained from the `plot` command.  The lines are vertically
                   4222:  arranged so that an imaginary straight line divides the left- and right-hand
                   4223:  sides of the key.  It is the coordinates of the top of this line that are
                   4224:  specified with the `set key` command.  In a `plot`, only the x and y
                   4225:  coordinates are used to specify the line position.  For a `splot`, x, y and
                   4226:  z are all used as a 3-d location mapped using the same mapping as the graph
                   4227:  itself to form the required 2-d screen position of the imaginary line.
                   4228:
                   4229:  Some or all of the key may be outside of the graph boundary, although this
                   4230:  may interfere with other labels and may cause an error on some devices.  If
                   4231:  you use the keywords `outside` or `below`, `gnuplot` makes space for the keys
                   4232:  and the graph becomes smaller.  Putting keys outside to the right, they
                   4233:  occupy as few columns as possible, and putting them below, as many columns as
                   4234:  possible (depending of the length of the labels), thus stealing as little
                   4235:  space from the graph as possible.
                   4236:
                   4237:  When using the TeX or PostScript drivers, or similar drivers where formatting
                   4238:  information is embedded in the string, `gnuplot` is unable to calculate
                   4239:  correctly the width of the string for key positioning.  If the key is to be
                   4240:  positioned at the left, it may be convenient to use the combination  `set key
                   4241:  left Left reverse`.  The box and gap in the grid will be the width of the
                   4242:  literal string.
                   4243:
                   4244:  If `splot` is being used to draw contours, the contour labels will be listed
                   4245:  in the key.  If the alignment of these labels is poor or a different number
                   4246:  of decimal places is desired, the label format can be specified.  See `set
                   4247:  clabel` for details.
                   4248:
                   4249:  Examples:
                   4250:
                   4251:  This places the key at the default location:
                   4252:        set key
                   4253:
                   4254:  This disables the key:
                   4255:        set nokey
                   4256:
                   4257:  This places a key at coordinates 2,3.5,2 in the default (first) coordinate
                   4258:  system:
                   4259:        set key 2,3.5,2
                   4260:
                   4261:  This places the key below the graph:
                   4262:        set key below
                   4263:
                   4264:  This places the key in the bottom left corner, left-justifies the text,
                   4265:  gives it a title, and draws a box around it in linetype 3:
                   4266:        set key left bottom Left title 'Legend' box 3
                   4267: 3 label
                   4268: ?commands set label
                   4269: ?commands set nolabel
                   4270: ?commands show label
                   4271: ?set label
                   4272: ?set nolabel
                   4273: ?show label
                   4274: ?label
                   4275: ?nolabel
                   4276:  Arbitrary labels can be placed on the plot using the `set label` command.
                   4277:
                   4278:  Syntax:
                   4279:        set label {<tag>} {"<label_text>"} {at <position>}
                   4280:                  {<justification>} {{no}rotate} {font "<name><,size>"}
                   4281:        set nolabel {<tag>}
                   4282:        show label
                   4283:
                   4284:  The <position> is specified by either x,y or x,y,z, and may be preceded by
                   4285:  `first`, `second`, `graph`, or `screen` to select the coordinate system.
                   4286:  See `coordinates` for details.
                   4287:
                   4288:  The tag is an integer that is used to identify the label. If no <tag> is
                   4289:  given, the lowest unused tag value is assigned automatically.  The tag can be
                   4290:  used to delete or modify a specific label.  To change any attribute of an
                   4291:  existing label, use the `set label` command with the appropriate tag, and
                   4292:  specify the parts of the label to be changed.
                   4293:
                   4294:  By default, the text is placed flush left against the point x,y,z.  To adjust
                   4295:  the way the label is positioned with respect to the point x,y,z, add the
                   4296:  parameter <justification>, which may be `left`, `right` or `center`,
                   4297:  indicating that the point is to be at the left, right or center of the text.
                   4298:  Labels outside the plotted boundaries are permitted but may interfere with
                   4299:  axis labels or other text.
                   4300:
                   4301:  If `rotate` is given, the label is written vertically (if the terminal can do
                   4302:  so, of course).
                   4303:
                   4304:  If one (or more) axis is timeseries, the appropriate coordinate should be
                   4305:  given as a quoted time string according to the `timefmt` format string.  See
                   4306:  `set xdata` and `set timefmt`.
                   4307:
                   4308:  The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
                   4309:  a newline.
                   4310:
                   4311:  Examples:
                   4312:
                   4313:  To set a label at (1,2) to "y=x", use:
                   4314:        set label "y=x" at 1,2
                   4315:
                   4316:  To set a Sigma of size 24, from the Symbol font set, at the center of
                   4317:  the graph, use:
                   4318:        set label "S" at graph 0.5,0.5 center font "Symbol,24"
                   4319:
                   4320:  To set a label "y=x^2" with the right of the text at (2,3,4), and tag the
                   4321:  label as number 3, use:
                   4322:        set label 3 "y=x^2" at 2,3,4 right
                   4323:
                   4324:  To change the preceding label to center justification, use:
                   4325:        set label 3 center
                   4326:
                   4327:  To delete label number 2, use:
                   4328:        set nolabel 2
                   4329:
                   4330:  To delete all labels, use:
                   4331:        set nolabel
                   4332:
                   4333:  To show all labels (in tag order), use:
                   4334:        show label
                   4335:
                   4336:  To set a label on a graph with a timeseries on the x axis, use, for example:
                   4337:        set timefmt "%d/%m/%y,%H:%M"
                   4338:        set label "Harvest" at "25/8/93",1
                   4339: 3 linestyle
                   4340: ?commands set linestyle
                   4341: ?commands set nolinestyle
                   4342: ?commands show linestyle
                   4343: ?set linestyle
                   4344: ?set nolinestyle
                   4345: ?show linestyle
                   4346: ?linestyle
                   4347:  Each terminal has a default set of line and point types, which can be seen
                   4348:  by using the command `test`.  `set linestyle` defines a set of line types
                   4349:  and widths and point types and sizes so that you can refer to them later by
                   4350:  an index instead of repeating all the information at each invocation.
                   4351:
                   4352:  Syntax:
                   4353:        set linestyle <index> {linetype | lt <line_type>}
                   4354:                              {linewidth | lw <line_width>}
                   4355:                              {pointtype | pt <point_type>}
                   4356:                              {pointsize | ps <point_size>}
                   4357:        set nolinestyle
                   4358:        show linestyle
                   4359:
                   4360:  The line and point types are taken from the default types for the terminal
                   4361:  currently in use.  The line width and point size are multipliers for the
                   4362:  default width and size (but note that <point_size> here is unaffected by
                   4363:  the multiplier given on 'set pointsize').
                   4364:
                   4365:  The defaults for the line and point types is the index.  The defaults for
                   4366:  the width and size are both unity.
                   4367:
                   4368:  Linestyles created by this mechanism do not replace the default styles;
                   4369:  both may be used.
                   4370:
                   4371:  Not all terminals support the `linewidth` and `pointsize` features; if
                   4372:  not supported, the option will be ignored.
                   4373:
                   4374:  Note that this feature is not completely implemented; linestyles defined by
                   4375:  this mechanism may be used with 'plot', 'splot', 'replot', and 'set arrow',
                   4376:  but not by other commands that allow the default index to be used, such as
                   4377:  'set grid'.
                   4378:
                   4379:  Example:
                   4380:  Suppose that the default lines for indices 1, 2, and 3 are red, green, and
                   4381:  blue, respectively, and the default point shapes for the same indices are a
                   4382:  square, a cross, and a triangle, respectively.  Then
                   4383:
                   4384:        set linestyle 1 lt 2 lw 2 pt 3 ps 0.5
                   4385:
                   4386:  defines a new linestyle that is green and twice the default width and a new
                   4387:  pointstyle that is a half-sized triangle.  The commands
                   4388:
                   4389:        set function style lines
                   4390:        plot f(x) lt 3, g(x) ls 1
                   4391:
                   4392:  will create a plot of f(x) using the default blue line and a plot of g(x)
                   4393:  using the user-defined wide green line.  Similarly the commands
                   4394:
                   4395:        set function style linespoints
                   4396:        plot p(x) lt 1 pt 3, q(x) ls 1
                   4397:
                   4398:  will create a plot of f(x) using the default triangles connected by a red
                   4399:  line and q(x) using small triangles connected by a green line.
                   4400: 3 lmargin
                   4401: ?commands set lmargin
                   4402: ?set lmargin
                   4403: ?lmargin
                   4404:  The command `set lmargin` sets the size of the left margin.  Please see
                   4405:  `set margin` for details.
                   4406: 3 locale
                   4407: ?commands set locale
                   4408: ?commands show logscale
                   4409: ?set locale
                   4410: ?show logscale
                   4411: ?locale
                   4412:  The `locale` setting determines the language with which `{x,y,z}{d,m}tics`
                   4413:  will write the days and months.
                   4414:
                   4415:  Syntax:
                   4416:        set locale {"<locale>"}
                   4417:
                   4418:  <locale> may be any language designation acceptable to your installation.
                   4419:  See your system documentation for the available options.  The default value
                   4420:  is determined from the LANG environment variable.
                   4421: 3 logscale
                   4422: ?commands set logscale
                   4423: ?commands set nologscale
                   4424: ?commands show logscale
                   4425: ?set logscale
                   4426: ?set nologscale
                   4427: ?show logscale
                   4428: ?logscale
                   4429: ?nologscale
                   4430:  Log scaling may be set on the x, y, z, x2 and/or y2 axes.
                   4431:
                   4432:  Syntax:
                   4433:        set logscale <axes> <base>
                   4434:        set nologscale <axes>
                   4435:        show logscale
                   4436:
                   4437:  where <axes> may be any combinations of `x`, `y`, and `z`, in any order, or
                   4438:  `x2` or `y2` and where <base> is the base of the log scaling.  If <base> is
                   4439:  not given, then 10 is assumed.  If <axes> is not given, then all axes are
                   4440:  assumed.  `set nologscale` turns off log scaling for the specified axes.
                   4441:
                   4442:  Examples:
                   4443:
                   4444:  To enable log scaling in both x and z axes:
                   4445:        set logscale xz
                   4446:
                   4447:  To enable scaling log base 2 of the y axis:
                   4448:        set logscale y 2
                   4449:
                   4450:  To disable z axis log scaling:
                   4451:        set nologscale z
                   4452: 3 mapping
                   4453: ?commands set mapping
                   4454: ?commands show mapping
                   4455: ?set mapping
                   4456: ?show mapping
                   4457: ?mapping
                   4458:  If data are provided to `splot` in spherical or cylindrical coordinates,
                   4459:  the `set mapping` command should be used to instruct `gnuplot` how to
                   4460:  interpret them.
                   4461:
                   4462:  Syntax:
                   4463:        set mapping {cartesian | spherical | cylindrical}
                   4464:
                   4465:  A cartesian coordinate system is used by default.
                   4466:
                   4467:  For a spherical coordinate system, the data occupy two or three columns (or
                   4468:  `using` entries).  The first two are interpreted as the polar and azimuthal
                   4469:  angles theta and phi (in the units specified by `set angles`).  The radius r
                   4470:  is taken from the third column if there is one, or is set to unity if there
                   4471:  is no third column.  The mapping is:
                   4472:
                   4473:        x = r * cos(theta) * cos(phi)
                   4474:        y = r * sin(theta) * cos(phi)
                   4475:        z = r * sin(phi)
                   4476:
                   4477:  Note that this is a "geographic" spherical system, rather than a "polar" one.
                   4478:
                   4479:  For a cylindrical coordinate system, the data again occupy two or three
                   4480:  columns.  The first two are interpreted as theta (in the units specified by
                   4481:  `set angles`) and z.  The radius is either taken from the third column or set
                   4482:  to unity, as in the spherical case.  The mapping is:
                   4483:
                   4484:        x = r * cos(theta)
                   4485:        y = r * sin(theta)
                   4486:        z = z
                   4487:
                   4488:  The effects of `mapping` can be duplicated with the `using` filter on the
                   4489:  `splot` command, but `mapping` may be more convenient if many data files are
                   4490:  to be processed.  However even if `mapping` is used, `using` may still be
                   4491:  necessary if the data in the file are not in the required order.
                   4492:
                   4493:  `mapping` has no effect on `plot`.
1.1.1.2 ! maekawa  4494: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/world.html">Mapping Demos.</a>
1.1       maekawa  4495: 3 margin
                   4496: ?commands set margin
                   4497: ?commands show margin
                   4498: ?set margin
                   4499: ?show margin
                   4500: ?margin
1.1.1.2 ! maekawa  4501:  The computed margins can be overridden by the `set margin` commands.  `show
        !          4502:  margin` shows the current settings.
1.1       maekawa  4503:
                   4504:  Syntax:
                   4505:        set bmargin {<margin>}
                   4506:        set lmargin {<margin>}
                   4507:        set rmargin {<margin>}
                   4508:        set tmargin {<margin>}
                   4509:        show margin
                   4510:
                   4511:  The units of <margin> are character heights or widths, as appropriate.  A
                   4512:  positive value defines the absolute size of the margin.  A negative value
                   4513:  (or none) causes `gnuplot` to revert to the computed value.
1.1.1.2 ! maekawa  4514:
        !          4515:  Normally the margins of a plot are automatically calculated based on tics,
        !          4516:  tic labels, axis labels, the plot title, the timestamp and the size of the
        !          4517:  key if it is outside the borders.  If, however, tics are attached to the
        !          4518:  axes (`set xtics axis`, for example), neither the tics themselves nor their
        !          4519:  labels will be included in either the margin calculation or the calculation
        !          4520:  of the positions of other text to be written in the margin.  This can lead
        !          4521:  to tic labels overwriting other text if the axis is very close to the border.
1.1       maekawa  4522: 3 missing
                   4523: ?commands set missing
                   4524: ?set missing
                   4525: ?missing
                   4526:  The `set missing` command allows you to tell `gnuplot` what character is
                   4527:  used in a data file to denote missing data.
                   4528:
                   4529:  Syntax:
                   4530:        set missing {"<character>"}
                   4531:        show missing
                   4532:
                   4533:  Example:
                   4534:        set missing "?"
                   4535:
                   4536:  would mean that, when plotting a file containing
                   4537:
                   4538:           1 1
                   4539:           2 ?
                   4540:           3 2
                   4541:
                   4542:  the middle line would be ignored.
                   4543:
                   4544:  There is no default character for `missing`.
                   4545: 3 multiplot
                   4546: ?commands set multiplot
                   4547: ?commands set nomultiplot
                   4548: ?set multiplot
                   4549: ?set nomultiplot
                   4550: ?multiplot
                   4551: ?nomultiplot
                   4552:  The command `set multiplot` places `gnuplot` in the multiplot mode, in which
                   4553:  several plots are placed on the same page, window, or screen.
                   4554:
                   4555:  Syntax:
                   4556:        set multiplot
                   4557:        set nomultiplot
                   4558:
                   4559:  For some terminals, no plot is displayed until the command `set nomultiplot`
                   4560:  is given, which causes the entire page to be drawn and then returns `gnuplot`
                   4561:  to its normal single-plot mode.  For other terminals, each separate `plot`
                   4562:  command produces a plot, but the screen may not be cleared between plots.
                   4563:
                   4564:  Any labels or arrows that have been defined will be drawn for each plot
                   4565:  according to the current size and origin (unless their coordinates are
                   4566:  defined in the `screen` system).  Just about everything else that can be
                   4567:  `set` is applied to each plot, too.  If you want something to appear only
                   4568:  once on the page, for instance a single time stamp, you'll need to put a `set
                   4569:  time`/`set notime` pair around one of the `plot`, `splot` or `replot`
                   4570:  commands within the `set multiplot`/`set nomultiplot` block.
                   4571:
                   4572:  The commands `set origin` and `set size` must be used to correctly position
                   4573:  each plot; see `set origin` and `set size` for details of their usage.
                   4574:
                   4575:  Example:
                   4576:        set size 0.7,0.7
                   4577:        set origin 0.1,0.1
                   4578:        set multiplot
                   4579:        set size 0.4,0.4
                   4580:        set origin 0.1,0.1
                   4581:        plot sin(x)
                   4582:        set size 0.2,0.2
                   4583:        set origin 0.5,0.5
                   4584:        plot cos(x)
                   4585:        set nomultiplot
                   4586:
                   4587:  displays a plot of cos(x) stacked above a plot of sin(x).  Note the initial
                   4588:  `set size` and `set origin`.  While these are not always required, their
                   4589:  inclusion is recommended.  Some terminal drivers require that bounding box
                   4590:  information be available before any plots can be made, and the form given
                   4591:  above guarantees that the bounding box will include the entire plot array
                   4592:  rather than just the bounding box of the first plot.
                   4593:
                   4594:  `set size` and `set origin` refer to the entire plotting area used for each
                   4595:  plot.  If you want to have the axes themselves line up, you can guarantee
                   4596:  that the margins are the same size with the `set margin` commands.  See
                   4597:  `set margin` for their use.  Note that the margin settings are absolute,
                   4598:  in character units, so the appearance of the graph in the remaining space
                   4599:  will depend on the screen size of the display device, e.g., perhaps quite
                   4600:  different on a video display and a printer.
1.1.1.2 ! maekawa  4601: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/multiplt.html"> See demo. </a>
1.1       maekawa  4602: 3 mx2tics
                   4603: ?commands set mx2tics
                   4604: ?commands set nomx2tics
                   4605: ?commands show mx2tics
                   4606: ?set mx2tics
                   4607: ?set nomx2tics
                   4608: ?show mx2tics
                   4609: ?mx2tics
                   4610: ?nomx2tics
                   4611:  Minor tic marks along the x2 (top) axis are controlled by `set mx2tics`.
                   4612:  Please see `set mxtics`.
                   4613: 3 mxtics
                   4614: ?commands set mxtics
                   4615: ?commands set nomxtics
                   4616: ?commands show mxtics
                   4617: ?set mxtics
                   4618: ?set nomxtics
                   4619: ?show mxtics
                   4620: ?mxtics
                   4621: ?nomxtics
                   4622:  Minor tic marks along the x axis are controlled by `set mxtics`.  They can be
                   4623:  turned off with `set nomxtics`.  Similar commands control minor tics along
                   4624:  the other axes.
                   4625:
                   4626:  Syntax:
                   4627:        set mxtics {<freq> | default}
                   4628:        set nomxtics
                   4629:        show mxtics
                   4630:
                   4631:  The same syntax applies to `mytics`, `mztics`, `mx2tics` and `my2tics`.
                   4632:
                   4633:  <freq> is the number of sub-intervals (NOT the number of minor tics) between
                   4634:  major tics (ten is the default for a linear axis, so there are nine minor
                   4635:  tics between major tics). Selecting `default` will return the number of minor
                   4636:  ticks to its default value.
                   4637:
                   4638:  If the axis is logarithmic, the number of sub-intervals will be set to a
                   4639:  reasonable number by default (based upon the length of a decade).  This will
                   4640:  be overridden if <freq> is given.  However the usual minor tics (2, 3, ...,
                   4641:  8, 9 between 1 and 10, for example) are obtained by setting <freq> to 10,
                   4642:  even though there are but nine sub-intervals.
                   4643:
                   4644:  Minor tics can be used only with uniformly spaced major tics.  Since major
                   4645:  tics can be placed arbitrarily by `set {x|x2|y|y2|z}tics`, minor tics cannot
                   4646:  be used if major tics are explicitly `set`.
                   4647:
                   4648:  By default, minor tics are off for linear axes and on for logarithmic axes.
                   4649:  They inherit the settings for `axis|border` and `{no}mirror` specified for
                   4650:  the major tics.  Please see `set xtics` for information about these.
                   4651: 3 my2tics
                   4652: ?commands set my2tics
                   4653: ?commands set nomy2tics
                   4654: ?commands show my2tics
                   4655: ?set my2tics
                   4656: ?set nomy2tics
                   4657: ?show my2tics
                   4658: ?my2tics
                   4659: ?nomy2tics
                   4660:  Minor tic marks along the y2 (right-hand) axis are controlled by `set
                   4661:  my2tics`.  Please see `set mxtics`.
                   4662: 3 mytics
                   4663: ?commands set mytics
                   4664: ?commands set nomytics
                   4665: ?commands show mytics
                   4666: ?set mytics
                   4667: ?set nomytics
                   4668: ?show mytics
                   4669: ?mytics
                   4670: ?nomytics
                   4671:  Minor tic marks along the y axis are controlled by `set mytics`.  Please
                   4672:  see `set mxtics`.
                   4673: 3 mztics
                   4674: ?commands set mztics
                   4675: ?commands set nomztics
                   4676: ?commands show mztics
                   4677: ?set mztics
                   4678: ?set nomztics
                   4679: ?show mztics
                   4680: ?mztics
                   4681: ?nomztics
                   4682:  Minor tic marks along the z axis are controlled by `set mztics`.  Please
                   4683:  see `set mxtics`.
                   4684: 3 offsets
                   4685: ?commands set offsets
                   4686: ?commands set nooffsets
                   4687: ?commands show offsets
                   4688: ?set offsets
                   4689: ?set nooffsets
                   4690: ?show offsets
                   4691: ?offsets
                   4692: ?nooffsets
                   4693:  Offsets provide a mechanism to put a boundary around the data inside of an
                   4694:  autoscaled graph.
                   4695:
                   4696:  Syntax:
                   4697:        set offsets <left>, <right>, <top>, <bottom>
                   4698:        set nooffsets
                   4699:        show offsets
                   4700:
                   4701:  Each offset may be a constant or an expression.  Each defaults to 0.  Left
                   4702:  and right offsets are given in units of the x axis, top and bottom offsets in
                   4703:  units of the y axis.  A positive offset expands the graph in the specified
                   4704:  direction, e.g., a positive bottom offset makes ymin more negative.  Negative
                   4705:  offsets, while permitted, can have unexpected interactions with autoscaling
                   4706:  and clipping.
                   4707:
                   4708:  Offsets are ignored in `splot`s.
                   4709:
                   4710:  Example:
                   4711:        set offsets 0, 0, 2, 2
                   4712:        plot sin(x)
                   4713:
                   4714:  This graph of sin(x) will have a y range [-3:3] because the function
                   4715:  will be autoscaled to [-1:1] and the vertical offsets are each two.
                   4716: 3 origin
                   4717: ?commands set origin
                   4718: ?commands show origin
                   4719: ?set origin
                   4720: ?show origin
                   4721: ?origin
                   4722:  The `set origin` command is used to specify the origin of a plotting surface
                   4723:  (i.e., the graph and its margins) on the screen.  The coordinates are given
                   4724:  in the `screen` coordinate system (see `coordinates` for information about
                   4725:  this system).
                   4726:
                   4727:  Syntax:
                   4728:        set origin <x-origin>,<y-origin>
                   4729: 3 output
                   4730: ?commands set output
                   4731: ?commands show output
                   4732: ?set output
                   4733: ?show output
                   4734: ?output
                   4735:  By default, screens are displayed to the standard output. The `set output`
                   4736:  command redirects the display to the specified file or device.
                   4737:
                   4738:  Syntax:
                   4739:        set output {"<filename>"}
                   4740:        show output
                   4741:
                   4742:  The filename must be enclosed in quotes.  If the filename is omitted, any
                   4743:  output file opened by a previous invocation of `set output` will be closed
                   4744:  and new output will be sent to STDOUT.  (If you give the command `set output
                   4745:  "STDOUT"`, your output may be sent to a file named "STDOUT"!  ["May be", not
                   4746:  "will be", because some terminals, like `x11`, ignore `set output`.])
                   4747:
                   4748:  MSDOS users should note that the \ character has special significance in
                   4749:  double-quoted strings, so single-quotes should be used for filenames in
                   4750:  different directories.
                   4751:
                   4752:  When both `set terminal` and `set output` are used together, it is safest to
                   4753:  give `set terminal` first, because some terminals set a flag which is needed
                   4754:  in some operating systems.  This would be the case, for example, if the
                   4755:  operating system needs to know whether or not a file is to be formatted in
                   4756:  order to open it properly.
                   4757:
                   4758:  On machines with popen functions (Unix), output can be piped through a shell
                   4759:  command if the first non-whitespace character of the filename is '|'.
                   4760:  For instance,
                   4761:
                   4762:        set output "|lpr -Plaser filename"
                   4763:        set output "|lp -dlaser filename"
                   4764:
                   4765:  On MSDOS machines, `set output "PRN"` will direct the output to the default
                   4766:  printer.  On VMS, output can be sent directly to any spooled device.  It is
                   4767:  also possible to send the output to DECnet transparent tasks, which allows
                   4768:  some flexibility.
                   4769: 3 parametric
                   4770: ?commands set parametric
                   4771: ?commands set noparametric
                   4772: ?commands show parametric
                   4773: ?set parametric
                   4774: ?set noparametric
                   4775: ?show parametric
                   4776: ?parametric
                   4777: ?noparametric
                   4778:  The `set parametric` command changes the meaning of `plot` (`splot`) from
                   4779:  normal functions to parametric functions.  The command `set noparametric`
                   4780:  restores the plotting style to normal, single-valued expression plotting.
                   4781:
                   4782:  Syntax:
                   4783:        set parametric
                   4784:        set noparametric
                   4785:        show parametric
                   4786:
                   4787:  For 2-d plotting, a parametric function is determined by a pair of parametric
                   4788:  functions operating on a parameter.  An example of a 2-d parametric function
                   4789:  would be `plot sin(t),cos(t)`, which draws a circle (if the aspect ratio is
                   4790:  set correctly---see `set size`).  `gnuplot` will display an error message if
                   4791:  both functions are not provided for a parametric `plot`.
                   4792:
                   4793:  For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v), z=h(u,v).
                   4794:  Therefore a triplet of functions is required.  An example of a 3-d parametric
                   4795:  function would be `cos(u)*cos(v),cos(u)*sin(v),sin(u)`, which draws a sphere.
                   4796:  `gnuplot` will display an error message if all three functions are not
                   4797:  provided for a parametric `splot`.
                   4798:
                   4799:  The total set of possible plots is a superset of the simple f(x) style plots,
                   4800:  since the two functions can describe the x and y values to be computed
                   4801:  separately.  In fact, plots of the type t,f(t) are equivalent to those
                   4802:  produced with f(x) because the x values are computed using the identity
                   4803:  function.  Similarly, 3-d plots of the type u,v,f(u,v) are equivalent to
                   4804:  f(x,y).
                   4805:
                   4806:  Note that the order the parametric functions are specified is xfunction,
                   4807:  yfunction (and zfunction) and that each operates over the common parametric
                   4808:  domain.
                   4809:
                   4810:  Also, the `set parametric` function implies a new range of values.  Whereas
                   4811:  the normal f(x) and f(x,y) style plotting assume an xrange and yrange (and
                   4812:  zrange), the parametric mode additionally specifies a trange, urange, and
                   4813:  vrange.  These ranges may be set directly with `set trange`, `set urange`,
                   4814:  and `set vrange`, or by specifying the range on the `plot` or `splot`
                   4815:  commands.  Currently the default range for these parametric variables is
                   4816:  [-5:5].  Setting the ranges to something more meaningful is expected.
                   4817: 3 pointsize
                   4818: ?commands set pointsize
                   4819: ?commands show pointsize
                   4820: ?set pointsize
                   4821: ?show pointsize
                   4822: ?pointsize
                   4823:  The `set pointsize` command scales the size of the points used in plots.
                   4824:
                   4825:  Syntax:
                   4826:        set pointsize <multiplier>
                   4827:        show pointsize
                   4828:
                   4829:  The default is a multiplier of 1.0.  Larger pointsizes may be useful to
                   4830:  make points more visible in bitmapped graphics.
                   4831:
                   4832:  The pointsize of a single plot may be changed on the `plot` command.  See
                   4833:  `plot with` for details.
                   4834:
                   4835:  Please note that the pointsize setting is not supported by all terminal
                   4836:  types.
                   4837: 3 polar
                   4838: ?commands set polar
                   4839: ?commands set nopolar
                   4840: ?commands show polar
                   4841: ?set polar
                   4842: ?set nopolar
                   4843: ?show polar
                   4844: ?polar
                   4845: ?nopolar
                   4846:  The `set polar` command changes the meaning of the plot from rectangular
                   4847:  coordinates to polar coordinates.
                   4848:
                   4849:  Syntax:
                   4850:        set polar
                   4851:        set nopolar
                   4852:        show polar
                   4853:
                   4854:  There have been changes made to polar mode in version 3.7, so that scripts
                   4855:  for `gnuplot` versions 3.5 and earlier will require modification.  The main
                   4856:  change is that the dummy variable t is used for the angle so that the x and
                   4857:  y ranges can be controlled independently.  Other changes are:
                   4858:  1) tics are no longer put along the zero axes automatically
                   4859:  ---use `set xtics axis nomirror`; `set ytics axis nomirror`;
                   4860:  2) the grid, if selected, is not automatically polar
                   4861:  ---use `set grid polar`;
                   4862:  3) the grid is not labelled with angles
                   4863:  ---use `set label` as necessary.
                   4864:
                   4865:  In polar coordinates, the dummy variable (t) is an angle.  The default range
                   4866:  of t is [0:2*pi], or, if degree units have been selected, to [0:360] (see
                   4867:  `set angles`).
                   4868:
                   4869:  The command `set nopolar` changes the meaning of the plot back to the default
                   4870:  rectangular coordinate system.
                   4871:
                   4872:  The `set polar` command is not supported for `splot`s.  See the `set mapping`
                   4873:  command for similar functionality for `splot`s.
                   4874:
                   4875:  While in polar coordinates the meaning of an expression in t is really
                   4876:  r = f(t), where t is an angle of rotation.  The trange controls the domain
                   4877:  (the angle) of the function, and the x and y ranges control the range of the
                   4878:  graph in the x and y directions.  Each of these ranges, as well as the
                   4879:  rrange, may be autoscaled or set explicitly.  See `set xrange` for details
                   4880:  of all the `set range` commands.
                   4881:
                   4882:  Example:
                   4883:        set polar
                   4884:        plot t*sin(t)
                   4885:        plot [-2*pi:2*pi] [-3:3] [-3:3] t*sin(t)
                   4886:
                   4887:  The first `plot` uses the default polar angular domain of 0 to 2*pi.  The
                   4888:  radius and the size of the graph are scaled automatically.  The second `plot`
                   4889:  expands the domain, and restricts the size of the graph to [-3:3] in both
                   4890:  directions.
                   4891:
                   4892:  You may want to `set size square` to have `gnuplot` try to make the aspect
                   4893:  ratio equal to unity, so that circles look circular.
1.1.1.2 ! maekawa  4894: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/polar.html">Polar demos </a>
        !          4895: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/poldat.html">Polar Data Plot. </a>
1.1       maekawa  4896: 3 rmargin
                   4897: ?commands set rmargin
                   4898: ?set rmargin
                   4899: ?rmargin
                   4900:  The command `set rmargin` sets the size of the right margin.  Please see
                   4901:  `set margin` for details.
                   4902: 3 rrange
                   4903: ?commands set rrange
                   4904: ?commands show rrange
                   4905: ?set rrange
                   4906: ?show rrange
                   4907: ?rrange
                   4908:  The `set rrange` command sets the range of the radial coordinate for a
                   4909:  graph in polar mode.  Please see `set xrange` for details.
                   4910: 3 samples
                   4911: ?commands set samples
                   4912: ?commands show samples
                   4913: ?set samples
                   4914: ?show samples
                   4915: ?samples
                   4916:  The sampling rate of functions, or for interpolating data, may be changed
                   4917:  by the `set samples` command.
                   4918:
                   4919:  Syntax:
                   4920:        set samples <samples_1> {,<samples_2>}
                   4921:        show samples
                   4922:
                   4923:  By default, sampling is set to 100 points.  A higher sampling rate will
                   4924:  produce more accurate plots, but will take longer.  This parameter has no
                   4925:  effect on data file plotting unless one of the interpolation/approximation
                   4926:  options is used.  See `plot smooth` re 2-d data and `set cntrparam` and
                   4927:  `set dgrid3d` re 3-d data.
                   4928:
                   4929:  When a 2-d graph is being done, only the value of <samples_1> is relevant.
                   4930:
                   4931:  When a surface plot is being done without the removal of hidden lines, the
                   4932:  value of samples specifies the number of samples that are to be evaluated for
                   4933:  the isolines.  Each iso-v line will have <sample_1> samples and each iso-u
                   4934:  line will have <sample_2> samples.  If you only specify <samples_1>,
                   4935:  <samples_2> will be set to the same value as <samples_1>.  See also `set
                   4936:  isosamples`.
                   4937: 3 size
                   4938: ?commands set size
                   4939: ?commands show size
                   4940: ?set size
                   4941: ?show size
                   4942: ?size
                   4943:  The `set size` command scales the displayed size of the plot.
                   4944:
                   4945:  Syntax:
                   4946:        set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>}
                   4947:        show size
                   4948:
                   4949:  The <xscale> and <yscale> values are the scaling factors for the size of the
                   4950:  plot, which includes the graph and the margins.
                   4951:
                   4952:  `ratio` causes `gnuplot` to try to create a graph with an aspect ratio of <r>
                   4953:  (the ratio of the y-axis length to the x-axis length) within the portion of
                   4954:  the plot specified by <xscale> and <yscale>.
                   4955:
                   4956:  The meaning of a negative value for <r> is different.  If <r>=-1, gnuplot
                   4957:  tries to set the scales so that the unit has the same length on both the x
                   4958:  and y axes (suitable for geographical data, for instance).  If <r>=-2, the
                   4959:  unit on y has twice the length of the unit on x, and so on.
                   4960:
                   4961:  The success of `gnuplot` in producing the requested aspect ratio depends on
                   4962:  the terminal selected.  The graph area will be the largest rectangle of
                   4963:  aspect ratio <r> that will fit into the specified portion of the output
                   4964:  (leaving adequate margins, of course).
                   4965:
                   4966:  `square` is a synonym for `ratio 1`.
                   4967:
                   4968:  Both `noratio` and `nosquare` return the graph to the default aspect ratio
                   4969:  of the terminal, but do not return <xscale> or <yscale> to their default
                   4970:  values (1.0).
                   4971:
                   4972:  `ratio` and `square` have no effect on 3-d plots.
                   4973:
                   4974:  `set size` is relative to the default size, which differs from terminal to
                   4975:  terminal.  Since `gnuplot` fills as much of the available plotting area as
                   4976:  possible by default, it is safer to use `set size` to decrease the size of
                   4977:  a plot than to increase it.  See `set terminal` for the default sizes.
                   4978:
                   4979:  On some terminals, changing the size of the plot will result in text being
                   4980:  misplaced.
                   4981:
                   4982:  Examples:
                   4983:
                   4984:  To set the size to normal size use:
                   4985:        set size 1,1
                   4986:
                   4987:  To make the graph half size and square use:
                   4988:        set size square 0.5,0.5
                   4989:
                   4990:  To make the graph twice as high as wide use:
                   4991:        set size ratio 2
                   4992:
1.1.1.2 ! maekawa  4993: ^<a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/airfoil.html"> See demo. </a>
1.1       maekawa  4994: 3 style
                   4995: ?commands set function style
                   4996: ?commands show function style
                   4997: ?commands set data style
                   4998: ?commands show data style
                   4999: ?set function style
                   5000: ?show function style
                   5001: ?set data style
                   5002: ?show data style
                   5003: ?set style
                   5004: ?show style
                   5005:  Default styles are chosen with the `set function style` and `set data style`
                   5006:  commands.  See `plot with` for information about how to override the default
                   5007:  plotting style for individual functions and data sets.
                   5008:
                   5009:  Syntax:
                   5010:        set function style <style>
                   5011:        set data style <style>
                   5012:        show function style
                   5013:        show data style
                   5014:
                   5015:  The types used for all line and point styles (i.e., solid, dash-dot, color,
                   5016:  etc. for lines; circles, squares, crosses, etc. for points) will be either
                   5017:  those specified on the `plot` or `splot` command or will be chosen
                   5018:  sequentially from the types available to the terminal in use.  Use the
                   5019:  command `test` to see what is available.
                   5020:
                   5021:  None of the styles requiring more than two columns of information (e.g.,
                   5022:  `errorbars`) can be used with `splot`s or function `plot`s.  Neither `boxes`
                   5023:  nor any of the `steps` styles can be used with `splot`s.  If an inappropriate
                   5024:  style is specified, it will be changed to `points`.
                   5025:
                   5026:  For 2-d data with more than two columns, `gnuplot` is picky about the allowed
                   5027:  `errorbar` styles.  The `using` option on the `plot` command can be used to
                   5028:  set up the correct columns for the style you want.  (In this discussion,
                   5029:  "column" will be used to refer both to a column in the data file and an entry
                   5030:  in the `using` list.)
                   5031:
                   5032:  For three columns, only `xerrorbars`, `yerrorbars` (or `errorbars`), `boxes`,
                   5033:  and `boxerrorbars` are allowed.  If another plot style is used, the style
                   5034:  will be changed to `yerrorbars`.  The `boxerrorbars` style will calculate the
                   5035:  boxwidth automatically.
                   5036:
                   5037:  For four columns, only `xerrorbars`, `yerrorbars` (or `errorbars`),
                   5038:  `xyerrorbars`, `boxxyerrorbars`, and `boxerrorbars` are allowed.  An illegal
                   5039:  style will be changed to `yerrorbars`.
                   5040:
                   5041:  Five-column data allow only the `boxerrorbars`, `financebars`, and
                   5042:  `candlesticks` styles.  (The last two of these are primarily used for plots
                   5043:  of financial prices.)  An illegal style will be changed to `boxerrorbars`
                   5044:  before plotting.
                   5045:
                   5046:  Six- and seven-column data only allow the `xyerrorbars` and `boxxyerrorbars`
                   5047:  styles.  Illegal styles will be changed to `xyerrorbars` before plotting.
                   5048:
                   5049:  For more information about error bars, please see `plot errorbars`.
                   5050: 4 boxerrorbars
                   5051: ?commands set style boxerrorbars
                   5052: ?set style boxerrorbars
                   5053: ?style boxerrorbars
                   5054: ?boxerrorbars
                   5055:  The `boxerrorbars` style is only relevant to 2-d data plotting.  It is a
                   5056:  combination of the `boxes` and `yerrorbars` styles.  The boxwidth will come
                   5057:  from the fourth column if the y errors are in the form of "ydelta" and the
                   5058:  boxwidth was not previously set equal to -2.0 (`set boxwidth -2.0`) or from
                   5059:  the fifth column if the y errors are in the form of "ylow yhigh".  The
                   5060:  special case  `boxwidth = -2.0` is for four-column data with y errors in the
                   5061:  form "ylow yhigh".  In this case the boxwidth will be calculated so that each
                   5062:  box touches the adjacent boxes.  The width will also be calculated in cases
                   5063:  where three-column data are used.
                   5064:
                   5065:  The box height is determined from the y error in the same way as it is for
                   5066:  the `yerrorbars` style---either from y-ydelta to y+ydelta or from ylow to
                   5067:  yhigh, depending on how many data columns are provided.
                   5068: ^<a href="http://www.nas.nasa.gov/~woo/gnuplot/errorbar/errorbar.html"> See Demo. </a>
                   5069: 4 boxes
                   5070: ?commands set style boxes
                   5071: ?commands set style bargraph
                   5072: ?set style boxes
                   5073: ?set style bargraph
                   5074: ?style boxes
                   5075: ?style bargraph
                   5076: ?boxes
                   5077: ?bargraph
                   5078:  The `boxes` style is only relevant to 2-d plotting.  It draws a box centered
                   5079:  about the given x coordinate from the x axis (not the graph border) to the
                   5080:  given y coordinate.  The width of the box is obtained in one of three ways.
                   5081:  If it is a data plot and the data file has a third column, this will be used
                   5082:  to set the width of the box.  If not, if a width has been set using the `set
                   5083:  boxwidth` command, this will be used.  If neither of these is available, the
                   5084:  width of each box will be calculated automatically so that it touches the
                   5085:  adjacent boxes.
                   5086: 4 boxxyerrorbars
                   5087: ?commands set style boxxyerrorbars
                   5088: ?set style boxxyerrorbars
                   5089: ?style boxxyerrorbars
                   5090: ?boxxyerrorbars
                   5091:  The `boxxyerrorbars` style is only relevant to 2-d data plotting.  It is a
                   5092:  combination of the `boxes` and `xyerrorbars` styles.
                   5093:
                   5094:  The box width and height are determined from the x and y errors in the same
                   5095:  way as they are for the `xyerrorbars` style---either from xlow to xhigh and
                   5096:  from ylow to yhigh, or from x-xdelta to x+xdelta and from y-ydelta to
                   5097:  y+ydelta , depending on how many data columns are provided.
                   5098: 4 candlesticks
                   5099: ?commands set style candlesticks
                   5100: ?set style candlesticks
                   5101: ?style candlesticks
                   5102: ?candlesticks
                   5103:  The `candlesticks` style is only relevant for 2-d data plotting of financial
                   5104:  data.  Five columns of data are required; in order, these should be the x
                   5105:  coordinate (most likely a date) and the opening, low, high, and closing
                   5106:  prices.  The symbol is an open rectangle, centered horizontally at the x
                   5107:  coordinate and limited vertically by the opening and closing prices.  A
                   5108:  vertical line segment at the x coordinate extends up from the top of the
                   5109:  rectangle to the high price and another down to the low.  The width of the
                   5110:  rectangle may be changed by `set bar`.  The symbol will be unchanged if the
                   5111:  low and high prices are interchanged or if the opening and closing prices
                   5112:  are interchanged.  See `set bar` and `financebars`.
                   5113: ^<a href="http://www.nas.nasa.gov/~woo/gnuplot/finance/finance.html"> See demos.</a>
                   5114: 4 dots
                   5115: ?commands set style dots
                   5116: ?set style dots
                   5117: ?style dots
                   5118: ?dots
                   5119:  The `dots` style plots a tiny dot at each point; this is useful for scatter
                   5120:  plots with many points.
                   5121: 4 financebars
                   5122: ?commands set style financebars
                   5123: ?set style financebars
                   5124: ?style financebars
                   5125: ?financebars
                   5126:  The `financebars` style is only relevant for 2-d data plotting of financial
                   5127:  data.  Five columns of data are required; in order, these should be the x
                   5128:  coordinate (most likely a date) and the opening, low, high, and closing
                   5129:  prices.  The symbol is a vertical line segment, located horizontally at the x
                   5130:  coordinate and limited vertically by the high and low prices.  A horizontal
                   5131:  tic on the left marks the opening price and one on the right marks the
                   5132:  closing price.  The length of these tics may be changed by `set bar`.  The
                   5133:  symbol will be unchanged if the high and low prices are interchanged.  See
                   5134:  `set bar` and `candlesticks`.
                   5135: ^<a href="http://www.nas.nasa.gov/~woo/gnuplot/finance/finance.html"> See demos.</a>
                   5136: 4 fsteps
                   5137: ?commands set style fsteps
                   5138: ?set style fsteps
                   5139: ?style fsteps
                   5140: ?fsteps
                   5141:  The `fsteps` style is only relevant to 2-d plotting.  It connects consecutive
                   5142:  points with two line segments: the first from (x1,y1) to (x1,y2) and the
                   5143:  second from (x1,y2) to (x2,y2).
1.1.1.2 ! maekawa  5144: ^<a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/steps.html"> See demo. </a>
1.1       maekawa  5145: 4 histeps
                   5146: ?commands set style histeps
                   5147: ?set style histeps
                   5148: ?style histeps
                   5149: ?histeps
                   5150:  The `histeps` style is only relevant to 2-d plotting.  It is intended for
                   5151:  plotting histograms.  Y-values are assumed to be centered at the x-values;
                   5152:  the point at x1 is represented as a horizontal line from ((x0+x1)/2,y1) to
                   5153:  ((x1+x2)/2,y1).  The lines representing the end points are extended so that
                   5154:  the step is centered on at x.  Adjacent points are connected by a vertical
                   5155:  line at their average x, that is, from ((x1+x2)/2,y1) to ((x1+x2)/2,y2).
                   5156:
                   5157:  If `autoscale` is in effect, it selects the xrange from the data rather than
                   5158:  the steps, so the end points will appear only half as wide as the others.
1.1.1.2 ! maekawa  5159: ^<a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/steps.html"> See demo. </a>
1.1       maekawa  5160:
                   5161:  `histeps` is only a plotting style; `gnuplot` does not have the ability to
                   5162:  create bins and determine their population from some data set.
                   5163: 4 impulses
                   5164: ?commands set style impulses
                   5165: ?set style impulses
                   5166: ?style impulses
                   5167: ?impulses
                   5168:  The `impulses` style displays a vertical line from the x axis (not the graph
                   5169:  border), or from the grid base for `splot`, to each point.
                   5170: 4 lines
                   5171: ?commands set style lines
                   5172: ?set style lines
                   5173: ?style lines
                   5174: ?lines
                   5175:  The `lines` style connects adjacent points with straight line segments.
                   5176: 4 linespoints
                   5177: ?commands set style linespoints
                   5178: ?commands set style lp
                   5179: ?set style linespoints
                   5180: ?set style lp
                   5181: ?style linespoints
                   5182: ?style lp
                   5183: ?linespoints
                   5184: ?lp
                   5185:  The `linespoints` style does both `lines` and `points`, that is, it draws a
                   5186:  small symbol at each point and then connects adjacent points with straight
                   5187:  line segments.  The command `set pointsize` may be used to change the size of
                   5188:  the points.  See `set pointsize` for its usage.
                   5189:
                   5190:  `linespoints` may be abbreviated `lp`.
                   5191: 4 points
                   5192: ?commands set style points
                   5193: ?set style points
                   5194: ?style points
                   5195: ?points
                   5196:  The `points` style displays a small symbol at each point.  The command `set
                   5197:  pointsize` may be used to change the size of the points.  See `set pointsize`
                   5198:  for its usage.
                   5199: 4 steps
                   5200: ?commands set style steps
                   5201: ?set style steps
                   5202: ?style steps
                   5203: ?steps
                   5204:  The `steps` style is only relevant to 2-d plotting.  It connects consecutive
                   5205:  points with two line segments: the first from (x1,y1) to (x2,y1) and the
                   5206:  second from (x2,y1) to (x2,y2).
1.1.1.2 ! maekawa  5207: ^<a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/steps.html"> See demo. </a>
1.1       maekawa  5208: 4 vector
                   5209: ?commands set style vector
                   5210: ?set style vector
                   5211: ?style vector
                   5212: ?vector
                   5213:  The `vector` style draws a vector from (x,y) to (x+xdelta,y+ydelta).  Thus
                   5214:  it requires four columns of data.  It also draws a small arrowhead at the
                   5215:  end of the vector.
                   5216:
                   5217:  The `vector` style is still experimental: it doesn't get clipped properly
                   5218:  and other things may also be wrong with it.  Use it at your own risk.
                   5219: 4 xerrorbars
                   5220: ?commands set style xerrorbars
                   5221: ?set style xerrorbars
                   5222: ?style xerrorbars
                   5223: ?xerrorbars
                   5224:  The `xerrorbars` style is only relevant to 2-d data plots.  `xerrorbars` is
                   5225:  like `dots`, except that a horizontal error bar is also drawn.  At each point
                   5226:  (x,y), a line is drawn from (xlow,y) to (xhigh,y) or from (x-xdelta,y) to
                   5227:  (x+xdelta,y), depending on how many data columns are provided.  A tic mark
                   5228:  is placed at the ends of the error bar (unless `set bar` is used---see `set
                   5229:  bar` for details).
                   5230: 4 xyerrorbars
                   5231: ?commands set style xyerrorbars
                   5232: ?set style xyerrorbars
                   5233: ?style xyerrorbars
                   5234: ?xyerrorbars
                   5235:  The `xyerrorbars` style is only relevant to 2-d data plots.  `xyerrorbars` is
                   5236:  like `dots`, except that horizontal and vertical error bars are also drawn.
                   5237:  At each point (x,y), lines are drawn from (x,y-ydelta) to (x,y+ydelta) and
                   5238:  from (x-xdelta,y) to (x+xdelta,y) or from (x,ylow) to (x,yhigh) and from
                   5239:  (xlow,y) to (xhigh,y), depending upon the number of data columns provided.  A
                   5240:  tic mark is placed at the ends of the error bar (unless `set bar` is
                   5241:  used---see `set bar` for details).
                   5242:
                   5243:  If data are provided in an unsupported mixed form, the `using` filter on the
                   5244:  `plot` command should be used to set up the appropriate form.  For example,
                   5245:  if the data are of the form (x,y,xdelta,ylow,yhigh), then you can use
                   5246:
                   5247:        plot 'data' using 1:2:($1-$3),($1+$3),4,5 with xyerrorbars
                   5248: 4 yerrorbars
                   5249: ?commands set style yerrorbars
                   5250: ?commands set style errorbars
                   5251: ?set style yerrorbars
                   5252: ?set style errorbars
                   5253: ?style yerrorbars
                   5254: ?style errorbars
                   5255: ?yerrorbars
                   5256: ?errorbars
                   5257:  The `yerrorbars` (or `errorbars`) style is only relevant to 2-d data plots.
                   5258:  `yerrorbars` is like `dots`, except that a vertical error bar is also drawn.
                   5259:  At each point (x,y), a line is drawn from (x,y-ydelta) to (x,y+ydelta) or
                   5260:  from (x,ylow) to (x,yhigh), depending on how many data columns are provided.
                   5261:  A tic mark is placed at the ends of the error bar (unless `set bar` is
                   5262:  used---see `set bar` for details).
                   5263: ^<a href="http://www.nas.nasa.gov/~woo/gnuplot/errorbar/errorbar.html"> See demo. </a>
                   5264: 3 surface
                   5265: ?commands set surface
                   5266: ?commands set nosurface
                   5267: ?commands show surface
                   5268: ?set surface
                   5269: ?set nosurface
                   5270: ?show surface
                   5271: ?surface
                   5272: ?nosurface
                   5273:  The command `set surface` controls the display of surfaces by `splot`.
                   5274:
                   5275:  Syntax:
                   5276:        set surface
                   5277:        set nosurface
                   5278:        show surface
                   5279:
                   5280:  The surface is drawn with the style specifed by `with`, or else the
                   5281:  appropriate style, data or function.
                   5282:
                   5283:  Whenever `set nosurface` is issued, `splot` will not draw points or lines
                   5284:  corresponding to the function or data file points.  Contours may be still be
                   5285:  drawn on the surface, depending on the `set contour` option. `set nosurface;
                   5286:  set contour base` is useful for displaying contours on the grid base.  See
                   5287:  also `set contour`.
                   5288: ^ <h2> Terminal Types </h2>
                   5289: 3 terminal
                   5290: ?commands set terminal
                   5291: ?commands show terminal
                   5292: ?set terminal
                   5293: ?set term
                   5294: ?show terminal
                   5295: ?terminal
                   5296: ?term
                   5297:  `gnuplot` supports many different graphics devices.  Use `set terminal` to
                   5298:  tell `gnuplot` what kind of output to generate. Use `set output` to redirect
                   5299:  that output to a file or device.
                   5300:
                   5301:  Syntax:
                   5302:        set terminal {<terminal-type>}
                   5303:        show terminal
                   5304:
                   5305:  If <terminal-type> is omitted, `gnuplot` will list the available terminal
                   5306:  types.  <terminal-type> may be abbreviated.
                   5307:
                   5308:  If both `set terminal` and `set output` are used together, it is safest to
                   5309:  give `set terminal` first, because some terminals set a flag which is needed
                   5310:  in some operating systems.
                   5311:
                   5312:  Several terminals have additional options.  For example, see `dumb`,
                   5313:  `iris4d`, `hpljii` or `postscript`.
                   5314:
                   5315:  This document may describe drivers that are not available to you because they
                   5316:  were not installed, or it may not describe all the drivers that are available
                   5317:  to you, depending on its output format.
                   5318: <4 -- all terminal stuff is pulled from the .trm files
                   5319: 3 tics
                   5320: ?commands set tics
                   5321: ?commands show tics
                   5322: ?set tics
                   5323: ?show tics
                   5324: ?tics
                   5325:  The `set tics` command can be used to change the tics to be drawn outwards.
                   5326:
                   5327:  Syntax:
                   5328:        set tics {<direction>}
                   5329:        show tics
                   5330:
                   5331:  where <direction> may be `in` (the default) or `out`.
                   5332:
                   5333:  See also `set xtics` for more control of major (labelled) tic marks and `set
                   5334:  mxtics` for control of minor tic marks.
                   5335: 3 ticslevel
                   5336: ?commands set ticslevel
                   5337: ?commands show ticslevel
                   5338: ?set ticslevel
                   5339: ?show ticslevel
                   5340: ?ticslevel
                   5341:  Using `splot`, one can adjust the relative height of the vertical (Z) axis
                   5342:  using `set ticslevel`.  The numeric argument provided specifies the location
                   5343:  of the bottom of the scale (as a fraction of the z-range) above the xy-plane.
                   5344:  The default value is 0.5.  Negative values are permitted, but tic labels on
                   5345:  the three axes may overlap.
                   5346:
                   5347:  To place the xy-plane at a position 'pos' on the z-axis, `ticslevel` should
                   5348:  be set equal to  (pos - zmin) / (zmin - zmax).
                   5349:
                   5350:  Syntax:
                   5351:        set ticslevel {<level>}
                   5352:        show tics
                   5353:
                   5354:  See also `set view`.
                   5355: 3 ticscale
                   5356: ?commands set ticscale
                   5357: ?commands show ticscale
                   5358: ?set ticscale
                   5359: ?show ticscale
                   5360: ?ticscale
                   5361:  The size of the tic marks can be adjusted with `set ticscale`.
                   5362:
                   5363:  Syntax:
                   5364:        set ticscale {<major> {<minor>}}
                   5365:        show tics
                   5366:
                   5367:  If <minor> is not specified, it is 0.5*<major>.  The default size is 1.0 for
                   5368:  major tics and 0.5 for minor tics.  Note that it is possible to have the tic
                   5369:  marks pointing outward by specifying a negative size.
                   5370: 3 timestamp
                   5371: ?commands set timestamp
                   5372: ?commands set time
                   5373: ?commands set notimestamp
                   5374: ?commands show timestamp
                   5375: ?set timestamp
                   5376: ?set time
                   5377: ?set notimestamp
                   5378: ?show timestamp
                   5379: ?timestamp
                   5380: ?notimestamp
                   5381:  The command `set timestamp` places the time and date of the plot in the left
                   5382:  margin.
                   5383:
                   5384:  Syntax:
                   5385:        set timestamp {"<format>"} {top|bottom} {{no}rotate}
                   5386:                      {<xoff>}{,<yoff>} {"<font>"}
                   5387:        set notimestamp
                   5388:        show timestamp
                   5389:
                   5390:  The format string allows you to choose the format used to write the date and
                   5391:  time.  Its default value is what asctime() uses: "%a %b %d %H:%M:%S %Y"
                   5392:  (weekday, month name, day of the month, hours, minutes, seconds, four-digit
                   5393:  year).  With `top` or `bottom` you can place the timestamp at the top or
                   5394:  bottom of the left margin (default: bottom).  `rotate` lets you write the
                   5395:  timestamp vertically, if your terminal supports vertical text.  The constants
                   5396:  <xoff> and <off> are offsets from the default position given in character
                   5397:  screen coordinates.  <font> is used to specify the font with which the time
                   5398:  is to be written.
                   5399:
                   5400:  The abbreviation `time` may be used in place of `timestamp`.
                   5401:
                   5402:  Example:
                   5403:        set timestamp "%d/%m/%y %H:%M" 80,-2 "Helvetica"
                   5404:
                   5405:  See `set timefmt` for more information about time format strings.
                   5406: 3 timefmt
                   5407: ?commands set timefmt
                   5408: ?commands show timefmt
                   5409: ?set timefmt
                   5410: ?show timefmt
                   5411: ?timefmt
                   5412:  This command applies to timeseries where data are composed of dates/times.
                   5413:  It has no meaning unless the command `set xdata time` is given also.
                   5414:
                   5415:  Syntax:
                   5416:        set timefmt "<format string>"
                   5417:        show timefmt
                   5418:
                   5419:  The string argument tells `gnuplot` how to read timedata from the datafile.
                   5420:  The valid formats are:
                   5421:
                   5422: @start table - first is interactive cleartext form
                   5423:        Format       Explanation
                   5424:        %d           day of the month, 1--31
                   5425:        %m           month of the year, 1--12
                   5426:        %y           year, 0--99
                   5427:        %Y           year, 4-digit
                   5428:        %j           day of the year, 1--365
                   5429:        %H           hour, 0--24
                   5430:        %M           minute, 0--60
                   5431:        %S           second, 0--60
                   5432:        %b           three-character abbreviation of the name of the month
                   5433:        %B           name of the month
                   5434: #\begin{tabular}{|cl|} \hline
                   5435: #\multicolumn{2}{|c|}{Time Series timedata Format Specifiers}\\
                   5436: #\hline \hline
                   5437: #Format & Explanation \\ \hline
                   5438: #\verb@%d@ & day of the month, 1--31 \\
                   5439: #\verb@%m@ & month of the year, 1--12 \\
                   5440: #\verb@%y@ & year, 0--99 \\
                   5441: #\verb@%Y@ & year, 4-digit \\
                   5442: #\verb@%j@ & day of the year, 1--365 \\
                   5443: #\verb@%H@ & hour, 0--24 \\
                   5444: #\verb@%M@ & minute, 0--60 \\
                   5445: #\verb@%S@ & second, 0--60 \\
                   5446: #\verb@%b@ & three-character abbreviation of the name of the month \\
                   5447: #\verb@%B@ & name of the month \\
                   5448: %c l .
                   5449: %Format@Explanation
                   5450: %_
                   5451: %%d@day of the month, 1--31
                   5452: %%m@month of the year, 1--12
                   5453: %%y@year, 0--99
                   5454: %%Y@year, 4-digit
                   5455: %%j@day of the year, 1--365
                   5456: %%H@hour, 0--24
                   5457: %%M@minute, 0--60
                   5458: %%S@second, 0--60
                   5459: %%b@three-character abbreviation of the name of the month
                   5460: %%B@name of the month
                   5461: %_
                   5462: @end table
                   5463:  Any character is allowed in the string, but must match exactly.  \t (tab) is
                   5464:  recognized.  Backslash-octals (\nnn) are converted to char.  If there is no
                   5465:  separating character between the time/date elements, then %d, %m, %y, %H, %M
                   5466:  and %S read two digits each, %Y reads four digits and %j reads three digits.
                   5467:  %b requires three characters, and %B requires as many as it needs.
                   5468:
                   5469:  Spaces are treated slightly differently.  A space in the string stands for
                   5470:  zero or more whitespace characters in the file.  That is, "%H %M" can be used
                   5471:  to read "1220" and "12     20" as well as "12 20".
                   5472:
                   5473:  Each set of non-blank characters in the timedata counts as one column in the
                   5474:  `using n:n` specification.  Thus `11:11  25/12/76  21.0` consists of three
                   5475:  columns.  To avoid confusion, `gnuplot` requires that you provide a complete
                   5476:  `using` specification if your file contains timedata.
                   5477:
                   5478:  Since `gnuplot` cannot read non-numerical text, if the date format includes
                   5479:  the day or month in words, the format string must exclude this text.  But
                   5480:  it can still be printed with the "%a", "%A", "%b", or "%B" specifier: see
                   5481:  `set format` for more details about these and other options for printing
                   5482:  timedata.  (`gnuplot` will determine the proper month and weekday from the
                   5483:  numerical values.)
                   5484:
                   5485:  See also `set xdata` and `Time/date` for more information.
                   5486:
                   5487:  Example:
                   5488:        set timefmt "%d/%m/%Y\t%H:%M"
                   5489:  tells `gnuplot` to read date and time separated by tab.  (But look closely at
                   5490:  your data---what began as a tab may have been converted to spaces somewhere
                   5491:  along the line; the format string must match what is actually in the file.)
1.1.1.2 ! maekawa  5492: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/timedat.html"> Time Data Demo </a>
1.1       maekawa  5493: 3 title
                   5494: ?commands set title
                   5495: ?commands show title
                   5496: ?set title
                   5497: ?show title
                   5498: ?title
                   5499:  The `set title` command produces a plot title that is centered at the top of
                   5500:  the plot.  `set title` is a special case of `set label`.
                   5501:
                   5502:  Syntax:
                   5503:        set title {"<title-text>"} {<xoff>}{,<yoff>} {"<font>,{<size>}"}
                   5504:        show title
                   5505:
                   5506:  Specifying constants <xoff> or <yoff> as optional offsets for the title will
                   5507:  move the title <xoff> or <yoff> character screen coordinates (not graph
                   5508:  coordinates).  For example, "`set title ,-1`" will change only the y offset
                   5509:  of the title, moving the title down by roughly the height of one character.
                   5510:
                   5511:  <font> is used to specify the font with which the title is to be written;
                   5512:  the units of the font <size> depend upon which terminal is used.
                   5513:
                   5514:  `set title` with no parameters clears the title.
                   5515:
                   5516:  See `syntax` for details about the processing of backslash sequences and
                   5517:  the distinction between single- and double-quotes.
                   5518: 3 tmargin
                   5519: ?commands set tmargin
                   5520: ?set tmargin
                   5521: ?tmargin
                   5522:  The command `set tmargin` sets the size of the top margin.  Please see
                   5523:  `set margin` for details.
                   5524: 3 trange
                   5525: ?commands set trange
                   5526: ?commands show trange
                   5527: ?set trange
                   5528: ?show trange
                   5529: ?trange
                   5530:  The `set trange` command sets the parametric range used to compute x and y
                   5531:  values when in parametric or polar modes.  Please see `set xrange` for
                   5532:  details.
                   5533: 3 urange
                   5534: ?commands set urange
                   5535: ?commands show urange
                   5536: ?set urange
                   5537: ?show urange
                   5538: ?urange
                   5539:  The `set urange` and `set vrange` commands set the parametric ranges used
                   5540:  to compute x, y, and z values when in `splot` parametric mode.  Please see
                   5541:  `set xrange` for details.
                   5542: 3 variables
                   5543: ?commands show variables
                   5544: ?show variables
                   5545:  The `show variables` command lists all user-defined variables and their
                   5546:  values.
                   5547:
                   5548:  Syntax:
                   5549:        show variables
                   5550: 3 version
                   5551: ?show version
                   5552:  The `show version` command lists the version of gnuplot being run, its last
                   5553:  modification date, the copyright holders, and email addresses for the FAQ,
                   5554:  the info-gnuplot mailing list, and reporting bugs--in short, the information
                   5555:  listed on the screen when the program is invoked interactively.
                   5556:
                   5557:  Syntax:
                   5558:        show version {long}
                   5559:
                   5560:  When the `long` option is given, it also lists the operating system, the
                   5561:  compilation options used when `gnuplot` was installed, the location of the
                   5562:  help file, and (again) the useful email addresses.
                   5563: 3 view
                   5564: ?commands set view
                   5565: ?commands show view
                   5566: ?set view
                   5567: ?show view
                   5568: ?view
                   5569:  The `set view` command sets the viewing angle for `splot`s.  It controls how
                   5570:  the 3-d coordinates of the plot are mapped into the 2-d screen space.  It
                   5571:  provides controls for both rotation and scaling of the plotted data, but
                   5572:  supports orthographic projections only.
                   5573:
                   5574:  Syntax:
                   5575:        set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
                   5576:        show view
                   5577:
                   5578:  where <rot_x> and <rot_z> control the rotation angles (in degrees) in a
                   5579:  virtual 3-d coordinate system aligned with the screen such that initially
                   5580:  (that is, before the rotations are performed) the screen horizontal axis is
                   5581:  x, screen vertical axis is y, and the axis perpendicular to the screen is z.
                   5582:  The first rotation applied is <rot_x> around the x axis.  The second rotation
                   5583:  applied is <rot_z> around the new z axis.
                   5584:
                   5585:  <rot_x> is bounded to the [0:180] range with a default of 60 degrees, while
                   5586:  <rot_z> is bounded to the [0:360] range with a default of 30 degrees.
                   5587:  <scale> controls the scaling of the entire `splot`, while <scale_z> scales
                   5588:  the z axis only.  Both scales default to 1.0.
                   5589:
                   5590:  Examples:
                   5591:        set view 60, 30, 1, 1
                   5592:        set view ,,0.5
                   5593:
                   5594:  The first sets all the four default values.  The second changes only scale,
                   5595:  to 0.5.
                   5596:
                   5597:  See also `set ticslevel`.
                   5598: 3 vrange
                   5599: ?commands set vrange
                   5600: ?commands show vrange
                   5601: ?set vrange
                   5602: ?show vrange
                   5603: ?vrange
                   5604:  The `set urange` and `set vrange` commands set the parametric ranges used
                   5605:  to compute x, y, and z values when in `splot` parametric mode.  Please see
                   5606:  `set xrange` for details.
                   5607: 3 x2data
                   5608: ?commands set x2data
                   5609: ?commands show x2data
                   5610: ?set x2data
                   5611: ?show x2data
                   5612: ?x2data
                   5613:  The `set x2data` command sets data on the x2 (top) axis to timeseries
                   5614:  (dates/times).  Please see `set xdata`.
                   5615: 3 x2dtics
                   5616: ?commands set x2dtics
                   5617: ?commands set nox2dtics
                   5618: ?commands show x2dtics
                   5619: ?set x2dtics
                   5620: ?set nox2dtics
                   5621: ?show x2dtics
                   5622: ?x2dtics
                   5623: ?nox2dtics
                   5624:  The `set x2dtics` command changes tics on the x2 (top) axis to days of the
                   5625:  week.  Please see `set xdtics` for details.
                   5626: 3 x2label
                   5627: ?commands set x2label
                   5628: ?commands show x2label
                   5629: ?set x2label
                   5630: ?show x2label
                   5631: ?x2label
                   5632:  The `set x2label` command sets the label for the x2 (top) axis.  Please see
                   5633:  `set xlabel`.
                   5634: 3 x2mtics
                   5635: ?commands set x2mtics
                   5636: ?commands set nox2mtics
                   5637: ?commands show x2mtics
                   5638: ?set x2mtics
                   5639: ?set nox2mtics
                   5640: ?show x2mtics
                   5641: ?x2mtics
                   5642: ?nox2mtics
                   5643:  The `set x2mtics` command changes tics on the x2 (top) axis to months of the
                   5644:  year.  Please see `set xmtics` for details.
                   5645: 3 x2range
                   5646: ?commands set x2range
                   5647: ?commands show x2range
                   5648: ?set x2range
                   5649: ?show x2range
                   5650: ?x2range
                   5651:  The `set x2range` command sets the horizontal range that will be displayed on
                   5652:  the x2 (top) axis.  Please see `set xrange` for details.
                   5653: 3 x2tics
                   5654: ?commands set x2tics
                   5655: ?commands set nox2tics
                   5656: ?commands show x2tics
                   5657: ?set x2tics
                   5658: ?set nox2tics
                   5659: ?show x2tics
                   5660: ?x2tics
                   5661: ?nox2tics
                   5662:  The `set x2tics` command controls major (labelled) tics on the x2 (top) axis.
                   5663:  Please see `set xtics` for details.
                   5664: 3 x2zeroaxis
                   5665: ?commands set x2zeroaxis
                   5666: ?commands set nox2zeroaxis
                   5667: ?commands show x2zeroaxis
                   5668: ?set x2zeroaxis
                   5669: ?set nox2zeroaxis
                   5670: ?show x2zeroaxis
                   5671: ?x2zeroaxis
                   5672: ?nox2zeroaxis
                   5673:  The `set x2zeroaxis` command draws a line at the origin of the x2 (top) axis
                   5674:  (y2 = 0).  For details, please see
                   5675:  `set zeroaxis`.
                   5676: 3 xdata
                   5677: ?commands set xdata
                   5678: ?commands show xdata
                   5679: ?set xdata
                   5680: ?show xdata
                   5681: ?xdata
                   5682:  This command sets the datatype on the x axis to time/date.  A similar command
                   5683:  does the same thing for each of the other axes.
                   5684:
                   5685:  Syntax:
                   5686:        set xdata {time}
                   5687:        show xdata
                   5688:
                   5689:  The same syntax applies to `ydata`, `zdata`, `x2data` and `y2data`.
                   5690:
                   5691:  The `time` option signals that the datatype is indeed time/date.  If the
                   5692:  option is not specified, the datatype reverts to normal.
                   5693:
                   5694:  See `set timefmt` to tell `gnuplot` how to read date or time data.  The
                   5695:  time/date is converted to seconds from start of the century.  There is
                   5696:  currently only one timefmt, which implies that all the time/date columns must
                   5697:  confirm to this format.  Specification of ranges should be supplied as quoted
                   5698:  strings according to this format to avoid interpretation of the time/date as
                   5699:  an expression.
                   5700:
                   5701:  The function 'strftime' (type "man strftime" on unix to look it up) is used
                   5702:  to print tic-mark labels.  `gnuplot` tries to figure out a reasonable format
                   5703:  for this  unless the `set format x "string"` has supplied something that does
                   5704:  not look like a decimal format (more than one '%' or neither %f nor %g).
                   5705:
                   5706:  See also `Time/date` for more information.
                   5707: 3 xdtics
                   5708: ?commands set xdtics
                   5709: ?commands set noxdtics
                   5710: ?commands show xdtics
                   5711: ?set xdtics
                   5712: ?set noxdtics
                   5713: ?show xdtics
                   5714: ?xdtics
                   5715: ?noxdtics
                   5716:  The `set xdtics` commands converts the x-axis tic marks to days of the week
                   5717:  where 0=Sun and 6=Sat.  Overflows are converted modulo 7 to dates.  `set
                   5718:  noxdtics` returns the labels to their default values.  Similar commands do
                   5719:  the same things for the other axes.
                   5720:
                   5721:  Syntax:
                   5722:        set xdtics
                   5723:        set noxdtics
                   5724:        show xdtics
                   5725:
                   5726:  The same syntax applies to `ydtics`, `zdtics`, `x2dtics` and `y2dtics`.
                   5727:
                   5728:  See also the `set format` command.
                   5729: 3 xlabel
                   5730: ?commands set xlabel
                   5731: ?commands show xlabel
                   5732: ?set xlabel
                   5733: ?show xlabel
                   5734: ?xlabel
                   5735:  The `set xlabel` command sets the x axis label.  Similar commands set labels
                   5736:  on the other axes.
                   5737:
                   5738:  Syntax:
                   5739:        set xlabel {"<label>"} {<xoff>}{,<yoff>} {"<font>{,<size>}"}
                   5740:        show xlabel
                   5741:
                   5742:  The same syntax applies to `x2label`, `ylabel`, `y2label` and `zlabel`.
                   5743:
                   5744:  Specifying the constants <xoff> or <yoff> as optional offsets for a label
                   5745:  will move it <xoff> or <yoff> character widths or heights.  For example,
                   5746:  "` set xlabel -1`" will change only the x offset of the xlabel, moving the
                   5747:  label roughly one character width to the left.   The size of a character
                   5748:  depends on both the font and the terminal.
                   5749:
                   5750:  <font> is used to specify the font in which the label is written; the units
                   5751:  of the font <size> depend upon which terminal is used.
                   5752:
                   5753:  To clear a label, put no options on the command line, e.g., "`set y2label`".
                   5754:
                   5755:  The default positions of the axis labels are as follows:
                   5756:
                   5757:  xlabel:  The x-axis label is centered below the bottom axis.
                   5758:
                   5759:  ylabel:  The position of the y-axis label depends on the terminal, and can be
                   5760:  one of the following three positions:
                   5761:
                   5762:  1. Horizontal text flushed left at the top left of the plot.  Terminals that
                   5763:  cannot rotate text will probably use this method.  If `set x2tics` is also
                   5764:  in use, the ylabel may overwrite the left-most x2tic label.  This may be
                   5765:  remedied by adjusting the ylabel position or the left margin.
                   5766:
                   5767:  2. Vertical text centered vertically at the left of the plot.  Terminals
                   5768:  that can rotate text will probably use this method.
                   5769:
                   5770:  3. Horizontal text centered vertically at the left of the plot.  The EEPIC,
                   5771:  LaTeX and TPIC drivers use this method.  The user must insert line breaks
                   5772:  using \\ to prevent the ylabel from overwriting the plot.  To produce a
                   5773:  vertical row of characters, add \\ between every printing character (but this
                   5774:  is ugly).
                   5775:
                   5776:  zlabel: The z-axis label is centered along the z axis and placed in the space
                   5777:  above the grid level.
                   5778:
                   5779:  y2label: The y2-axis label is placed to the right of the y2 axis.  The
                   5780:  position is terminal-dependent in the same manner as is the y-axis label.
                   5781:
                   5782:  x2label: The x2-axis label is placed above the top axis but below the plot
                   5783:  title.  It is also possible to create an x2-axis label by using new-line
                   5784:  characters to make a multi-line plot title, e.g.,
                   5785:
                   5786:        set title "This is the title\n\nThis is the x2label"
                   5787:
                   5788:  Note that double quotes must be used.  The same font will be used for both
                   5789:  lines, of course.
                   5790:
                   5791:  If you are not satisfied with the default position of an axis label, use `set
                   5792:  label` instead--that command gives you much more control over where text is
                   5793:  placed.
                   5794:
                   5795:  Please see `set syntax` for further information about backslash processing
                   5796:  and the difference between single- and double-quoted strings.
                   5797: 3 xmtics
                   5798: ?commands set xmtics
                   5799: ?commands set noxmtics
                   5800: ?commands show xmtics
                   5801: ?set xmtics
                   5802: ?set noxmtics
                   5803: ?show xmtics
                   5804: ?xmtics
                   5805: ?noxmtics
                   5806:  The `set xmtics` commands converts the x-axis tic marks to months of the
                   5807:  year where 1=Jan and 12=Dec.  Overflows are converted modulo 12 to months.
                   5808:  The tics are returned to their default labels by `set noxmtics`.  Similar
                   5809:  commands perform the same duties for the other axes.
                   5810:
                   5811:  Syntax:
                   5812:        set xmtics
                   5813:        set noxmtics
                   5814:        show xmtics
                   5815:
                   5816:  The same syntax applies to `x2mtics`, `ymtics`, `y2mtics`, and `zmtics`.
                   5817:
                   5818:  See also the `set format` command.
                   5819: 3 xrange
                   5820: ?commands set xrange
                   5821: ?commands show xrange
                   5822: ?set xrange
                   5823: ?show xrange
                   5824: ?xrange
                   5825:  The `set xrange` command sets the horizontal range that will be displayed.
                   5826:  A similar command exists for each of the other axes, as well as for the
                   5827:  polar radius r and the parametric variables t, u, and v.
                   5828:
                   5829:  Syntax:
                   5830:        set xrange [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback}
                   5831:        show xrange
                   5832:
                   5833:  where <min> and <max> terms are constants, expressions or an asterisk to set
                   5834:  autoscaling.  If the data are time/date, you must give the range as a quoted
                   5835:  string according to the `set timefmt` format.  Any value omitted will not be
                   5836:  changed.
                   5837:
                   5838:  The same syntax applies to `yrange`, `zrange`, `x2range`, `y2range`,
                   5839:  `rrange`, `trange`, `urange` and `vrange`.
                   5840:
                   5841:  The `reverse` option reverses the direction of the axis, e.g., `set xrange
                   5842:  [0:1] reverse` will produce an axis with 1 on the left and 0 on the right.
                   5843:  This is identical to the axis produced by `set xrange [1:0]`, of course.
                   5844:  `reverse` is intended primarily for use with `autoscale`.
                   5845:
                   5846:  The `writeback` option essentially saves the range found by `autoscale` in
                   5847:  the buffers that would be filled by `set xrange`.  This is useful if you wish
                   5848:  to plot several functions together but have the range determined by only
                   5849:  some of them.  The `writeback` operation is performed during the `plot`
                   5850:  execution, so it must be specified before that command.  For example,
                   5851:
                   5852:        set xrange [-10:10]
                   5853:        set yrange [] writeback
                   5854:        plot sin(x)
                   5855:        set noautoscale y
                   5856:        replot x/2
                   5857:
                   5858:  results in a yrange of [-1:1] as found only from the range of sin(x); the
                   5859:  [-5:5] range of x/2 is ignored.  Executing `show yrange` after each command
                   5860:  in the above example should help you understand what is going on.
                   5861:
                   5862:  In 2-d, `xrange` and `yrange` determine the extent of the axes, `trange`
                   5863:  determines the range of the parametric variable in parametric mode or the
                   5864:  range of the angle in polar mode.  Similarly in parametric 3-d, `xrange`,
                   5865:  `yrange`, and `zrange` govern the axes and `urange` and `vrange` govern the
                   5866:  parametric variables.
                   5867:
                   5868:  In polar mode, `rrange` determines the radial range plotted.  <rmin> acts as
                   5869:  an additive constant to the radius, whereas <rmax> acts as a clip to the
                   5870:  radius---no point with radius greater than <rmax> will be plotted.  `xrange`
                   5871:  and `yrange` are affected---the ranges can be set as if the graph was of
                   5872:  r(t)-rmin, with rmin added to all the labels.
                   5873:
                   5874:  Any range may be partially or totally autoscaled, although it may not make
                   5875:  sense to autoscale a parametric variable unless it is plotted with data.
                   5876:
                   5877:  Ranges may also be specified on the `plot` command line.  A range given on
                   5878:  the plot line will be used for that single `plot` command; a range given by
                   5879:  a `set` command will be used for all subsequent plots that do not specify
                   5880:  their own ranges.  The same holds true for `splot`.
                   5881:
                   5882:  Examples:
                   5883:
                   5884:  To set the xrange to the default:
                   5885:        set xrange [-10:10]
                   5886:
                   5887:  To set the yrange to increase downwards:
                   5888:        set yrange [10:-10]
                   5889:
                   5890:  To change zmax to 10 without affecting zmin (which may still be autoscaled):
                   5891:        set zrange [:10]
                   5892:
                   5893:  To autoscale xmin while leaving xmax unchanged:
                   5894:        set xrange [*:]
                   5895: 3 xtics
                   5896: ?commands set xtics
                   5897: ?commands set noxtics
                   5898: ?commands show xtics
                   5899: ?set xtics
                   5900: ?set noxtics
                   5901: ?show xtics
                   5902: ?xtics
                   5903: ?noxtics
                   5904:  Fine control of the major (labelled) tics on the x axis is possible with the
                   5905:  `set xtics` command.  The tics may be turned off with the `set noxtics`
                   5906:  command, and may be turned on (the default state) with `set xtics`.  Similar
                   5907:  commands control the major tics on the y, z, x2 and y2 axes.
                   5908:
                   5909:  Syntax:
                   5910:        set xtics {axis | border} {{no}mirror} {{no}rotate}
                   5911:                  {  autofreq
                   5912:                   | <incr>
                   5913:                   | <start>, <incr> {,<end>}
                   5914:                   | ({"<label>"} <pos> {,{"<label>"} <pos>}...) }
                   5915:        set noxtics
                   5916:        show xtics
                   5917:
                   5918:  The same syntax applies to `ytics`, `ztics`, `x2tics` and `y2tics`.
                   5919:
                   5920:  `axis` or `border` tells `gnuplot` to put the tics (both the tics themselves
1.1.1.2 ! maekawa  5921:  and the accompanying labels) along the axis or the border, respectively.  If
        !          5922:  the axis is very close to the border, the `axis` option can result in tic
        !          5923:  labels overwriting other text written in the margin.
        !          5924:
        !          5925:  `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the
        !          5926:  opposite border.  `nomirror` does what you think it does.
        !          5927:
        !          5928:  `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be
        !          5929:  done if the terminal driver in use supports text rotation.  `norotate`
        !          5930:  cancels this.
        !          5931:
        !          5932:  The defaults are `border mirror norotate` for tics on the x and y axes, and
        !          5933:  `border nomirror norotate` for tics on the x2 and y2 axes.  For the z axis,
        !          5934:  the the `{axis | border}` option is not available and the default is
        !          5935:  `nomirror`.  If you do want to mirror the z-axis tics, you might want to
        !          5936:  create a bit more room for them with `set border`.
        !          5937:
        !          5938:  `set xtics` with no options restores the default border or axis if xtics are
        !          5939:  being displayed;  otherwise it has no effect.  Any previously specified tic
        !          5940:  frequency or position {and labels} are retained.
1.1       maekawa  5941:
                   5942:  Positions of the tics are calculated automatically by default or if the
                   5943:  `autofreq` option is given; otherwise they may be specified in either of
                   5944:  two forms:
                   5945:
                   5946:  The implicit <start>, <incr>, <end> form specifies that a series of tics will
                   5947:  be plotted on the axis between the values <start> and <end> with an increment
                   5948:  of <incr>.  If <end> is not given, it is assumed to be infinity.  The
                   5949:  increment may be negative.  If neither <start> nor <end> is given, <start> is
                   5950:  assumed to be negative infinity, <end> is assumed to be positive infinity,
                   5951:  and the tics will be drawn at integral multiples of <step>.  If the axis is
                   5952:  logarithmic, the increment will be used as a multiplicative factor.
                   5953:
                   5954:  Examples:
                   5955:
                   5956:  Make tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
                   5957:        set xtics 0,.5,10
                   5958:
                   5959:  Make tics at ..., -10, -5, 0, 5, 10, ...
                   5960:        set xtics 5
                   5961:
                   5962:  Make tics at 1, 100, 1e4, 1e6, 1e8.
                   5963:        set logscale x; set xtics 1,100,10e8
                   5964:
                   5965:  The explicit ("<label>" <pos>, ...) form allows arbitrary tic positions or
                   5966:  non-numeric tic labels.  A set of tics is a set of positions, each with its
                   5967:  own optional label.  Note that the label is a string enclosed by quotes.  It
                   5968:  may be a constant string, such as "hello", may contain formatting information
                   5969:  for converting the position into its label, such as "%3f clients", or may be
                   5970:  empty, "".  See `set format` for more information.  If no string is given,
                   5971:  the default label (numerical) is used.  In this form, the tics do not need to
                   5972:  be listed in numerical order.
                   5973:
                   5974:  Examples:
                   5975:        set xtics ("low" 0, "medium" 50, "high" 100)
                   5976:        set xtics (1,2,4,8,16,32,64,128,256,512,1024)
                   5977:        set ytics ("bottom" 0, "" 10, "top" 20)
                   5978:
                   5979:  In the second example, all tics are labelled.  In the third, only the end
                   5980:  tics are labelled.
                   5981:
                   5982:  However they are specified, tics will only be plotted when in range.
                   5983:
                   5984:  Format (or omission) of the tic labels is controlled by `set format`, unless
                   5985:  the explicit text of a labels is included in the `set xtic (`<label>`)` form.
                   5986:
                   5987:  Minor (unlabelled) tics can be added by the `set mxtics` command.
                   5988:
                   5989:  In case of timeseries data, position values must be given as quoted dates
                   5990:  or times according to the format `timefmt`.  If the <start>, <incr>, <end>
                   5991:  form is used, <start> and <end> must be given according to `timefmt`, but
                   5992:  <incr> must be in seconds.  Times will be written out according to the format
                   5993:  given on `set format`, however.
                   5994:
                   5995:  Examples:
                   5996:        set xdata time
                   5997:        set timefmt "%d/%m"
                   5998:        set format x "%b %d"
                   5999:        set xrange ["01/12":"06/12"]
                   6000:        set xtics "01/12", 172800, "05/12"
                   6001:
                   6002:        set xdata time
                   6003:        set timefmt "%d/%m"
                   6004:        set format x "%b %d"
                   6005:        set xrange ["01/12":"06/12"]
                   6006:        set xtics ("01/12", "" "03/12", "05/12")
                   6007:  Both of these will produce tics "Dec 1", "Dec 3", and "Dec 5", but in the
                   6008:  second example the tic at "Dec 3" will be unlabelled.
                   6009:
                   6010: 3 xzeroaxis
                   6011: ?commands set xzeroaxis
                   6012: ?commands set noxzeroaxis
                   6013: ?commands show xzeroaxis
                   6014: ?set xzeroaxis
                   6015: ?set noxzeroaxis
                   6016: ?show xzeroaxis
                   6017: ?xzeroaxis
                   6018: ?noxzeroaxis
                   6019:  The `set xzeroaxis` command draws a line at y = 0.  For details, please see
                   6020:  `set zeroaxis`.
                   6021: 3 y2data
                   6022: ?commands set y2data
                   6023: ?commands show y2data
                   6024: ?set y2data
                   6025: ?show y2data
                   6026: ?y2data
                   6027:  The `set y2data` command sets y2 (right-hand) axis data to timeseries
                   6028:  (dates/times).  Please see `set xdata`.
                   6029: 3 y2dtics
                   6030: ?commands set y2dtics
                   6031: ?commands set noy2dtics
                   6032: ?set y2dtics
                   6033: ?set noy2dtics
                   6034: ?show y2dtics
                   6035: ?y2dtics
                   6036: ?noy2dtics
                   6037:  The `set y2dtics` command changes tics on the y2 (right-hand) axis to days of
                   6038:  the week.  Please see `set xdtics` for details.
                   6039: 3 y2label
                   6040: ?commands set y2label
                   6041: ?commands show y2label
                   6042: ?set y2label
                   6043: ?show y2label
                   6044: ?y2label
                   6045:  The `set y2dtics` command sets the label for the y2 (right-hand) axis.
                   6046:  Please see `set xlabel`.
                   6047: 3 y2mtics
                   6048: ?commands set y2mtics
                   6049: ?commands set noy2mtics
                   6050: ?commands show y2mtics
                   6051: ?set y2mtics
                   6052: ?set noy2mtics
                   6053: ?show y2mtics
                   6054: ?y2mtics
                   6055: ?noy2mtics
                   6056:  The `set y2mtics` command changes tics on the y2 (right-hand) axis to months
                   6057:  of the year.  Please see `set xmtics` for details.
                   6058: 3 y2range
                   6059: ?commands set y2range
                   6060: ?commands show y2range
                   6061: ?set y2range
                   6062: ?show y2range
                   6063: ?y2range
                   6064:  The `set y2range` command sets the vertical range that will be displayed on
                   6065:  the y2 (right-hand) axis.  Please see `set xrange` for details.
                   6066: 3 y2tics
                   6067: ?commands set y2tics
                   6068: ?commands set noy2tics
                   6069: ?commands show y2tics
                   6070: ?set y2tics
                   6071: ?set noy2tics
                   6072: ?show y2tics
                   6073: ?y2tics
                   6074: ?noy2tics
                   6075:  The `set y2tics` command controls major (labelled) tics on the y2 (right-hand)
                   6076:  axis.  Please see `set xtics` for details.
                   6077: 3 y2zeroaxis
                   6078: ?commands set y2zeroaxis
                   6079: ?commands set noy2zeroaxis
                   6080: ?commands show y2zeroaxis
                   6081: ?set y2zeroaxis
                   6082: ?set noy2zeroaxis
                   6083: ?show y2zeroaxis
                   6084: ?y2zeroaxis
                   6085: ?noy2zeroaxis
                   6086:  The `set y2zeroaxis` command draws a line at the origin of the y2 (right-hand)
                   6087:  axis (x2 = 0).  For details, please see `set zeroaxis`.
                   6088: 3 ydata
                   6089: ?commands set ydata
                   6090: ?commands show ydata
                   6091: ?set ydata
                   6092: ?show ydata
                   6093: ?ydata
                   6094:  Sets y-axis data to timeseries (dates/times).  Please see `set xdata`.
                   6095: 3 ydtics
                   6096: ?commands set ydtics
                   6097: ?commands set noydtics
                   6098: ?commands show ydtics
                   6099: ?set ydtics
                   6100: ?set noydtics
                   6101: ?show ydtics
                   6102: ?ydtics
                   6103: ?noydtics
                   6104:  The `set ydtics` command changes tics on the y axis to days of the week.
                   6105:  Please see `set xdtics` for details.
                   6106: 3 ylabel
                   6107: ?commands set ylabel
                   6108: ?commands show ylabel
                   6109: ?set ylabel
                   6110: ?show ylabel
                   6111: ?ylabel
                   6112:  This command sets the label for the y axis.  Please see `set xlabel`.
                   6113: 3 ymtics
                   6114: ?commands set ymtics
                   6115: ?commands set noymtics
                   6116: ?commands show ymtics
                   6117: ?set ymtics
                   6118: ?set noymtics
                   6119: ?show ymtics
                   6120: ?ymtics
                   6121: ?noymtics
                   6122:  The `set ymtics` command changes tics on the y axis to months of the year.
                   6123:  Please see `set xmtics` for details.
                   6124: 3 yrange
                   6125: ?commands set yrange
                   6126: ?commands show yrange
                   6127: ?set yrange
                   6128: ?show yrange
                   6129: ?yrange
                   6130:  The `set yrange` command sets the vertical range that will be displayed on
                   6131:  the y axis.  Please see `set xrange` for details.
                   6132: 3 ytics
                   6133: ?commands set ytics
                   6134: ?commands set noytics
                   6135: ?commands show ytics
                   6136: ?set ytics
                   6137: ?set noytics
                   6138: ?show ytics
                   6139: ?ytics
                   6140: ?noytics
                   6141:  The `set ytics` command controls major (labelled) tics on the y axis.
                   6142:  Please see `set xtics` for details.
                   6143: 3 yzeroaxis
                   6144: ?commands set yzeroaxis
                   6145: ?commands set noyzeroaxis
                   6146: ?commands show yzeroaxis
                   6147: ?set yzeroaxis
                   6148: ?set noyzeroaxis
                   6149: ?show yzeroaxis
                   6150: ?yzeroaxis
                   6151: ?noyzeroaxis
                   6152:  The `set yzeroaxis` command draws a line at x = 0.  For details, please see
                   6153:  `set zeroaxis`.
                   6154: 3 zdata
                   6155: ?commands set zdata
                   6156: ?commands show zdata
                   6157: ?set zdata
                   6158: ?show zdata
                   6159: ?zdata
                   6160:  Set zaxis date to timeseries (dates/times).  Please see `set xdata`.
                   6161: 3 zdtics
                   6162: ?commands set zdtics
                   6163: ?commands set nozdtics
                   6164: ?commands show zdtics
                   6165: ?set zdtics
                   6166: ?set nozdtics
                   6167: ?show zdtics
                   6168: ?zdtics
                   6169: ?nozdtics
                   6170:  The `set zdtics` command changes tics on the z axis to days of the week.
                   6171:  Please see `set xdtics` for details.
                   6172: 3 zero
                   6173: ?commands set zero
                   6174: ?commands show zero
                   6175: ?set zero
                   6176: ?show zero
                   6177: ?zero
                   6178:  The `zero` value is the default threshold for values approaching 0.0.
                   6179:
                   6180:  Syntax:
                   6181:        set zero <expression>
                   6182:        show zero
                   6183:
                   6184:  `gnuplot` will not plot a point if its imaginary part is greater in magnitude
                   6185:  than the `zero` threshold.  This threshold is also used in various other
                   6186:  parts of `gnuplot` as a (crude) numerical-error threshold.  The default
                   6187:  `zero` value is 1e-8.  `zero` values larger than 1e-3 (the reciprocal of the
                   6188:  number of pixels in a typical bitmap display) should probably be avoided, but
                   6189:  it is not unreasonable to set `zero` to 0.0.
                   6190: 3 zeroaxis
                   6191: ?commands set zeroaxis
                   6192: ?commands set nozeroaxis
                   6193: ?commands show zeroaxis
                   6194: ?set zeroaxis
                   6195: ?set nozeroaxis
                   6196: ?show zeroaxis
                   6197: ?zeroaxis
                   6198: ?nozeroaxis
                   6199:  The x axis may be drawn by `set xzeroaxis` and removed by `set noxzeroaxis`.
                   6200:  Similar commands behave similarly for the y, x2, and y2 axes.
                   6201:
                   6202:  Syntax:
                   6203:        set {x|x2|y|y2|}zeroaxis { {linestyle | ls <line_style>}
                   6204:                                   | { linetype | lt <line_type>}
                   6205:                                     { linewidth | lw <line_width>}}
                   6206:        set no{x|x2|y|y2|}zeroaxis
                   6207:        show {x|y|}zeroaxis
                   6208:
                   6209:
                   6210:  By default, these options are off.  The selected zero axis is drawn
                   6211:  with a line of type <line_type> and width <line_width> (if supported
                   6212:  by the terminal driver currently in use), or a user-defined style
                   6213:  <line_style>.
                   6214:
                   6215:  If no linetype is specified, any zero axes selected will be drawn
                   6216:  using the axis linetype (linetype 0).
                   6217:
                   6218:  `set zeroaxis l` is equivalent to `set xzeroaxis l; set yzeroaxis l`. `set
                   6219:  nozeroaxis` is equivalent to `set noxzeroaxis; set noyzeroaxis`.
                   6220: 3 zlabel
                   6221: ?commands set zlabel
                   6222: ?commands show zlabel
                   6223: ?set zlabel
                   6224: ?show zlabel
                   6225: ?zlabel
                   6226:  This command sets the label for the z axis.  Please see `set xlabel`.
                   6227: 3 zmtics
                   6228: ?commands set zmtics
                   6229: ?commands set nozmtics
                   6230: ?commands show zmtics
                   6231: ?set zmtics
                   6232: ?set nozmtics
                   6233: ?show zmtics
                   6234: ?zmtics
                   6235: ?nozmtics
                   6236:  The `set zmtics` command changes tics on the z axis to months of the year.
                   6237:  Please see `set xmtics` for details.
                   6238: 3 zrange
                   6239: ?commands set zrange
                   6240: ?commands show zrange
                   6241: ?set zrange
                   6242: ?show zrange
                   6243: ?zrange
                   6244:  The `set zrange` command sets the range that will be displayed on the z axis.
                   6245:  The zrange is used only by `splot` and is ignored by `plot`.  Please see `set
                   6246:  xrange` for details.
                   6247: 3 ztics
                   6248: ?commands set ztics
                   6249: ?commands set noztics
                   6250: ?commands show ztics
                   6251: ?set ztics
                   6252: ?set noztics
                   6253: ?show ztics
                   6254: ?ztics
                   6255: ?noztics
                   6256:  The `set ztics` command controls major (labelled) tics on the z axis.
                   6257:  Please see `set xtics` for details.
                   6258: 2 shell
                   6259: ?commands shell
                   6260: ?shell
                   6261:  The `shell` command spawns an interactive shell.  To return to `gnuplot`,
                   6262:  type `logout` if using VMS, `exit` or the END-OF-FILE character if using
                   6263:  Unix, `endcli` if using AmigaOS, or `exit` if using MS-DOS or OS/2.
                   6264:
                   6265:  A single shell command may be spawned by preceding it with the ! character
                   6266:  ($ if using VMS) at the beginning of a command line.  Control will return
                   6267:  immediately to `gnuplot` after this command is executed.  For example, in
                   6268:  Unix, AmigaOS, MS-DOS or OS/2,
                   6269:
                   6270:        ! dir
                   6271:
                   6272:  prints a directory listing and then returns to `gnuplot`.
                   6273:
                   6274:  On an Atari, the `!` command first checks whether a shell is already loaded
                   6275:  and uses it, if available.  This is practical if `gnuplot` is run from
                   6276:  `gulam`, for example.
                   6277: 2 splot
                   6278: ?commands splot
                   6279: ?splot
                   6280:  `splot` is the command for drawing 3-d plots (well, actually projections on
                   6281:  a 2-d surface, but you knew that).  It can create a plot from functions or
                   6282:  a data file in a manner very similar to the `plot` command.
                   6283:
                   6284:  See `plot` for features common to the `plot` command; only differences are
                   6285:  discussed in detail here.  Note specifically that the `binary` and `matrix`
                   6286:  options (discussed under "datafile-modifiers") are not available for `plot`.
                   6287:
                   6288:  Syntax:
                   6289:        splot {<ranges>}
                   6290:              <function> | "<datafile>" {datafile-modifiers}}
                   6291:              {<title-spec>} {with <style>}
                   6292:              {, {definitions,} <function> ...}
                   6293:
                   6294:  where either a <function> or the name of a data file enclosed in quotes is
                   6295:  supplied.  The function can be a mathematical expression, or a triple of
                   6296:  mathematical expressions in parametric mode.
                   6297:
                   6298:  By default `splot` draws the xy plane completely below the plotted data.
                   6299:  The offset between the lowest ztic and the xy plane can be changed by `set
                   6300:  ticslevel`.  The orientation of a `splot` projection is controlled by
                   6301:  `set view`.  See `set view` and `set ticslevel` for more information.
                   6302:
                   6303:  The syntax for setting ranges on the `splot` command is the same as for
                   6304:  `plot`.  In non-parametric mode, the order in which ranges must be given is
                   6305:  `xrange`, `yrange`, and `zrange`.  In parametric mode, the order is `urange`,
                   6306:  `vrange`, `xrange`, `yrange`, and `zrange`.
                   6307:
                   6308:  The `title` option is the same as in `plot`.  The operation of `with` is also
                   6309:  the same as in `plot`, except that the plotting styles available to `splot`
                   6310:  are limited to `lines`, `points`, `linespoints`, `dots`, and `impulses`;  the
                   6311:  error-bar capabilities of `plot` are not available for `splot`.
                   6312:
                   6313:  The datafile options have more differences.
                   6314: 3 data-file
                   6315: ?commands splot datafile
                   6316: ?splot datafile
                   6317: ?splot data-file
                   6318:  As for `plot`, discrete data contained in a file can be displayed by
                   6319:  specifying the name of the data file, enclosed in quotes,  on the `splot`
                   6320:  command line.
                   6321:
                   6322:  Syntax:
                   6323:        splot '<file_name>' {binary | matrix}
                   6324:                            {index <index list>}
                   6325:                            {every <every list>}
                   6326:                            {using <using list>}
                   6327:
                   6328:  The special filenames `""` and `"-"` are permitted, as in `plot`.
                   6329:
                   6330:  In brief, `binary` and `matrix` indicate that the the data are in a special
                   6331:  form, `index` selects which data sets in a multi-data-set file are to be
                   6332:  plotted, `every` specifies which datalines (subsets) within a single data
                   6333:  set are to be plotted, and `using` determines how the columns within a single
                   6334:  record are to be interpreted.
                   6335:
                   6336:  The options `index` and `every` behave the same way as with `plot`;  `using`
                   6337:  does so also, except that the `using` list must provide three entries
                   6338:  instead of two.
                   6339:
                   6340:  The `plot` options `thru` and `smooth` are not available for `splot`, but
                   6341:  `cntrparams` and `dgrid3d` provide limited smoothing cabilities.
                   6342:
                   6343:  Data file organization is essentially the same as for `plot`, except that
                   6344:  each point is an (x,y,z) triple.  If only a single value is provided, it
                   6345:  will be used for z, the datablock number will be used for y, and the index
                   6346:  of the data point in the datablock will be used for x.  If two values are
                   6347:  provided, `gnuplot` gives you an error message.  Three values are interpreted
                   6348:  as an (x,y,z) triple.  Additional values are generally used as errors, which
                   6349:  can be used by `fit`.
                   6350:
                   6351:  Single blank records separate datablocks in a `splot` datafile; `splot`
                   6352:  treats datablocks as the equivalent of function y-isolines.  No line will
                   6353:  join points separated by a blank record.  If all datablocks contain the same
                   6354:  number of points, `gnuplot` will draw cross-isolines between datablocks,
                   6355:  connecting corresponding points.  This is termed "grid data", and is required
                   6356:  for drawing a surface, for contouring (`set contour`) and hidden-line removal
                   6357:  (`set hidden3d`). See also `splot grid data`
                   6358:
                   6359:  It is no longer necessary to specify `parametric` mode for three-column
                   6360:  `splot`s.
                   6361: 4 binary
                   6362: ?commands splot datafile binary
                   6363: ?splot datafile binary
                   6364: ?splot binary
                   6365: ?data-file binary
                   6366: ?datafile binary
                   6367: ?binary
                   6368: ?binary data
                   6369: ?binary files
                   6370:  `splot` can read binary files written with a specific format (and on a
                   6371:  system with a compatible binary file representation.)
                   6372:
                   6373:  In previous versions, `gnuplot` dynamically detected binary data files.  It
                   6374:  is now necessary to specify the keyword `binary` directly after the filename.
                   6375:
                   6376:  Single precision floats are stored in a binary file as follows:
                   6377:
                   6378:        <N+1>  <y0>   <y1>   <y2>  ...  <yN>
                   6379:         <x0> <z0,0> <z0,1> <z0,2> ... <z0,N>
                   6380:         <x1> <z1,0> <z1,1> <z1,2> ... <z1,N>
                   6381:          :      :      :      :   ...    :
                   6382:
                   6383:  which are converted into triplets:
                   6384:        <x0> <y0> <z0,0>
                   6385:        <x0> <y1> <z0,1>
                   6386:        <x0> <y2> <z0,2>
                   6387:         :    :     :
                   6388:        <x0> <yN> <z0,N>
                   6389:
                   6390:        <x1> <y0> <z1,0>
                   6391:        <x1> <y1> <z1,1>
                   6392:         :    :     :
                   6393:
                   6394:  These triplets are then converted into `gnuplot` iso-curves and then
                   6395:  `gnuplot` proceeds in the usual manner to do the rest of the plotting.
                   6396:
                   6397:  A collection of matrix and vector manipulation routines (in C) is provided
                   6398:  in `binary.c`.  The routine to write binary data is
                   6399:
                   6400:        int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
                   6401:
                   6402:  An example of using these routines is provided in the file `bf_test.c`, which
                   6403:  generates binary files for the demo file `demo/binary.dem`.
                   6404:
                   6405:  The `index` keyword is not supported, since the file format allows only one
                   6406:  surface per file.  The `every` and `using` filters are supported.  `using`
                   6407:  operates as if the data were read in the above triplet form.
1.1.1.2 ! maekawa  6408: ^ <a href="http://www.gnuplot.vt.edu/gnuplot/gpdocs/binary.html">Binary File Splot Demo.</a>
1.1       maekawa  6409: 4 example datafile
                   6410: ?commands splot datafile example
                   6411: ?splot datafile example
                   6412: ?splot example
                   6413:  A simple example of plotting a 3-d data file is
                   6414:
                   6415:        splot 'datafile.dat'
                   6416:
                   6417:  where the file "datafile.dat" might contain:
                   6418:
                   6419:        # The valley of the Gnu.
                   6420:           0 0 10
                   6421:           0 1 10
                   6422:           0 2 10
                   6423:
                   6424:           1 0 10
                   6425:           1 1 5
                   6426:           1 2 10
                   6427:
                   6428:           2 0 10
                   6429:           2 1 1
                   6430:           2 2 10
                   6431:
                   6432:           3 0 10
                   6433:           3 1 0
                   6434:           3 2 10
                   6435:
                   6436:  Note that "datafile.dat" defines a 4 by 3 grid ( 4 rows of 3 points each ).
                   6437:  Rows (datablocks) are separated by blank records.
                   6438:
                   6439: ^ <img align=bottom src="http://www.nas.nasa.gov/~woo/gnuplot/doc/splot.gif" alt="[splot.gif]" width=640 height=480>
                   6440:  Note also that the x value is held constant within each dataline.  If you
                   6441:  instead keep y constant, and plot with hidden-line removal enabled, you will
                   6442:  find that the surface is drawn 'inside-out'.
                   6443:
                   6444:  Actually for grid data it is not necessary to keep the x values constant
                   6445:  within a datablock, nor is it necessary to keep the same sequence of y
                   6446:  values.  `gnuplot` requires only that the number of points be the same for
                   6447:  each datablock.  However since the surface mesh, from which contours are
                   6448:  derived, connects sequentially corresponding points, the effect of an
                   6449:  irregular grid on a surface plot is unpredictable and should be examined
                   6450:  on a case-by-case basis.
                   6451: 4 matrix
                   6452: ?commands splot datafile matrix
                   6453: ?splot datafile matrix
                   6454: ?splot matrix
                   6455: ?data-file matrix
                   6456: ?datafile matrix
                   6457: ?matrix
                   6458:  The `matrix` flag indicates that the ASCII data are stored in matrix format.
                   6459:  The z-values are read in a row at a time, i. e.,
                   6460:        z11 z12 z13 z14 ...
                   6461:        z21 z22 z23 z24 ...
                   6462:        z31 z32 z33 z34 ...
                   6463:  and so forth.  The row and column indices are used for the x- and y-values.
                   6464: 3 grid_data
                   6465: ?commands splot grid_data
                   6466: ?splot grid_data
                   6467: ?grid_data
                   6468:  The 3D routines are designed for points in a grid format, with one sample,
                   6469:  datapoint, at each mesh intersection; the datapoints may originate from
                   6470:  either evaluating a function, see `set isosamples`, or reading a datafile,
                   6471:  see `splot datafile`.  The term "isoline" is applied to the mesh lines for
                   6472:  both functions and data.  Note that the mesh need not be rectangular in x
                   6473:  and y, as it may be parameterized in u and v, see `set isosamples`.
                   6474:
                   6475:  However, `gnuplot` does not require that format.  In the case of functions,
                   6476:  'samples' need not be equal to 'isosamples', i.e., not every x-isoline
                   6477:  sample need intersect a y-isoline. In the case of data files, if there
                   6478:  are an equal number of scattered data points in each datablock, then
                   6479:  "isolines" will connect the points in a datablock, and "cross-isolines"
                   6480:  will connect the corresponding points in each datablock to generate a
                   6481:  "surface".  In either case, contour and hidden3d modes may give different
                   6482:  plots than if the points were in the intended format.  Scattered data can be
                   6483:  converted to a {different} grid format with `set dgrid3d`.
                   6484:
                   6485:  The contour code tests for z intensity along a line between a point on a
                   6486:  y-isoline and the corresponding point in the next y-isoline.  Thus a `splot`
                   6487:  contour of a surface with samples on the x-isolines that do not coincide with
                   6488:  a y-isoline intersection will ignore such samples. Try:
                   6489:         set xrange [-pi/2:pi/2]; set yrange [-pi/2:pi/2]
                   6490:         set function style lp
                   6491:         set contour
                   6492:         set isosamples 10,10; set samples 10,10;
                   6493:         splot cos(x)*cos(y)
                   6494:         set samples 4,10; replot
                   6495:         set samples 10,4; replot
                   6496:
                   6497: 3 splot_overview
                   6498: ?commands splot_overview
                   6499: ? splot_overview
                   6500:  `splot` can display a surface as a collection of points, or by connecting
                   6501:  those points.  As with `plot`, the points may be read from a data file or
                   6502:  result from evaluation of a function at specified intervals, see `set
                   6503:  isosamples`.  The surface may be approximated by connecting the points
                   6504:  with straight line segments, see `set surface`, in which case the surface
                   6505:  can be made opaque with `set hidden3d.`  The orientation from which the 3d
                   6506:  surface is viewed can be changed with `set view`.
                   6507:
                   6508:  Additionally, for points in a grid format, `splot` can interpolate points
                   6509:  having a common amplitude (see `set contour`) and can then connect those
                   6510:  new points to display contour lines, either directly with straight-line
                   6511:  segments or smoothed lines (see `set cntrparams`).  Functions are already
                   6512:  evaluated in a grid format, determined by `set isosamples` and `set samples`,
                   6513:  while file data must either be in a grid format, as described in `data-file`,
                   6514:  or be used to generate a grid (see `set dgrid3d`).
                   6515:
                   6516:  Contour lines may be displayed either on the surface or projected onto the
                   6517:  base.  The base projections of the contour lines may be written to a
                   6518:  file, and then read with `plot`, to take advantage of `plot`'s additional
                   6519:  formatting capabilities.
                   6520: 2 test
                   6521: ?commands test
                   6522: ?test
                   6523:  `test` creates a display of line and point styles and other useful things
                   6524:  appropriate for the terminal you are using.
                   6525:
                   6526:  Syntax:
                   6527:        test
                   6528: 2 update
                   6529: ?commands update
                   6530: ?update
                   6531:  This command writes the current values of the fit parameters into the given
                   6532:  file, formatted as an initial-value file (as described in the `fit`section).
                   6533:  This is useful for saving the current values for later use or for restarting
                   6534:  a converged or stopped fit.
                   6535:
                   6536:  Syntax:
                   6537:        update <filename> {<filename>}
                   6538:
                   6539:  If a second filename is supplied, the updated values are written to this
                   6540:  file, and the original parameter file is left unmodified.
                   6541:
                   6542:  Otherwise, if the file already exists, `gnuplot` first renames it by
                   6543:  appending `.old` and then opens a new file.  That is, "`update 'fred'`"
                   6544:  behaves the same as "`!rename fred fred.old; update 'fred.old' 'fred'`".
                   6545:  [On DOS and other systems that use the twelve-character "filename.ext"
                   6546:  naming convention, "ext" will be "`old`" and "filename" will be related
                   6547:  (hopefully recognizably) to the initial name.  Renaming is not done at all
                   6548:  on VMS systems, since they use file-versioning.]
                   6549:
                   6550:  Please see `fit` for more information.
                   6551: 1 Graphical User Interfaces
                   6552: ?graphical user interfaces
                   6553: ?gui's
                   6554:  Several graphical user interfaces have been written for `gnuplot` and one for
                   6555:  win32 is included in this distribution.  In addition, there is a Macintosh
                   6556:  interface at
                   6557: ^<a href="ftp://ftp.ee.gatech.edu/pub/mac/gnuplot">
                   6558:         ftp://ftp.ee.gatech.edu/pub/mac/gnuplot
                   6559: ^</a>
                   6560:  and several X11 interfaces include three Tcl/Tk located at the usual Tcl/Tk
                   6561:  repositories.
                   6562: 1 Bugs
                   6563: ?bugs
                   6564:  Floating point exceptions (floating point number too large/small, divide by
                   6565:  zero, etc.) may occasionally be generated by user defined functions.  Some of
                   6566:  the demos in particular may cause numbers to exceed the floating point range.
                   6567:  Whether the system ignores such exceptions (in which case `gnuplot` labels
                   6568:  the corresponding point as undefined) or aborts `gnuplot` depends on the
                   6569:  compiler/runtime environment.
                   6570:
                   6571:  The bessel functions do not work for complex arguments.
                   6572:
                   6573:  The gamma function does not work for complex arguments.
                   6574:
                   6575:  As of `gnuplot` version 3.7, all development has been done using ANSI C.
                   6576:  With current operating system, compiler, and library releases, the OS
                   6577:  specific bugs documented in release 3.5, now relegated to `old_bugs`, may
                   6578:  no longer be relevant.
                   6579:
                   6580:  Bugs reported since the current release may be located via the official
                   6581:  distribution site:
                   6582:         ftp://ftp.dartmouth.edu/pub/gnuplot
                   6583:        http://www.cs.dartmouth.edu/gnuplot_info.html
                   6584:
                   6585:  Please e-mail any bugs to bug-gnuplot@dartmouth.edu.
                   6586: 2 Old_bugs
                   6587: ?old_bugs
                   6588: ?os_bugs
                   6589:  There is a bug in the stdio library for old Sun operating systems (SunOS
                   6590:  Sys4-3.2).  The "%g" format for 'printf' sometimes incorrectly prints numbers
                   6591:  (e.g., 200000.0 as "2").  Thus, tic mark labels may be incorrect on a Sun4
                   6592:  version of `gnuplot`.  A work-around is to rescale the data or use the `set
                   6593:  format` command to change the tic mark format to "%7.0f" or some other
                   6594:  appropriate format.  This appears to have been fixed in SunOS 4.0.
                   6595:
                   6596:  Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2 and
                   6597:  SunOS 4.0, the 'sscanf' routine incorrectly parses "00 12" with the format
                   6598:  "%f %f" and reads 0 and 0 instead of 0 and 12.  This affects data input.  If
                   6599:  the data file contains x coordinates that are zero but are specified like
                   6600:  '00', '000', etc, then you will read the wrong y values.  Check any data
                   6601:  files or upgrade the SunOS.  It appears to have been fixed in SunOS 4.1.1.
                   6602:
                   6603:  Suns appear to overflow when calculating exp(-x) for large x, so `gnuplot`
                   6604:  gets an undefined result.  One work-around is to make a user-defined function
                   6605:  like e(x) = x<-500 ? 0 : exp(x).  This affects plots of Gaussians (exp(-x*x))
                   6606:  in particular, since x*x grows quite rapidly.
                   6607:
                   6608:  Microsoft C 5.1 has a nasty bug associated with the %g format for 'printf'.
                   6609:  When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are used, 'printf' will
                   6610:  incorrectly print numbers in the range 1e-4 to 1e-1.  Numbers that should be
                   6611:  printed in the %e format are incorrectly printed in the %f format, with the
                   6612:  wrong number of zeros after the decimal point.  To work around this problem,
                   6613:  use the %e or %f formats explicitly.
                   6614:
                   6615:  `gnuplot`, when compiled with Microsoft C, did not work correctly on two VGA
                   6616:  displays that were tested.  The CGA, EGA and VGA drivers should probably be
                   6617:  rewritten to use the Microsoft C graphics library.  `gnuplot` compiled with
                   6618:  Borland C++ uses the Turbo C graphics drivers and does work correctly with
                   6619:  VGA displays.
                   6620:
                   6621:  VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g format
                   6622:  for 'printf'.  The numbers are printed numerically correct, but may not be in
                   6623:  the requested format.  The K&R second edition says that for the %g format, %e
                   6624:  is used if the exponent is less than -4 or greater than or equal to the
                   6625:  precision.  The VAX uses %e format if the exponent is less than -1.  The VAX
                   6626:  appears to take no notice of the precision when deciding whether to use %e or
                   6627:  %f for numbers less than 1.  To work around this problem, use the %e or %f
                   6628:  formats explicitly.  From the VAX C 2.4 release notes: e,E,f,F,g,G  Result
                   6629:  will always contain a decimal  point.  For g and G, trailing zeros will not
                   6630:  be removed from the result.
                   6631:
                   6632:  VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented %g
                   6633:  format than release 2.4, but not much.  Trailing decimal points are now
                   6634:  removed, but trailing zeros are still not removed from %g numbers in
                   6635:  exponential format.
                   6636:
                   6637:  The two preceding problems are actually in the libraries rather than in the
                   6638:  compilers.  Thus the problems will occur whether `gnuplot` is built using
                   6639:  either the DEC compiler or some other one (e.g. the latest gcc).
                   6640:
                   6641:  ULTRIX X11R3 has a bug that causes the X11 driver to display "every other"
                   6642:  graph.  The bug seems to be fixed in DEC's release of X11R4 so newer releases
                   6643:  of ULTRIX don't seem to have the problem.  Solutions for older sites include
                   6644:  upgrading the X11 libraries (from DEC or direct from MIT) or defining
                   6645:  ULTRIX_KLUDGE when compiling the x11.trm file.  Note that the kludge is not
                   6646:  an ideal fix, however.
                   6647:
                   6648:  The constant HUGE was incorrectly defined in the NeXT OS 2.0 operating
                   6649:  system.  HUGE should be set to 1e38 in plot.h. This error has been corrected
                   6650:  in the 2.1 version of NeXT OS.
                   6651:
                   6652:  Some older models of HP plotters do not have a page eject command 'PG'.  The
                   6653:  current HPGL driver uses this command in HPGL_reset.  This may need to be
                   6654:  removed for these plotters.  The current PCL5 driver uses HPGL/2 for text as
                   6655:  well as graphics.  This should be modified to use scalable PCL fonts.
                   6656:
                   6657:  On the Atari version, it is not possible to send output directly to the
                   6658:  printer (using `/dev/lp` as output file), since CRs are added to LFs in
                   6659:  binary output.  As a work-around, write the output to a file and copy it to
                   6660:  the printer afterwards using a shell command.
                   6661:
                   6662:  On AIX 4, the literal 'NaNq' in a datafile causes the special internal value
                   6663:  'not-a-number' to be stored, rather than setting an internal 'undefined'
                   6664:  flag.  A workaround is to use `set missing 'NaNq'`.
                   6665:
                   6666:  There may be an up-to-date list of bugs since the release on the WWW page:
                   6667:        http://www.cs.dartmouth.edu/gnuplot_info.html
                   6668:
                   6669:  Please report any bugs to bug-gnuplot@dartmouth.edu.

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>