home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1994 March / Source_Code_CD-ROM_Walnut_Creek_March_1994.iso / compsrcs / misc / volume40 / gnuplot / part03 < prev    next >
Encoding:
Text File  |  1993-10-21  |  80.7 KB  |  2,302 lines

  1. Newsgroups: comp.sources.misc
  2. From: woo@playfair.stanford.edu ("Alexander Woo")
  3. Subject: v40i015:  gnuplot - interactive function plotting utility, Part03/33
  4. Message-ID: <1993Oct21.144231.1461@sparky.sterling.com>
  5. X-Md4-Signature: afbe21e4c8a29569820f966b5e93de8d
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Thu, 21 Oct 1993 14:42:31 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
  12. Posting-number: Volume 40, Issue 15
  13. Archive-name: gnuplot/part03
  14. Environment: UNIX, MS-DOS, VMS
  15. Supersedes: gnuplot3: Volume 24, Issue 23-48
  16.  
  17. #! /bin/sh
  18. # This is a shell archive.  Remove anything before this line, then feed it
  19. # into a shell via "sh file" or similar.  To overwrite existing files,
  20. # type "sh file -c".
  21. # Contents:  gnuplot/docs/gnuplot.doc.A gnuplot/term/post.trm
  22. # Wrapped by kent@sparky on Wed Oct 20 17:14:38 1993
  23. PATH=/bin:/usr/bin:/usr/ucb:/usr/local/bin:/usr/lbin ; export PATH
  24. echo If this archive is complete, you will see the following message:
  25. echo '          "shar: End of archive 3 (of 33)."'
  26. if test -f 'gnuplot/docs/gnuplot.doc.A' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'gnuplot/docs/gnuplot.doc.A'\"
  28. else
  29.   echo shar: Extracting \"'gnuplot/docs/gnuplot.doc.A'\" \(66025 characters\)
  30.   sed "s/^X//" >'gnuplot/docs/gnuplot.doc.A' <<'END_OF_FILE'
  31. X1 gnuplot
  32. X?
  33. X GNUPLOT is a command-driven interactive function plotting program.
  34. X
  35. X For help on any topic, type `help` followed by the name of the topic.
  36. X
  37. X The new GNUPLOT user should begin by reading the `introduction` topic
  38. X (type `help introduction`) and about the `plot` command (type `help plot`).
  39. X Additional help can be obtained from the USENET newsgroup
  40. X comp.graphics.gnuplot.
  41. X
  42. X2 copyright
  43. X?copyright
  44. X      Copyright (C) 1986 - 1993   Thomas Williams, Colin Kelley
  45. X
  46. X   Permission to use, copy, and distribute this software and its
  47. X   documentation for any purpose with or without fee is hereby granted,
  48. X   provided that the above copyright notice appear in all copies and
  49. X   that both that copyright notice and this permission notice appear
  50. X   in supporting documentation.
  51. X
  52. X   Permission to modify the software is granted, but not the right to
  53. X   distribute the modified code.  Modifications are to be distributed
  54. X   as patches to released version.
  55. X
  56. X   This software is provided "as is" without express or implied warranty.
  57. X
  58. X
  59. X   AUTHORS
  60. X
  61. X     Original Software:
  62. X       Thomas Williams,  Colin Kelley.
  63. X
  64. X     Gnuplot 2.0 additions:
  65. X         Russell Lang, Dave Kotz, John Campbell.
  66. X
  67. X     Gnuplot 3.0 additions:
  68. X         Gershon Elber and many others.
  69. X
  70. X   There is a mailing list for gnuplot users. Note, however, that the
  71. X   newsgroup 
  72. X         comp.graphics.gnuplot 
  73. X   is identical to the mailing list (they
  74. X   both carry the same set of messages). We prefer that you read the
  75. X   messages through that newsgroup, to subscribing to the mailing list.
  76. X   (If you can read that newsgroup, and are already on the mailing list,
  77. X   please send a message info-gnuplot-request@dartmouth.edu, asking to be
  78. X   removed from the mailing list.)
  79. X
  80. X   The address for mailing to list members is
  81. X         info-gnuplot@dartmouth.edu
  82. X   and for mailing administrative requests is 
  83. X         info-gnuplot-request@dartmouth.edu
  84. X   The mailing list for bug reports is 
  85. X         bug-gnuplot@dartmouth.edu
  86. X   The list of those interested in beta-test versions is
  87. X         info-gnuplot-beta@dartmouth.edu
  88. X
  89. X2 introduction
  90. X?introduction
  91. X GNUPLOT is a command-driven interactive function plotting program.
  92. X It is case sensitive (commands and function names written in lowercase
  93. X are not the same as those written in CAPS). All command names may be
  94. X abbreviated, as long as the abbreviation is not ambiguous. Any number
  95. X of commands may appear on a line, separated by semicolons (;).
  96. X Strings are indicated with quotes.  They may be either single or double
  97. X quotation marks, e.g.,
  98. X
  99. X          load "filename"
  100. X          cd 'dir'
  101. X
  102. X Any command-line arguments are assumed to be names of files containing
  103. X GNUPLOT commands, with the exception of standard X11 arguments, which
  104. X are processed first. Each file is loaded with the `load` command, in the
  105. X order specified. GNUPLOT exits after the last file is processed.  When
  106. X no load files are named, gnuplot enters into an interactive mode.
  107. X
  108. X Commands may extend over several input lines, by ending each
  109. X line but the last with a backslash (\). The backslash must be the LAST
  110. X character on each line. The effect is as if the backslash and newline
  111. X were not there. That is, no white space is implied, nor is a comment
  112. X terminated. Therefore, commenting out a continued line comments out
  113. X the entire command (see `comment`).
  114. X
  115. X In this documentation, curly braces ({}) denote optional arguments to
  116. X many commands, and a vertical bar (|) separates mutually exclusive
  117. X choices.  GNUPLOT keywords or help topics are indicated by backquotes
  118. X or `boldface` (where available).  Angle brackets (<>) are used to mark
  119. X replaceable tokens.
  120. X
  121. X For help on any topic, type `help` followed by the name of the topic.
  122. X
  123. X The new GNUPLOT user should begin by reading about the `plot`
  124. X command (type `help plot`).
  125. X2 cd
  126. X?cd
  127. X The `cd` command changes the working directory.
  128. X
  129. X Syntax:
  130. X         cd "<directory-name>"
  131. X
  132. X The directory name must be enclosed in quotes.
  133. X
  134. X Examples:
  135. X         cd 'subdir'
  136. X         cd ".."
  137. X2 clear
  138. X?clear
  139. X The `clear` command erases the current screen or output device as
  140. X specified by `set output`. This usually generates a formfeed on
  141. X hardcopy devices. Use `set terminal` to set the device type.
  142. X2 command line-editing
  143. X?line-editing
  144. X?editing
  145. X?history
  146. X?command line-editing
  147. X The Unix, Atari, VMS, MS-DOS and OS/2 versions of GNUPLOT support command
  148. X line-editing.  Also, a history mechanism allows previous commands to be
  149. X edited, and re-executed. After the command line has been edited, a newline
  150. X or carriage return will enter the entire line regardless of where the
  151. X cursor is positioned.
  152. X
  153. X The editing commands are as follows:
  154. X
  155. X@start table - first is interactive cleartext form
  156. X  `Line-editing`:
  157. X
  158. X  ^B moves back a single character.
  159. X  ^F moves forward a single character.
  160. X  ^A moves to the beginning of the line.
  161. X  ^E moves to the end of the line.
  162. X  ^H and DEL delete the previous character.
  163. X  ^D deletes the current character.
  164. X  ^K deletes from current position to the end of line.
  165. X  ^L,^R redraws line in case it gets trashed.
  166. X  ^U deletes the entire line.
  167. X  ^W deletes the last word.
  168. X
  169. X  `History`:
  170. X
  171. X  ^P moves back through history.
  172. X  ^N moves forward through history.
  173. X#Character && Function \\ \hline
  174. X#\multicolumn{3}{|c|}{Line Editing}\\
  175. X#\verb~^B~ && move back a single character.\\
  176. X#\verb~^F~ && move forward a single character.\\
  177. X#\verb~^A~ && move to the beginning of the line.\\
  178. X#\verb~^E~ && move to the end of the line.\\
  179. X#\verb~^H, DEL~ && delete the previous character.\\
  180. X#\verb~^D~ && delete the current character.\\
  181. X#\verb~^K~ && delete from current position to the end of line.\\
  182. X#\verb~^L, ^R~ && redraw line in case it gets trashed.\\
  183. X#\verb~^U~ && delete the entire line. \\
  184. X#\verb~^W~ && delete from the current word to the end of line. \\ \hline
  185. X#\multicolumn{3}{|c|}{History} \\
  186. X#\verb~^P~ && move back through history.\\
  187. X#\verb~^N~ && move forward through history.\\
  188. X%Character@@Function
  189. X%_
  190. X%@@Line Editing
  191. X%^B@@move back a single character.
  192. X%^F@@move forward a single character.
  193. X%^A@@move to the beginning of the line.
  194. X%^E@@move to the end of the line.
  195. X%^H, DEL@@delete the previous character.
  196. X%^D@@delete the current character.
  197. X%^K@@delete from current position to the end of line.
  198. X%^L, ^R@@redraw line in case it gets trashed.
  199. X%^U@@delete the entire line.
  200. X%^W@@delete from the current word to the end of line.
  201. X%_
  202. X%@@History
  203. X%^P@@move back through history.
  204. X%^N@@move forward through history.
  205. X@end table
  206. X
  207. X On the IBM PC the use of a TSR program such as DOSEDIT or CED may be
  208. X desired for line editing. For such a case GNUPLOT may be compiled with
  209. X no line editing capability (default makefile setup). Set READLINE in the
  210. X makefile and add readline.obj to the link file if GNUPLOT line editing
  211. X is to be used for the IBM PC. The following arrow keys may be used
  212. X on the IBM PC and Atari versions if readline is used:
  213. X
  214. X@start table - first is interactive cleartext form
  215. X  Left  Arrow     - same as ^B.
  216. X  Right Arrow     - same as ^F.
  217. X  Ctl Left  Arrow - same as ^A.
  218. X  Ctl Right Arrow - same as ^E.
  219. X  Up    Arrow     - same as ^P.
  220. X  Down  Arrow     - same as ^N.
  221. X#Arrow key & Function & \\ \hline
  222. X#Left      & same as \verb~^B~. & \\
  223. X#Right     & same as \verb~^F~. & \\
  224. X#Ctl Left  & same as \verb~^A~. & \\
  225. X#Ctl Right & same as \verb~^E~. & \\
  226. X#Up        & same as \verb~^P~. & \\
  227. X#Down      & same as \verb~^N~. & \\
  228. X%Arrow key@@Function
  229. X%_
  230. X%Left Arrow@@same as ^B.
  231. X%Right Arrow@@same as ^F.
  232. X%Ctl Left Arrow@@same as ^A.
  233. X%Ctl Right Arrow@@same as ^E.
  234. X%Up Arrow@@same as ^P.
  235. X%Down Arrow@@same as ^N.
  236. X%_
  237. X@end table
  238. X
  239. X The Atari version of readline defines some additional key aliases:
  240. X
  241. X@start table - first is interactive cleartext form
  242. X  Undo            - same as ^L.
  243. X  Home            - same as ^A.
  244. X  Ctrl Home       - same as ^E.
  245. X  ESC             - same as ^U.
  246. X  Help            - `help' plus return.
  247. X  Ctrl Help       - `help '.
  248. X#Arrow key & Function & \\ \hline
  249. X#Undo      & same as \verb~^L~. & \\
  250. X#Home      & same as \verb~^A~. & \\
  251. X#Ctrl Home & same as \verb~^E~. & \\
  252. X#ESC       & same as \verb~^U~. & \\
  253. X#Help      & `{\bf help}' plus return. & \\
  254. X#Ctrl Help & `{\bf help }'. & \\
  255. X%Arrow key@@Function
  256. X%_
  257. X%Undo@@same as ^L.
  258. X%Home@@same as ^A.
  259. X%Ctrl Home@@same as ^E.
  260. X%ESC@@same as ^U.
  261. X%Help@@help plus return.
  262. X%Ctrl Help@@help .
  263. X%_
  264. X@end table
  265. X
  266. X (The readline function in gnuplot is not the same as the readline used
  267. X in GNU BASH and GNU EMACS.  It is somewhat compatible however.)
  268. X2 comment
  269. X?comments
  270. X Comments are supported as follows: a # may appear in most places in a line
  271. X and GNUPLOT will ignore the rest of the line. It will not have this
  272. X effect inside quotes, inside numbers (including complex numbers), inside
  273. X command substitutions, etc. In short, it works anywhere it makes sense
  274. X to work.
  275. X2 environment
  276. X?environment
  277. X A number of shell environment variables are understood by GNUPLOT.
  278. X None of these are required, but may be useful.
  279. X
  280. X If GNUTERM is defined, it is used as the name of the terminal type to
  281. X be used. This overrides any terminal type sensed by GNUPLOT on start
  282. X up, but is itself overridden by the .gnuplot (or equivalent) start-up
  283. X file (see `start-up`), and of course by later explicit changes.
  284. X
  285. X On Unix, AmigaDOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined
  286. X to be the pathname of the HELP file (gnuplot.gih).
  287. X
  288. X On VMS, the symbol GNUPLOT$HELP should be defined as the name of
  289. X the help library for GNUPLOT.
  290. X
  291. X On Unix, HOME is used as the name of a directory to search for
  292. X a .gnuplot file if none is found in the current directory.
  293. X On AmigaDOS, AtariTOS, MS-DOS and OS/2, GNUPLOT is used. On VMS, SYS$LOGIN:
  294. X is used. See `help start-up`.
  295. X
  296. X On Unix, PAGER is used as an output filter for help messages.
  297. X
  298. X On Unix, AtariTOS and AmigaDOS, SHELL is used for the `shell` command.
  299. X On MS-DOS and OS/2, COMSPEC is used for the `shell` command.
  300. X
  301. X On AmigaDOS, GNUFONT is used for the screen font.  For example:
  302. X "setenv GNUFONT sapphire/14".
  303. X
  304. X On MS-DOS, if the BGI interface is used, the variable `BGI` is used to point
  305. X to the full path of the BGI drivers directory. Furthermore SVGA is used to
  306. X name the Super VGA BGI driver in 800x600 res., and its mode of operation
  307. X as 'Name.Mode'.
  308. X E.g., if the Super VGA driver is C:\TC\BGI\SVGADRV.BGI and mode 3 is
  309. X used for 800x600 res., then: 'set BGI=C:\TC\BGI' and 'set SVGA=SVGADRV.3'.
  310. X2 exit
  311. X?exit
  312. X?quit
  313. X The commands `exit` and `quit` and the END-OF-FILE character
  314. X will exit GNUPLOT. All these commands will clear the output device
  315. X (as the `clear` command does) before exiting.
  316. X2 expressions
  317. X?expressions
  318. X In general, any mathematical expression accepted by C, FORTRAN,
  319. X Pascal, or BASIC is valid. The precedence of these operators is
  320. X determined by the specifications of the C programming language.
  321. X White space (spaces and tabs) is ignored inside expressions.
  322. X
  323. X Complex constants may be expressed as the {<real>,<imag>}, where <real>
  324. X and <imag> must be numerical constants. For example, {3,2}
  325. X represents 3 + 2i; {0,1} represents `i` itself. The curly braces
  326. X are explicitly required here.
  327. X3 functions
  328. X?expressions functions
  329. X?functions
  330. X The functions in GNUPLOT are the same as the corresponding functions
  331. X in the Unix math library, except that all functions accept integer,
  332. X real, and complex arguments, unless otherwise noted. The `sgn`
  333. X function is also supported, as in BASIC.
  334. X@start table
  335. X#Function & Arguments & Returns \\ \hline
  336. X%Function@Arguments@Returns
  337. X%_
  338. X4 abs
  339. X?expressions functions abs
  340. X?functions abs
  341. X?abs
  342. X#abs(x) & any  &  absolute value of {\tt x}, $|x|$; same type \\
  343. X#abs(x) & complex &  length of {\tt x}, $\sqrt{{\mbox{real}(x)^{2} +
  344. X#\mbox{imag}(x)^{2}}}$ \\
  345. X%abs(x)@any@absolute value of x, $|x|$; same type
  346. X%abs(x)@complex@length of x, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$
  347. X The `abs` function returns the absolute value of its argument. The
  348. X returned value is of the same type as the argument.
  349. X
  350. X For complex arguments, abs(x) is defined as the length of x in the
  351. X complex plane [i.e.,  sqrt(real(x)**2 + imag(x)**2) ].
  352. X4 acos
  353. X?expressions functions acos
  354. X?functions acos
  355. X?acos
  356. X#acos(x) & any  & $\cos^{-1} x$ (inverse cosine) in radians \\
  357. X%acos(x)@any@$cos sup -1 x$ (inverse cosine) in radians
  358. X The `acos` function returns the arc cosine (inverse cosine) of its
  359. X argument. `acos` returns its argument in radians.
  360. X4 arg
  361. X?expressions functions arg
  362. X?functions arg
  363. X?arg
  364. X#arg(x) & complex & the phase of $x$ in radians\\
  365. X%arg(x)@complex@the phase of $x$ in radians
  366. X The `arg` function returns the phase of a complex number, in radians.
  367. X4 asin
  368. X?expressions functions asin
  369. X?functions asin
  370. X?asin
  371. X#asin(x) & any  & $\sin^{-1} x$ (inverse sin) in radians \\
  372. X%asin(x)@any@$sin sup -1 x$ (inverse sin) in radians
  373. X The `asin` function returns the arc sin (inverse sin) of its argument.
  374. X `asin` returns its argument in radians.
  375. X4 atan
  376. X?expressions functions atan
  377. X?functions atan
  378. X?atan
  379. X#atan(x) & any  & $\tan^{-1} x$ (inverse tangent) in radians \\
  380. X%atan(x)@any@$tan sup -1 x$ (inverse tangent) in radians
  381. X The `atan` function returns the arc tangent (inverse tangent) of its
  382. X argument. `atan` returns its argument in radians.
  383. X4 besj0
  384. X?expressions functions besj0
  385. X?functions besj0
  386. X?besj0
  387. X#besj0(x) & radians &  $j_{0}$ Bessel function of $x$ \\
  388. X%besj0(x)@radians@$j sub 0$ Bessel function of $x$
  389. X The `besj0` function returns the j0th Bessel function of its argument.
  390. X `besj0` expects its argument to be in radians.
  391. X4 besj1
  392. X?expressions functions besj1
  393. X?functions besj1
  394. X?besj1
  395. X#besj1(x) & radians & $j_{1}$ Bessel function of $x$ \\
  396. X%besj1(x)@radians@$j sub 1$ Bessel function of $x$
  397. X The `besj1` function returns the j1st Bessel function of its argument.
  398. X `besj1` expects its argument to be in radians.
  399. X4 besy0
  400. X?expressions functions besy0
  401. X?functions besy0
  402. X?besy0
  403. X#besy0(x) & radians & $y_{0}$ Bessel function of $x$ \\
  404. X%besy0(x)@radians@$y sub 0$ Bessel function of $x$
  405. X The `besy0` function returns the y0th Bessel function of its argument.
  406. X `besy0` expects its argument to be in radians.
  407. X4 besy1
  408. X?expressions functions besy1
  409. X?functions besy1
  410. X?besy1
  411. X#besy1(x) & radians & $y_{1}$ Bessel function of $x$ \\
  412. X%besy1(x)@radians@$y sub 1$ Bessel function of $x$
  413. X The `besy1` function returns the y1st Bessel function of its argument.
  414. X `besy1` expects its argument to be in radians.
  415. X4 ceil
  416. X?expressions functions ceil
  417. X?functions ceil
  418. X?ceil
  419. X#ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$
  420. X#(real part) \\
  421. X%ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part)
  422. X The `ceil` function returns the smallest integer that is not less than its
  423. X argument. For complex numbers, `ceil` returns the smallest integer
  424. X not less than the real part of its argument.
  425. X4 cos
  426. X?expressions functions cos
  427. X?functions cos
  428. X?cos
  429. X#cos(x) & radians & $\cos x$, cosine of $x$ \\
  430. X%cos(x)@radians@$cos~x$, cosine of $x$
  431. X The `cos` function returns the cosine of its argument. `cos` expects its
  432. X argument to be in radians.
  433. X4 cosh
  434. X?expressions functions cosh
  435. X?functions cosh
  436. X?cosh
  437. X#cosh(x) & radians & $\cosh x$, hyperbolic cosine of $x$ \\
  438. X%cosh(x)@radians@$cosh~x$, hyperbolic cosine of $x$
  439. X The `cosh` function returns the hyperbolic cosine of its argument.
  440. X `cosh` expects its argument to be in radians.
  441. X4 erf
  442. X?expressions functions erf
  443. X?functions erf
  444. X?erf
  445. X#erf(x) & any & $\mbox{Erf}(\mbox{real}(x))$,  error function of real($x$) \\
  446. X%erf(x)@any@$erf ( roman real (x))$, error function of real ($x$)
  447. X The `erf` function returns the error function of the real part of
  448. X its argument.
  449. X If the argument is a complex value, the imaginary component is ignored.
  450. X4 erfc
  451. X?expressions functions erfc
  452. X?functions erfc
  453. X?erfc
  454. X#erfc(x) & any & $\mbox{Erfc}(\mbox{real}(x))$,  1.0 - error function of real($x$) \\
  455. X%erfc(x)@any@$erfc ( roman real (x))$, 1.0 - error function of real ($x$)
  456. X The `erfc` function returns 1.0 - the error function of the
  457. X real part of its argument.
  458. X If the argument is a complex value, the imaginary component is ignored.
  459. X4 exp
  460. X?expressions functions exp
  461. X?functions exp
  462. X?exp
  463. X#exp(x) & any & $e^{x}$,  exponential function of $x$ \\
  464. X%exp(x)@any@$e sup x$, exponential function of $x$
  465. X The `exp` function returns the exponential function of its argument
  466. X (`e` raised to the power of its argument).
  467. X4 floor
  468. X?expressions functions floor
  469. X?functions floor
  470. X?floor
  471. X#floor(x) & any & $\lfloor x \rfloor$,  largest integer not greater
  472. X#than $x$ (real part) \\
  473. X%floor(x)@any@$left floor x right floor$, largest integer not greater than $x$ (real part)
  474. X The `floor` function returns the largest integer not greater than its
  475. X argument. For complex numbers, `floor` returns the largest
  476. X integer not greater than the real part of its argument.
  477. X4 gamma
  478. X?expressions functions gamma
  479. X?functions gamma
  480. X?gamma
  481. X#gamma(x) & any & $\mbox{Gamma}(\mbox{real}(x))$,  gamma function of real($x$) \\
  482. X%gamma(x)@any@$GAMMA ( roman real (x))$, gamma function of real ($x$)
  483. X The `gamma` function returns the gamma function of the real part of
  484. X its argument. For integer n, gamma(n+1) = n! .
  485. X If the argument is a complex value, the imaginary component is ignored.
  486. X4 ibeta
  487. X?expressions functions ibeta
  488. X?functions ibeta
  489. X?ibeta
  490. X#ibeta(p,q,x) & any & $\mbox{Ibeta}(\mbox{real}(p,q,x))$,  ibeta function of real($p$,$q$,$x$) \\
  491. X%ibeta(p,q,x)@any@$Ibeta ( roman real (p,q,x))$, ibeta function of real ($p$,$q$,$x$)
  492. X The `ibeta` function returns the incomplete beta function of the real
  493. X parts of its arguments. p, q > 0 and x in [0:1]
  494. X If the arguments are complex, the imaginary components are ignored.
  495. X4 inverf
  496. X?expressions functions inverf
  497. X?functions inverf
  498. X?inverf
  499. X#inverf(x) & any &  inverse error function of real($x$)  \\
  500. X%inverf(x)@any@inverse error function real($x$)
  501. X The `inverf` function returns the inverse error function of the real
  502. X part of its argument.
  503. X4 igamma
  504. X?expressions functions igamma
  505. X?functions igamma
  506. X?igamma
  507. X#igamma(a,x) & any & $\mbox{Igamma}(\mbox{real}(a,x))$,  igamma function of real($a$,$x$) \\
  508. X%igamma(a,x)@any@$Igamma ( roman real (a,x))$, igamma function of real ($a$,$x$)
  509. X The `igamma` function returns the incomplete gamma function of the real
  510. X parts of its arguments. a > 0 and x >= 0
  511. X If the arguments are complex, the imaginary components are ignored.
  512. X4 imag
  513. X?expressions functions imag
  514. X?functions imag
  515. X?imag
  516. X#imag(x) & complex &  imaginary part of $x$ as a real number \\
  517. X%imag(x)@complex@imaginary part of $x$ as a real number
  518. X The `imag` function returns the imaginary part of its argument as a
  519. X real number.
  520. X4 invnorm
  521. X?expressions functions invnorm
  522. X?functions invnorm
  523. X?invnorm
  524. X#invnorm(x) & any &  inverse normal distribution function of real($x$)  \\
  525. X%invnorm(x)@any@inverse normal distribution function real($x$)
  526. X The `invnorm` function returns the inverse normal distribution function
  527. X of the real part of its argument.
  528. X4 int
  529. X?expressions functions int
  530. X?functions int
  531. X?int
  532. X#int(x) & real &  integer part of $x$, truncated toward zero \\
  533. X%int(x)@real@integer part of $x,$ truncated toward zero
  534. X The `int` function returns the integer part of its argument, truncated
  535. X toward zero.
  536. X4 lgamma
  537. X?expressions functions lgamma
  538. X?functions lgamma
  539. X?lgamma
  540. X#lgamma(x) & any & $\mbox{Lgamma}(\mbox{real}(x))$,  lgamma function of real($x$) \\
  541. X%lgamma(x)@any@$Lgamma ( roman real (x))$, lgamma function of real ($x$)
  542. X The `lgamma` function returns the natural logarithm of the gamma
  543. X function of the real part of its argument.
  544. X If the argument is a complex value, the imaginary component is ignored.
  545. X4 log
  546. X?expressions functions log
  547. X?functions log
  548. X?log
  549. X#log(x) & any & $\log_{e} x$,  natural logarithm (base $e$) of $x$ \\
  550. X%log(x)@any@$ln~x$, natural logarithm (base $e$) of $x$
  551. X The `log` function returns the natural logarithm (base `e`) of its
  552. X argument.
  553. X4 log10
  554. X?expressions functions log10
  555. X?functions log10
  556. X?log10
  557. X#log10(x) & any & $\log_{10} x$,  logarithm (base $10$) of $x$ \\
  558. X%log10(x)@any@${log sub 10}~x$, logarithm (base $10$) of $x$
  559. X The `log10` function returns the logarithm (base 10) of its argument.
  560. X4 norm
  561. X?expressions functions norm
  562. X?functions norm
  563. X?norm
  564. X#norm(x) & any & normal distribution (Gaussian) function of real($x$) \\
  565. X%norm(x)@any@$norm(x),$ normal distribution function of real($x$)
  566. X The `norm` function returns the normal distribution function
  567. X (or Gaussian) of the real part of its argument.
  568. X4 rand
  569. X?expressions functions rand
  570. X?functions rand
  571. X?rand
  572. X#rand(x) & any & $\mbox{Rand}(\mbox{real}(x))$,  pseudo random number generator \\
  573. X%rand(x)@any@$rand ( roman real (x))$, pseudo random number generator
  574. X The `rand` function returns a pseudo random number in the interval [0:1]
  575. X using the real part of its argument as a seed. If seed < 0 the sequence
  576. X is (re)initialized.
  577. X If the argument is a complex value, the imaginary component is ignored.
  578. X4 real
  579. X?expressions functions real
  580. X?functions real
  581. X?real
  582. X#real(x) & any &  real part of $x$ \\
  583. X%real(x)@any@real part of $x$
  584. X The `real` function returns the real part of its argument.
  585. X4 sgn
  586. X?expressions functions sgn
  587. X?functions sgn
  588. X?sgn
  589. X#sgn(x) & any & 1 if $x>0$, -1 if $x<0$, 0 if $x=0$. imag($x$) ignored \\
  590. X%sgn(x)@any@1 if $x > 0$, -1 if $x < 0$, 0 if $x = 0$. $roman imag (x)$ ignored
  591. X The `sgn` function returns 1 if its argument is positive, -1 if its
  592. X argument is negative, and 0 if its argument is 0. If the argument
  593. X is a complex value, the imaginary component is ignored.
  594. X4 sin
  595. X?expressions functions sin
  596. X?functions sin
  597. X?sin
  598. X#sin(x) & radians & $\sin x$, sine of $x$ \\
  599. X%sin(x)@radians@$sin~x$, sine of $x$
  600. X The `sin` function returns the sine of its argument. `sin` expects its
  601. X argument to be in radians.
  602. X4 sinh
  603. X?expressions functions sinh
  604. X?functions sinh
  605. X?sinh
  606. X#sinh(x) & radians & $\sinh x$, hyperbolic sine $x$ \\
  607. X%sinh(x)@radians@$sinh~x$, hyperbolic sine $x$
  608. X The `sinh` function returns the hyperbolic sine of its argument. `sinh`
  609. X expects its argument to be in radians.
  610. X4 sqrt
  611. X?expressions functions sqrt
  612. X?functions sqrt
  613. X?sqrt
  614. X#sqrt(x) & any & $\sqrt{x}$,  square root of $x$ \\
  615. X%sqrt(x)@any@$sqrt x $, square root of $x$
  616. X The `sqrt` function returns the square root of its argument.
  617. X4 tan
  618. X?expressions functions tan
  619. X?functions tan
  620. X?tan
  621. X#tan(x) & radians & $\tan x$,  tangent of $x$ \\
  622. X%tan(x)@radians@$tan~x$, tangent of $x$
  623. X The `tan` function returns the tangent of its argument. `tan` expects
  624. X its argument to be in radians.
  625. X4 tanh
  626. X?expressions functions tanh
  627. X?functions tanh
  628. X?tanh
  629. X#tanh(x) & radians & $\tanh x$, hyperbolic tangent of $x$\\
  630. X%tanh(x)@radians@$tanh~x$, hyperbolic tangent of $x$
  631. X The `tanh` function returns the hyperbolic tangent of its argument.
  632. X `tanh` expects its argument to be in radians.
  633. X@end table
  634. X3 operators
  635. X?expressions operators
  636. X?operators
  637. X The operators in GNUPLOT are the same as the corresponding operators
  638. X in the C programming language, except that all operators accept
  639. X integer, real, and complex arguments, unless otherwise noted.
  640. X The ** operator (exponentiation) is supported, as in FORTRAN.
  641. X
  642. X Parentheses may be used to change order of evaluation.
  643. X4 binary
  644. X?expressions operators binary
  645. X?operators binary
  646. X?binary
  647. X The following is a list of all the binary operators and their
  648. X usages:
  649. X
  650. X@start table - first is interactive cleartext form
  651. X  Symbol      Example      Explanation
  652. X   **          a**b          exponentiation
  653. X   *           a*b           multiplication
  654. X   /           a/b           division
  655. X   %           a%b         * modulo
  656. X   +           a+b           addition
  657. X   -           a-b           subtraction
  658. X   ==          a==b          equality
  659. X   !=          a!=b          inequality
  660. X   &           a&b         * bitwise AND
  661. X   ^           a^b         * bitwise exclusive OR
  662. X   |           a|b         * bitwise inclusive OR
  663. X   &&          a&&b        * logical AND
  664. X   ||          a||b        * logical OR
  665. X   ?:          a?b:c       * ternary operation
  666. X#\multicolumn{3}{|c|}{Binary Operators} \\
  667. X#Symbol & Example & Explanation \\ \hline
  668. X#\verb~**~ & \verb~a**b~ & exponentiation\\
  669. X#\verb~*~ & \verb~a*b~ & multiplication\\
  670. X#\verb~/~ & \verb~a/b~ & division\\
  671. X#\verb~%~ & \verb~a%b~ & * modulo\\
  672. X#\verb~+~ & \verb~a+b~ & addition\\
  673. X#\verb~-~ & \verb~a-b~ & subtraction\\
  674. X#\verb~==~ & \verb~a==b~ & equality\\
  675. X#\verb~!=~ & \verb~a!=b~ & inequality\\
  676. X#\verb~&~ & \verb~a&b~ & * bitwise AND\\
  677. X#\verb~^~ & \verb~a^b~ & * bitwise exclusive OR\\
  678. X#\verb~|~ & \verb~a|b~ & * bitwise inclusive OR\\
  679. X#\verb~&&~ & \verb~a&&b~ & * logical AND\\
  680. X#\verb~||~ & \verb~a||b~ & * logical OR\\
  681. X#\verb~?:~ & \verb~a?b:c~ & * ternary operation\\
  682. X%Symbol@Example@Explanation
  683. X%_
  684. X%**@a**b@exponentiation
  685. X%*@a*b@multiplication
  686. X%/@a/b@division
  687. X%%@a%b@* modulo
  688. X%+@a+b@addition
  689. X%-@a-b@subtraction
  690. X%==@a==b@equality
  691. X%!=@a!=b@inequality
  692. X%&@a&b@* bitwise AND
  693. X%^@a^b@* bitwise exclusive OR
  694. X%|@a|b@* bitwise inclusive OR
  695. X%&&@a&&b@* logical AND
  696. X%||@a||b@* logical OR
  697. X%?:@a?b:c@* ternary operation
  698. X
  699. X@end table
  700. X (*) Starred explanations indicate that the operator requires
  701. X integer arguments.
  702. X
  703. X Logical AND (&&) and OR (||) short-circuit the way they do in C.
  704. X That is, the second && operand is not evaluated if the first is
  705. X false; the second || operand is not evaluated if the first is true.
  706. X
  707. X The ternary operator evaluates its first argument (a). If it is
  708. X true (non-zero) the second argument (b) is evaluated and returned,
  709. X otherwise the third argument (c) is evaluated and returned.
  710. X4 unary
  711. X?expressions operators unary
  712. X?operators unary
  713. X?unary
  714. X The following is a list of all the unary operators and their
  715. X usages:
  716. X
  717. X@start table - first is interactive cleartext form
  718. X  Symbol     Example      Explanation
  719. X   -           -a          unary minus
  720. X   ~           ~a        * one's complement
  721. X   !           !a        * logical negation
  722. X   !           a!        * factorial
  723. X#\multicolumn{3}{|c|}{Unary Operators}\\
  724. X#Symbol & Example & Explanation \\ \hline
  725. X#\verb@-@ & \verb@-a@ & unary minus \\
  726. X#\verb@~@ & \verb@~a@ & * one's complement \\
  727. X#\verb@!@ & \verb@!a@ & * logical negation \\
  728. X#\verb@!@ & \verb@a!@ & * factorial \\
  729. X%-@-a@unary minus
  730. X%~@~a@* one's complement
  731. X%!@!a@* logical negation
  732. X%!@a!@* factorial
  733. X
  734. X@end table
  735. X (*) Starred explanations indicate that the operator requires an
  736. X integer argument.
  737. X
  738. X The factorial operator returns a real number to allow a greater range.
  739. X2 help
  740. X?help
  741. X The `help` command displays on-line help. To specify information on a
  742. X particular topic use the syntax:
  743. X
  744. X         help {<topic>}
  745. X
  746. X If <topic> is not specified, a short message is printed about
  747. X GNUPLOT. After help for the requested topic is given, help for a
  748. X subtopic may be requested by typing its name, extending the help
  749. X request. After that subtopic has been printed, the request may be
  750. X extended again, or simply pressing return goes back one level to the
  751. X previous topic. Eventually, the GNUPLOT command line will return.
  752. X2 load
  753. X?load
  754. X The `load` command executes each line of the specified input file as
  755. X if it had been typed in interactively. Files created by the `save`
  756. X command can later be `load`ed. Any text file containing valid
  757. X commands can be created and then executed by the `load` command.
  758. X Files being `load`ed may themselves contain `load` commands. See
  759. X `comment` for information about comments in commands.
  760. X
  761. X The `load` command must be the last command on the line.
  762. X
  763. X Syntax:
  764. X         load "<input-file>"
  765. X
  766. X The name of the input file must be enclosed in quotes.
  767. X
  768. X Examples:
  769. X
  770. X         load 'work.gnu'
  771. X         load "func.dat"
  772. X
  773. X The `load` command is performed implicitly on any file names given as
  774. X arguments to GNUPLOT. These are loaded in the order specified, and
  775. X then GNUPLOT exits.
  776. X2 pause
  777. X?pause
  778. X The `pause` command displays any text associated with the command and
  779. X then waits a specified amount of time or until the carriage return is
  780. X pressed.  `pause` is especially useful in conjunction with `load` files.
  781. X
  782. X Syntax:
  783. X         pause <time> {"<string>"}
  784. X
  785. X <time> may be any integer constant or expression. Choosing -1 will
  786. X wait until a carriage return is hit, zero (0) won't pause at all, and
  787. X a positive integer will wait the specified number of seconds.
  788. X
  789. X Note: Since `pause` is not part of the plot it may interact with
  790. X different device drivers differently (depending upon how text and
  791. X graphics are mixed).
  792. X
  793. X Examples:
  794. X         pause -1    # Wait until a carriage return is hit
  795. X         pause 3     # Wait three seconds
  796. X         pause -1  "Hit return to continue"
  797. X         pause 10  "Isn't this pretty?  It's a cubic-spline."
  798. X
  799. X2 plot
  800. X?plot
  801. X?splot
  802. X `plot` and `splot` are the primary commands of the program. They plot
  803. X functions and data in many, many ways. `plot` is used to plot 2-d
  804. X functions and data, while `splot` plots 3-d surfaces and data.
  805. X
  806. X Syntax:
  807. X
  808. X        plot {ranges} {<function> | {"<datafile>" {using ...}}}
  809. X                     {title} {style} {, <function> {title} {style}...}
  810. X
  811. X        splot {ranges} {<function> | {"<datafile>" {index i} {using ...}}}
  812. X                     {title} {style} {, <function> {title} {style}...}
  813. X
  814. X where either a <function> or the name of a data file enclosed in quotes is
  815. X supplied.  A function is a mathematical expression, or a pair (`plot`) or
  816. X triple (`splot`) of mathematical expressions in the case of parametric
  817. X functions.  User-defined functions and variables may also be defined here.
  818. X
  819. X `plot` and `splot` commands can be as simple as
  820. X
  821. X         plot sin(x)
  822. X
  823. X and
  824. X
  825. X         splot x * y
  826. X
  827. X or as complex as (!)
  828. X
  829. X  plot [t=1:10] [-pi:pi*2] tan(t), "data.1" using 2:3 with lines,
  830. X        t**2 with points
  831. X3 data-file
  832. X?plot data-file
  833. X?plot datafile
  834. X?splot data-file
  835. X?splot datafile
  836. X?data-file
  837. X?datafile
  838. X?data
  839. X Discrete data contained in a file can be displayed by specifying the
  840. X name of the data file (enclosed in quotes) on the `plot` or `splot`
  841. X command line. Data files should contain one data point per line.
  842. X Lines beginning with # (or ! on VMS) will be treated as comments
  843. X and ignored. For `plot`s, each data point represents an (x,y)
  844. X pair. For `splot`s, each point is an (x,y,z) triple. For `plot`s with
  845. X error bars (see `plot errorbars`), each data point is either
  846. X (x,y,ydelta) or (x,y,ylow,yhigh). In all cases, the numbers on each
  847. X line of a data file must be separated by blank space. This blank
  848. X space divides each line into columns.
  849. X
  850. X For `plot`s the x value may be omitted, and for `splot`s the x
  851. X and y values may be omitted. In either case the omitted values are
  852. X assigned the current coordinate number. Coordinate numbers start at 0
  853. X and are incremented for each data point read.
  854. X
  855. X To specify other formats, see `plot datafile using`.
  856. X
  857. X In the `plot` command, blank lines in the data file cause a break in
  858. X the plot. There will be no line drawn between the preceding and
  859. X following points if the plot style is `lines` or `linespoints` (see
  860. X `plot style`). This does not change the plot style, as would plotting
  861. X the data as separate curves.
  862. X
  863. X This example compares the data in the file population.dat to a
  864. X theoretical curve:
  865. X
  866. X         pop(x) = 103*exp((1965-x)/10)
  867. X         plot [1960:1990] 'population.dat', pop(x)
  868. X
  869. X The file population.dat might contain:
  870. X
  871. X         # Gnu population in Antarctica since 1965
  872. X         1965   103
  873. X         1970   55
  874. X         1975   34
  875. X         1980   24
  876. X         1985   10
  877. X
  878. X When a data file is plotted, `samples` and `isosamples` are ignored.
  879. X Curves plotted using the `plot` command are automatically extended to
  880. X hold the entire curve. Similarly grid data plotted using the `splot`
  881. X command is automatically extended, using the assumption that isolines
  882. X are separated by blank lines (a line with only a CR/LF in it).
  883. X
  884. X Implicitly, there are two types of 3-d datafiles. If all the isolines
  885. X are of the same length, the data is assumed to be a grid data, i.e.,
  886. X the data has a grid topology. Cross isolines in the other parametric
  887. X direction (the ith cross isoline passes through the ith point of all the
  888. X provided isolines) will also be drawn for grid data. (Note contouring
  889. X is available for grid data only.) If all the isolines are not of the
  890. X same length, no cross isolines will be drawn and contouring that data
  891. X is impossible.
  892. X
  893. X For splot, data files may contain more than one mesh and by default
  894. X all meshes are plotted. Meshes are separated from each other, in the
  895. X file, by double blank lines. To control and splot a single mesh from
  896. X a multi mesh file, use the index modifier. See `splot index` for more.
  897. X
  898. X For splot if 3-d datafile and using format (see `splot datafile using`)
  899. X specify only z (height field), a non parametric mode must be specified.
  900. X If, on the other hand, x, y, and z are all specified, a parametric
  901. X mode should be selected (see `set parametric`) since data is defining a
  902. X parametric surface.
  903. X
  904. X A simple example of plotting a 3-d data file is
  905. X
  906. X         set parametric
  907. X         splot 'glass.dat'
  908. X
  909. X or
  910. X
  911. X         set noparametric
  912. X         splot 'datafile.dat'
  913. X
  914. X where the file datafile.dat might contain:
  915. X
  916. X         # The valley of the Gnu.
  917. X         10
  918. X         10
  919. X         10
  920. X
  921. X         10
  922. X         5
  923. X         10
  924. X
  925. X         10
  926. X         1
  927. X         10
  928. X
  929. X         10
  930. X         0
  931. X         10
  932. X
  933. X Note datafile.dat defines a 4 by 3 grid ( 4 rows of 3 points each ).
  934. X Rows are separated by blank lines.
  935. X
  936. X On some computer systems with a popen function (UNIX), the datafile
  937. X can be piped through a shell command by starting the file name
  938. X with a '<'.  For example:
  939. X
  940. X         pop(x) = 103*exp(-x/10)
  941. X         plot '< awk "{print $1-1965, $2}" population.dat', pop(x)
  942. X
  943. X would plot the same information as the first population example
  944. X but with years since 1965 as the x axis.  If you want to execute
  945. X this example, you have to delete all comments from the data file
  946. X above or substitute the following command for the first part of the
  947. X command above (the part up to the comma):
  948. X
  949. X         plot '< awk "$0 !~ /^#/ {print $1-1965, $2}" population.dat'
  950. X
  951. X It is also possible to apply a single function to the "y" value only,
  952. X e.g.
  953. X
  954. X         plot 'population.dat' thru p(x)
  955. X
  956. X For more information about 3-d plotting, see `splot`.
  957. X4 using
  958. X?plot data-file using
  959. X?plot datafile using
  960. X?splot data-file using
  961. X?splot datafile using
  962. X?using
  963. X The format of data within a file can be selected with the `using`
  964. X option. An explicit scanf string can be used, or simpler column
  965. X choices can be made.
  966. X
  967. X Syntax:
  968. X
  969. X         plot "datafile" { using { <ycol> |
  970. X                                   <xcol>:<ycol> |
  971. X                                   <xcol>:<ycol>:<ydelta> |
  972. X                                   <xcol>:<ycol>:<ylow>:<yhigh> |
  973. X                                   <xcol>:<ycol>:<ylow>:<yhigh>:<boxwidth> }
  974. X                                 {"<scanf string>"} } ...
  975. X
  976. X and
  977. X
  978. X         splot "datafile" { using { <xcol>:<ycol>:<zcol> | <zcol> }
  979. X                                  {"<scanf string>"} } ...
  980. X
  981. X <xcol>, <ycol>, and <zcol> explicitly select the columns to plot from
  982. X a space or tab separated multicolumn data file. If only <ycol> is
  983. X selected for `plot`, <xcol> defaults to 1. If only <zcol> is selected
  984. X for `splot`, then only that column is read from the file. An <xcol> of
  985. X 0 forces <ycol> to be plotted versus its coordinate number. <xcol>,
  986. X <ycol>, and <zcol> can be entered as constants or expressions.
  987. X
  988. X If errorbars (see also `plot errorbars`) are used for `plot`s,
  989. X ydelta (for example, a +/- error) should be provided as the third
  990. X column, or ylow and yhigh as third and fourth columns.
  991. X
  992. X If boxes or boxerrorbars are used for `plot`s, a fifth column to
  993. X specify the width of the box may be given.  This implies that columns
  994. X three and four must also be provided even if they are not used.
  995. X If you want to plot boxes from a data file with three columns,
  996. X set ylow and yhigh to y using the following command:
  997. X         plot "datafile" using 1:2:2:2:3 with boxes
  998. X
  999. X Scanf strings override any <xcol>:<ycol>(:<zcol>) choices, except for
  1000. X ordering of input, e.g.,
  1001. X         plot "datafile" using 2:1 "%f%*f%f"
  1002. X causes the first column to be y and the third column to be x.
  1003. X
  1004. X If the scanf string is omitted, the default is generated based on the
  1005. X <xcol>:<ycol>(:<zcol>) choices. If the `using` option is omitted, "%f%f"
  1006. X is used for `plot` ("%f%f%f%f" for `errorbars` `plot`s) and "%f%f%f" is
  1007. X used for `splot`.
  1008. X
  1009. X Examples:
  1010. X
  1011. X         plot "MyData" using "%*f%f%*20[^\n]%f" with lines
  1012. X
  1013. X Data are read from the file "MyData" using the format
  1014. X "%*f%f%*20[^\n]%f". The meaning of this format is: "%*f" ignore the
  1015. X first number, "%f" then read in the second and assign to x,
  1016. X "%*20[^\n]" then ignore 20 non-newline characters, "%f" then read in
  1017. X the y value.
  1018. X
  1019. X         n=3;
  1020. X         plot "MyData", "MyData" using n
  1021. X
  1022. X causes GNUPLOT to plot the second and third columns of MyData versus
  1023. X the first column. The command 'n=4; replot' would then plot the second
  1024. X and fourth columns of MyData versus the first column.
  1025. X
  1026. X         splot "glass.dat" using 1
  1027. X
  1028. X causes GNUPLOT to plot the first coordinate of the points of glass.dat
  1029. X as the z coordinate while ignoring the other two coordinates.
  1030. X
  1031. X Note: GNUPLOT first reads a line of the data file into a buffer and
  1032. X then does a
  1033. X         sscanf(input_buffer, scanf_string, &x, &y{, &z});
  1034. X where 'x', 'y', and 'z' are of type 'float'. Any scanf string that
  1035. X specifies two (three for `splot`, three or four for `errorbars`) float
  1036. X numbers may be used.
  1037. X3 errorbars
  1038. X?plot errorbars
  1039. X?errorbars
  1040. X Error bars are supported for 2-d data file plots by reading one or
  1041. X two additional columns specifying ydelta or ylow and yhigh
  1042. X respectively. No support exists for x error bars or any error bars
  1043. X for `splot`s.
  1044. X
  1045. X In the default situation, GNUPLOT expects to see three or four
  1046. X numbers on each line of the data file, either (x, y, ydelta) or
  1047. X (x, y, ylow, yhigh). The x coordinate must be specified. The order
  1048. X of the numbers must be exactly as given above. Data files in this
  1049. X format can easily be plotted with error bars:
  1050. X
  1051. X         plot "data.dat" with errorbars
  1052. X
  1053. X The error bar is a vertical line plotted from (x, ylow) to (x,
  1054. X yhigh). If ydelta is specified instead of ylow and yhigh,
  1055. X ylow=y-ydelta and yhigh=y+ydelta are derived. If there
  1056. X are only two numbers on the line, yhigh and ylow are both set to
  1057. X y. To get lines plotted between the data points, `plot` the
  1058. X data file twice, once with errorbars and once with lines.
  1059. X
  1060. X If y autoscaling is on, the y range will be adjusted to fit the
  1061. X error bars.
  1062. X
  1063. X The `using` option may be used to specify how columns of the data file
  1064. X are to be assigned to x, y, ydelta, ylow, and yhigh. The x column must
  1065. X be provided and both the x and y columns must appear before the
  1066. X errorbar columns. If three column numbers are given, they are x, y,
  1067. X and ydelta. If four columns are given, they are x, y, ylow, and
  1068. X yhigh.
  1069. X
  1070. X Examples:
  1071. X
  1072. X         plot "data.dat" using 1:2:3:4 with errorbars
  1073. X         plot "data.dat" using 3:2:6 with errorbars
  1074. X         plot "data.dat" using 3:4:8:7 with errorbars
  1075. X
  1076. X The first example reads, x, y, ylow, and yhigh, from columns 1, 2, 3,
  1077. X and 4. This is equivalent to the default.  The second example reads x
  1078. X from the third column, y from second and ydelta from the sixth column.
  1079. X The third example reads x from the third column, y from the fourth,
  1080. X ylow from the eighth, and yhigh from seventh columns.
  1081. X
  1082. X See also `plot using` and `plot style`.
  1083. X3 parametric
  1084. X?plot parametric
  1085. X?splot parametric
  1086. X?parametric
  1087. X When in parametric mode (`set parametric`) mathematical expressions must
  1088. X be given in pairs for `plot` and in triplets for `splot`:
  1089. X         plot sin(t),t**2
  1090. X or
  1091. X         splot cos(u)*cos(v),cos(u)*sin(v),sin(u)
  1092. X
  1093. X Data files are plotted as before, except any preceding parametric
  1094. X function must be fully specified before a data file is given as a
  1095. X plot. In other words, the x parametric function (sin(t) above) and
  1096. X the y parametric function (t**2 above) must not be interrupted with
  1097. X any modifiers or data functions; doing so will generate a syntax error
  1098. X stating that the parametric function is not fully specified.
  1099. X
  1100. X Ranges take on a different meaning when in parametric mode. The first
  1101. X range on the `plot` command is the `trange`, the next is the `xrange`,
  1102. X and the last is the `yrange`. For `splot` the order is `urange`,
  1103. X `vrange`, `xrange`, `yrange`, and finally `zrange`. The following
  1104. X `plot` command shows setting the `trange` to [-pi:pi], the `xrange` to
  1105. X [-1.3:1.3] and the `yrange` to [-1:1] for the duration of the plot:
  1106. X         plot [-pi:pi] [-1.3:1.3] [-1:1] sin(t),t**2
  1107. X
  1108. X Other modifiers, such as `with` and `title`, may be specified only
  1109. X after the parametric function has been completed:
  1110. X         plot sin(t),t**2 title 'Parametric example' with linespoints
  1111. X
  1112. X
  1113. X3 ranges
  1114. X?splot ranges
  1115. X?plot ranges
  1116. X?ranges
  1117. X The optional range specifies the region of the plot that will be
  1118. X displayed.
  1119. X
  1120. X Ranges may be provided on the `plot` and `splot` command line and
  1121. X affect only that plot, or in the `set xrange`, `set yrange`, etc.,
  1122. X commands, to change the default ranges for future plots.
  1123. X
  1124. X Syntax:
  1125. X         [{<dummy-var> =} {<xmin> : <xmax>}] { [{<ymin> : <ymax>}] }
  1126. X
  1127. X where <dummy-var> is the independent variable (the defaults are x and
  1128. X y, but this may be changed with `set dummy`) and the min and max
  1129. X terms can be constant expressions.
  1130. X
  1131. X Both the min and max terms are optional. The ':' is also optional
  1132. X if neither a min nor a max term is specified. This allows '[ ]' to
  1133. X be used as a null range specification.
  1134. X
  1135. X Specifying a range in the `plot` command line turns autoscaling for
  1136. X that axis off for that plot. Using one of the `set` range commands
  1137. X turns autoscaling off for that axis for future plots, unless changed
  1138. X later. (See `set autoscale`).
  1139. X
  1140. X Examples:
  1141. X
  1142. X This uses the current ranges:
  1143. X         plot cos(x)
  1144. X
  1145. X This sets the x range only:
  1146. X         plot [-10:30] sin(pi*x)/(pi*x)
  1147. X
  1148. X This is the same, but uses t as the dummy-variable:
  1149. X         plot [t = -10 :30]  sin(pi*t)/(pi*t)
  1150. X
  1151. X This sets both the x and y ranges:
  1152. X         plot [-pi:pi] [-3:3]  tan(x), 1/x
  1153. X
  1154. X This sets only the y range, and turns off autoscaling on both axes:
  1155. X         plot [ ] [-2:sin(5)*-8] sin(x)**besj0(x)
  1156. X
  1157. X This sets xmax and ymin only:
  1158. X         plot [:200] [-pi:]  exp(sin(x))
  1159. X
  1160. X This sets the x, y, and z ranges:
  1161. X         splot [0:3] [1:4] [-1:1] x*y
  1162. X3 index
  1163. X?splot index
  1164. X?index
  1165. X Splotting of multi mesh data files can be controlled via the index modifier.
  1166. X A data file can contain more than one mesh, and in that case all meshes
  1167. X in the file will be splotted by default. Meshes are separated from each
  1168. X other, in the data file, by double blank lines. To splot a single mesh in
  1169. X a multi mesh file use the index modifier which specify which mesh to splot.
  1170. X First mesh is mesh 0.
  1171. X
  1172. X Example:
  1173. X
  1174. X splot "data1" index 2 with points
  1175. X
  1176. X will splot the third mesh in file data1 with points.
  1177. X3 style
  1178. X?plot style
  1179. X?splot style
  1180. X?style
  1181. X?plot with
  1182. X?with
  1183. X Plots may be displayed in one of eight styles: `lines`, `points`,
  1184. X `linespoints`, `impulses`, `dots`, `errorbars`, `steps`, `boxes`, or
  1185. X `boxerrorbars`.  The `lines` style connects adjacent points with lines.
  1186. X The `points` style displays a small symbol at each point.
  1187. X The `linespoints` style does both `lines` and `points`.
  1188. X The `impulses` style displays a vertical line from the x axis
  1189. X (or from the grid base for `splot`) to each point. The `dots` style
  1190. X plots a tiny dot at each point; this is useful for
  1191. X scatter plots with many points.
  1192. X
  1193. X The `errorbars` style is only relevant to 2-d data file plotting. It
  1194. X is treated like `points` for `splot`s and function `plot`s. For data
  1195. X `plot`s, `errorbars` is like `points`, except that a vertical error
  1196. X bar is also drawn: for each point (x,y), a line is drawn from
  1197. X (x,ylow) to (x,yhigh). A tic mark is placed at the ends of the error
  1198. X bar. The ylow and yhigh values are read from the data file's columns,
  1199. X as specified with the `using` option to plot. See `plot errorbars` for
  1200. X more information.
  1201. X
  1202. X The `boxes` style is only relevant to 2-d plotting.  Another style
  1203. X called `boxerrorbars` is also available and is only relevant to 2-d
  1204. X data file plotting.  This style is a combination of the `boxes` and
  1205. X `errorbars` styles.  The `boxes` style draws a box centred about
  1206. X the given x coordinate from the yaxis to the given y coordinate.
  1207. X The width of the box is obtained in one of three ways.  First, if a 
  1208. X data file has a fifth column, this will be used to set the width of 
  1209. X the box. Columns 3 and 4 (for `boxerrorbars`) are necessary but
  1210. X ignored in this instance.  Secondly, if a width has been set using 
  1211. X the `set boxwidth` command, this will be used.  Otherwise the width 
  1212. X of each box will be calculated automatically so that it touches the
  1213. X adjacent boxes.
  1214. X
  1215. X The `steps` style is only relevant to 2-d plotting.  This style
  1216. X connects consecutive points with two line segments: the first
  1217. X from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2).
  1218. X
  1219. X Default styles are chosen with the `set function style` and
  1220. X `set data style` commands.
  1221. X
  1222. X By default, each function and data file will use a different
  1223. X line type and point type, up to the maximum number of available
  1224. X types. All terminal drivers support at least six different point
  1225. X types, and re-use them, in order, if more than six are required.
  1226. X The LaTeX driver supplies an additional six point types (all variants
  1227. X of a circle), and thus will only repeat after twelve curves are
  1228. X plotted with points.
  1229. X
  1230. X If desired, the style and (optionally) the line type and point type
  1231. X used for a curve can be specified.
  1232. X
  1233. X Syntax:
  1234. X
  1235. X         with <style> {<linetype> {<pointtype>}}
  1236. X
  1237. X where <style> is either `lines`, `points`, `linespoints`, `impulses`,
  1238. X `dots`, `steps`, or `errorbars`. The <linetype> and <pointtype> are
  1239. X positive integer constants or expressions and specify the line type
  1240. X and point type to be used for the plot. Line type 1 is the first line
  1241. X type used by default, line type 2 is the second line type used by
  1242. X default, etc.
  1243. X
  1244. X Examples:
  1245. X
  1246. X This plots sin(x) with impulses:
  1247. X         plot sin(x) with impulses
  1248. X
  1249. X This plots x*y with points, x**2 + y**2 default:
  1250. X         splot x*y w points, x**2 + y**2
  1251. X
  1252. X This plots tan(x) with the default function style, "data.1" with lines:
  1253. X         plot [ ] [-2:5] tan(x), "data.1" with l
  1254. X
  1255. X This plots "leastsq.dat" with impulses:
  1256. X         plot 'leastsq.dat' w i
  1257. X
  1258. X This plots the data file 'population' with boxes:
  1259. X         plot "population" with boxes
  1260. X
  1261. X This plots "exper.dat" with errorbars and lines connecting the points:
  1262. X         plot 'exper.dat' w lines, 'exper.dat' w errorbars
  1263. X
  1264. X Here 'exper.dat' should have three or four data columns.
  1265. X
  1266. X This plots x**2 + y**2 and x**2 - y**2 with the same line type:
  1267. X         splot x**2 + y**2 with line 1, x**2 - y**2 with line 1
  1268. X
  1269. X This plots sin(x) and cos(x) with linespoints, using the
  1270. X same line type but different point types:
  1271. X         plot sin(x) with linesp 1 3, cos(x) with linesp 1 4
  1272. X
  1273. X This plots file "data" with points style 3:
  1274. X         plot "data" with points 1 3
  1275. X Note that the line style must be specified when specifying the point
  1276. X style, even when it is irrelevant. Here the line style is 1 and the
  1277. X point style is 3, and the line style is irrelevant.
  1278. X
  1279. X See `set style` to change the default styles.
  1280. X3 title
  1281. X?plot title
  1282. X?splot title
  1283. X A title of each plot appears in the key. By default the title is
  1284. X the function or file name as it appears on the plot command line.
  1285. X The title can be changed by using the `title` option. This option
  1286. X should precede any `with` option.
  1287. X
  1288. X Syntax:
  1289. X         title "<title>"
  1290. X
  1291. X where <title> is the new title of the plot and must be enclosed in
  1292. X quotes. The quotes will not be shown in the key.
  1293. X
  1294. X Examples:
  1295. X
  1296. X This plots y=x with the title 'x':
  1297. X         plot x
  1298. X
  1299. X This plots the "glass.dat" file with the title 'surface of revolution':
  1300. X         splot "glass.dat" title 'surface of revolution'
  1301. X
  1302. X This plots x squared with title "x^2" and "data.1" with title
  1303. X 'measured data':
  1304. X         plot x**2 title "x^2", "data.1" t 'measured data'
  1305. X
  1306. X The title can be omitted from the key with the "notitle" option for
  1307. X plot and splot.  This can be useful when some curves
  1308. X are plotted solely for decoration; for example, if one wanted a
  1309. X circular border for a polar plot, he could say:
  1310. X
  1311. X Example:
  1312. X        set polar
  1313. X        plot my_function(x), 1 notitle
  1314. X
  1315. X This would generate a key entry for "my_function" but not for "1".
  1316. X See the poldat.dem example.
  1317. X
  1318. X
  1319. X2 print
  1320. X?print
  1321. X The `print` command prints the value of <expression> to the screen.
  1322. X
  1323. X Syntax:
  1324. X         print <expression>
  1325. X
  1326. X See `expressions`.
  1327. X2 pwd
  1328. X?pwd
  1329. X The `pwd` command prints the name of the working directory to the screen.
  1330. X
  1331. X Syntax:
  1332. X         pwd
  1333. X2 quit
  1334. X?quit
  1335. X The `exit` and `quit` commands and END-OF-FILE character will exit
  1336. X GNUPLOT. All these commands will clear the output device (as the
  1337. X `clear` command does) before exiting.
  1338. X2 replot
  1339. X?replot
  1340. X The `replot` command without arguments repeats the last `plot` or `splot`
  1341. X command. This can be useful for viewing a plot with different `set`
  1342. X options, or when generating the same plot for several devices.
  1343. X
  1344. X Arguments specified after a `replot` command will be added onto the last
  1345. X `plot` (`splot`) command (with an implied ',' separator) before it is
  1346. X repeated. `replot` accepts the same arguments as the `plot` (`splot`)
  1347. X commands except that ranges cannot be specified.
  1348. X See `command line-editing` for ways to edit the last `plot`
  1349. X (`splot`) command.
  1350. X2 reread
  1351. X?reread
  1352. X The `reread` command causes the current gnuplot command file, as specified
  1353. X by a `load` command or on the command line, to be reset to its starting
  1354. X point before further commands are read from it.  This essentially implements
  1355. X an endless loop of the commands from the beginning of the command file to
  1356. X the `reread` command.  The `reread` command has no effect if input from
  1357. X standard input.
  1358. X2 save
  1359. X?save
  1360. X The `save` command saves user-defined functions, variables, set
  1361. X options or all three plus the last `plot` (`splot`) command to the
  1362. X specified file.
  1363. X
  1364. X Syntax:
  1365. X         save  {<option>} "<filename>"
  1366. X
  1367. X where <option> is `functions`, `variables` or `set`. If no option is
  1368. X used, GNUPLOT saves functions, variables, set options and the last `plot`
  1369. X (`splot`) command.
  1370. X
  1371. X `save`d files are written in text format and may be read by the `load`
  1372. X command.
  1373. X
  1374. X The filename must be enclosed in quotes.
  1375. X
  1376. X Examples:
  1377. X
  1378. X         save "work.gnu"
  1379. X         save functions 'func.dat'
  1380. X         save var 'var.dat'
  1381. X         save set "options.dat"
  1382. X2 set-show
  1383. X?set
  1384. X?show
  1385. X?show all
  1386. X The `set` command sets LOTS of options.
  1387. X
  1388. X The `show` command shows their settings. `show all` shows all the
  1389. X settings.
  1390. X3 angles
  1391. X?set angles
  1392. X?show angles
  1393. X?angles
  1394. X?set angles degrees
  1395. X By default, GNUPLOT assumes the independent variable in polar plots
  1396. X is in units of radians. If `set angles degrees` is specified before
  1397. X `set polar` then the default range is [0:360] and the independent
  1398. X variable has units of degrees. This is particularly useful for
  1399. X plots of data files. The angle setting also hold for the 3-d
  1400. X mapping as set via the `set mapping` command.
  1401. X
  1402. X Syntax:
  1403. X         set angles { degrees | radians }
  1404. X         show angles
  1405. X3 arrow
  1406. X?set arrow
  1407. X?set noarrow
  1408. X?show arrow
  1409. X?arrow
  1410. X?noarrow
  1411. X Arbitrary arrows can be placed on a plot using the `set arrow`
  1412. X command.
  1413. X
  1414. X Syntax:
  1415. X
  1416. X          set arrow {<tag>} {from <sx>,<sy>{,<sz>}}
  1417. X                            {to <ex>,<ey>{,<ez>}} {{no}head}
  1418. X          set noarrow {<tag>}
  1419. X          show arrow
  1420. X
  1421. X
  1422. X Unspecified coordinates default to 0. The x, y, and z values are in
  1423. X the graph's coordinate system. The z coordinate is only used in
  1424. X `splot` commands. <tag> is an integer that identifies the arrow. If no
  1425. X tag is given, the lowest unused tag value is assigned automatically.
  1426. X The tag can be used to delete or change a specific arrow. To change
  1427. X any attribute of an existing arrow, use the `set arrow` command with
  1428. X the appropriate tag, and specify the parts of the arrow to be
  1429. X changed. Specifying nohead requests the arrow be drawn without a head
  1430. X (yielding a line segment). By default, arrows have heads.
  1431. X
  1432. X Arrows outside the plotted boundaries are permitted but may cause
  1433. X device errors.
  1434. X
  1435. X Examples:
  1436. X
  1437. X To set an arrow pointing from the origin to (1,2), use:
  1438. X          set arrow to 1,2
  1439. X To set an arrow from (-10,4,2) to (-5,5,3), and tag the arrow number
  1440. X 3, use:
  1441. X          set arrow 3 from -10,4,2 to -5,5,3
  1442. X To change the preceding arrow begin at 1,1,1, without an arrow head,
  1443. X use:
  1444. X          set arrow 3 from 1,1,1 nohead
  1445. X To delete arrow number 2 use:
  1446. X          set noarrow 2
  1447. X To delete all arrows use:
  1448. X          set noarrow
  1449. X To show all arrows (in tag order) use:
  1450. X          show arrow
  1451. X3 autoscale
  1452. X?set autoscale
  1453. X?set noautoscale
  1454. X?show autoscale
  1455. X?autoscale
  1456. X?noautoscale
  1457. X Auto scaling may be set individually on the x, y or z axis
  1458. X or globally on all axes. The default is to autoscale all axes.
  1459. X
  1460. X When autoscaling, the plot range is automatically computed and the
  1461. X dependent axis (y for a `plot` and z for `splot`) is scaled to
  1462. X include the range of the function or data being plotted.
  1463. X
  1464. X If autoscaling of the dependent axis (y or z) is not set, the
  1465. X current y or z range is used.
  1466. X
  1467. X See `set yrange` or `set zrange`.
  1468. X
  1469. X Autoscaling the independent variables (x for `plot` and x,y for
  1470. X `splot`) is a request to set the domain to match any data file being
  1471. X plotted. If there are no data files then autoscaling an independent
  1472. X variable has no effect. In other words, in the absence of a data
  1473. X file, functions alone do not affect the x range (or the y range if
  1474. X plotting z = f(x,y)).
  1475. X
  1476. X See `set xrange`, or `set yrange`.
  1477. X
  1478. X The behavior of autoscaling remains consistent in parametric mode,
  1479. X however, there are more dependent variables and hence more control
  1480. X over x, y, and z plot scales. In parametric mode, the independent or
  1481. X dummy variable is t for `plot`s and u,v for `splot`s.  Autoscale in
  1482. X parametric mode, then, controls all ranges (t, u, v, x, y, and z) and
  1483. X allows x, y, and z to be fully autoscaled.
  1484. X
  1485. X See `set parametric`.
  1486. X
  1487. X Syntax:
  1488. X         set autoscale <axes>
  1489. X         set noautoscale <axes>
  1490. X         show autoscale
  1491. X
  1492. X where <axes> is either `x`, `y`, `z` or `xy`. If <axes> is not given
  1493. X then all axes are assumed.
  1494. X
  1495. X Examples:
  1496. X
  1497. X This sets autoscaling of the y axis. x axis autoscaling is not
  1498. X affected.
  1499. X         set autoscale y
  1500. X
  1501. X This sets autoscaling of the x and y axes.
  1502. X         set autoscale xy
  1503. X
  1504. X This sets autoscaling of the x, y and z axes.
  1505. X         set autoscale
  1506. X
  1507. X This disables autoscaling of the x, y and z axes.
  1508. X         set noautoscale
  1509. X
  1510. X This disables autoscaling of the z axis only.
  1511. X         set noautoscale z
  1512. X4 parametric mode
  1513. X?autoscale parametric
  1514. X?set autoscale t
  1515. X When in parametric mode (`set parametric`) the xrange is as
  1516. X fully scalable as the yrange. In other words, in parametric
  1517. X mode the x axis can be automatically scaled to fit the range
  1518. X of the parametric function that is being plotted. Of course,
  1519. X the y axis can also be automatically scaled just as in the
  1520. X non-parametric case. If autoscaling on the x axis is not set,
  1521. X the current x range is used.
  1522. X
  1523. X When there is a mix of data files and functions, the xrange of
  1524. X the functions is selected as that of the data files if autoscale
  1525. X is true for x. While this keeps the behavior compatible with
  1526. X non-parametric plotting, it may not be retained in the future.
  1527. X The problem is that, in parametric mode, the x and y ranges are
  1528. X not as distinguishable as in the non-parametric mode and this
  1529. X behavior may not be the most useful.
  1530. X
  1531. X For completeness a last command `set autoscale t` is accepted.
  1532. X However, the effect of this "scaling" is very minor. When
  1533. X GNUPLOT determines that the t range would be empty it makes a
  1534. X small adjustment if autoscaling is true. Otherwise, GNUPLOT
  1535. X gives an error. Such behavior may, in fact, not be very useful
  1536. X and the command `set autoscale t` is certainly questionable.
  1537. X
  1538. X `splot` extends the above idea similarly. If autoscaling is set then
  1539. X x, y, and z ranges are computed and each axis scaled to fit the
  1540. X resulting data.
  1541. X3 border
  1542. X?set border
  1543. X?set noborder
  1544. X?show border
  1545. X?border
  1546. X?noborder
  1547. X The `set border` and `set noborder` commands controls the display of
  1548. X the plot borders for the `plot` and `splot` commands.
  1549. X
  1550. X Syntax:
  1551. X         set border
  1552. X         set noborder
  1553. X         show border
  1554. X3 boxwidth
  1555. X?set boxwidth
  1556. X?show boxwidth
  1557. X?boxwidth
  1558. X The `set boxwidth` command is used to set the default width of
  1559. X boxes in the `boxes` and `boxerrorbars` styles.
  1560. X
  1561. X If a data file is plotted without the width being specified in the
  1562. X fifth column, or a function is plotted, the width of each box is
  1563. X set by the `set boxwidth` command.  If a width is given after the
  1564. X `set boxwidth` command then this is used as the width.  Otherwise
  1565. X the width of each box will be calculated automatically so that
  1566. X it touches the adjacent boxes.
  1567. X
  1568. X Syntax:
  1569. X          set boxwidth {<width>}
  1570. X          show boxwidth
  1571. X
  1572. X To set the box width to automatic use the command
  1573. X          set boxwidth
  1574. X3 clabel
  1575. X?set clabel
  1576. X?set noclabel
  1577. X?show clabel
  1578. X?clabel
  1579. X?noclabel
  1580. X GNUPLOT will vary the linetype used for each contour level
  1581. X when clabel is set. When this option on (the default), a
  1582. X legend labels each linestyle with the z level it represents.
  1583. X
  1584. X Syntax:
  1585. X         set clabel
  1586. X         set noclabel
  1587. X         show clabel
  1588. X3 clip
  1589. X?set clip
  1590. X?set noclip
  1591. X?show clip
  1592. X?clip
  1593. X?noclip
  1594. X GNUPLOT can clip data points and lines that are near the boundaries
  1595. X of a plot.
  1596. X
  1597. X Syntax:
  1598. X         set clip <clip-type>
  1599. X         set noclip <clip-type>
  1600. X         show clip
  1601. X
  1602. X Three clip types are supported by GNUPLOT: `points`, `one`, and `two`.
  1603. X One, two, or all three clip types may be active for a single plot.
  1604. X
  1605. X The `points` clip type forces GNUPLOT to clip (actually, not plot at
  1606. X all) data points that fall within but too close to the boundaries
  1607. X (this is so the large symbols used for points will not extend outside
  1608. X the boundary lines). Without clipping points near the boundaries may
  1609. X look bad; try adjusting the x and y ranges.
  1610. X
  1611. X Setting the `one` clip type causes GNUPLOT to plot the line segments
  1612. X which have only one of the two endpoints within the plotting region.
  1613. X Only the in-range portion of the line is drawn.  The alternative is to
  1614. X not draw any portion of the line segment.
  1615. X
  1616. X Some lines may have both endpoints out of range, but pass through the
  1617. X plotting area. Setting the `two` clip-type allows the visible portion
  1618. X of these lines to be drawn.
  1619. X
  1620. X In no case is a line drawn outside the plotting area.
  1621. X
  1622. X The defaults are `noclip points`, `clip one`, and `noclip two`.
  1623. X
  1624. X To check the state of all forms of clipping, use
  1625. X         show clip
  1626. X
  1627. X For backward compatibility with older versions, the following forms
  1628. X are also permitted.
  1629. X        set clip
  1630. X        set noclip
  1631. X `set clip` is synonymous with `set clip points`. `set noclip` turns
  1632. X off all three types of clipping.
  1633. X3 cntrparam
  1634. X?set cntrparam
  1635. X?show cntrparam
  1636. X?cntrparam
  1637. X Sets the different parameters for the contouring plot (see also `contour`).
  1638. X
  1639. X Syntax:
  1640. X  set cntrparam { { linear | cubicspline | bspline } |
  1641. X     points <n> |
  1642. X     order <n>  |
  1643. X     levels { [ auto ] <n> |
  1644. X     discrete <z1>,<z2>, ... |
  1645. X     incremental {<start>, <incr>{, <end>} } }
  1646. X
  1647. X Examples:
  1648. X     set cntrparam bspline
  1649. X     set cntrparam points 7
  1650. X     set cntrparam order 10
  1651. X     set cntrparam levels auto 5                   # 5 automatic levels
  1652. X     set cntrparam levels discrete .1,1/exp(1),.9  # 3 discrete at .1,.37,.9
  1653. X     set cntrparam levels incremental  0,.1,.4
  1654. X     # 5 incremental levels at 0, .1, .2, .3 and .4
  1655. X     set cntrparam levels 10
  1656. X     # sets n = 10 retaining current setting of auto, discr. and
  1657. X     # increment's start and increment value, while changing end
  1658. X     set cntrparam levels incremental 100,50
  1659. X     # set start = 100 and increment = 50, retaining n levels
  1660. X
  1661. X This command controls the way contours are plotted. <n> should be an
  1662. X integral constant expression and <z1>, <z2> any constant expressions.
  1663. X The parameters are:
  1664. X
  1665. X `linear`, `cubicspline`, `bspline` - Controls type of approximation or
  1666. X interpolation. If `linear`, then the contours are drawn piecewise
  1667. X linear, as extracted from the surface directly. If `cubicspline`, then
  1668. X piecewise linear contours are interpolated to form a somewhat smoother
  1669. X contours, but which may undulate. The third option is the uniform
  1670. X `bspline`, which only approximates the piecewise linear data but is
  1671. X guaranteed to be smoother.
  1672. X
  1673. X `points` - Eventually all drawings are done with piecewise linear
  1674. X strokes.  This number controls the number of points used to
  1675. X approximate a curve.  Relevant for `cubicspline` and `bspline` modes
  1676. X only.
  1677. X
  1678. X `order`  - Order of the bspline approximation to be used. The bigger this
  1679. X order is, the smoother the resulting contour.  (Of course, higher order
  1680. X bspline curves will move further away from the original piecewise linear
  1681. X data.)  This option is relevant for `bspline` mode only. Allowed values are
  1682. X integers in the range from 2 (linear) to 10.
  1683. X
  1684. X `levels` - Number of contour levels, 'n'.  Selection of the levels is
  1685. X controlled by 'auto' (default), 'discrete', and 'incremental'. For 'auto',
  1686. X if the surface is bounded by zmin and zmax then contours will be
  1687. X generated from zmin+dz to zmax-dz in steps of size dz, where
  1688. X dz = (zmax - zmin) / (levels + 1).  For 'discrete', contours will be
  1689. X generated at z = z1, z2 ... as specified.  The number of discrete levels
  1690. X is limited to MAX_DISCRETE_LEVELS, defined in plot.h to be 30.  If
  1691. X 'incremental', contours are generated at <n> values of z beginning at
  1692. X <start> and increasing by <increment>.
  1693. X3 contour
  1694. X?set contour
  1695. X?show contour
  1696. X?contour
  1697. X Enable contour drawing for surfaces. This option is available for `splot`
  1698. X only.
  1699. X
  1700. X Syntax:
  1701. X         set contour { base | surface | both }
  1702. X         set nocontour
  1703. X
  1704. X If no option is provided to `set contour`, the default is `base`.
  1705. X The three options specify where to draw the contours: `base` draws
  1706. X the contours on the grid base where the x/ytics are placed, `surface`
  1707. X draws the contours on the surfaces themselves, and `both` draws the
  1708. X contours on both the base and the surface.
  1709. X
  1710. X See also `set cntrparam` for the parameters that affect the drawing of
  1711. X contours.
  1712. X3 data style
  1713. X?set data style
  1714. X?show data style
  1715. X?data style
  1716. X The `set data style` command changes the default plotting style
  1717. X for data plots.
  1718. X
  1719. X Syntax:
  1720. X         set data style
  1721. X         show data style
  1722. X         set data style <style-choice>
  1723. X
  1724. X In the first case, `set data style` returns the possible style
  1725. X choices:  `lines`, `points`, `linespoints`, `dots`, `steps`,
  1726. X `impulses`, `errorbars`, `boxes` or `boxerrorbars`.  `show data style`
  1727. X shows the current default plotting style for data.  `set data style dots`
  1728. X would actually  change the default plotting style.  See also `plot`.
  1729. X3 dgrid3d
  1730. X?set dgrid3d
  1731. X?show dgrid3d
  1732. X?dgrid3d
  1733. X Enables and sets the different parameters for non grid to grid data mapping.
  1734. X
  1735. X Syntax:
  1736. X         set dgrid3d {,{<row_size>}{,{<col_size>}{,<norm>}}}
  1737. X         set nodgrid3d
  1738. X
  1739. X Examples:
  1740. X        set dgrid3d 10,10,2
  1741. X        set dgrid3d ,,4
  1742. X
  1743. X The first selects a grid of size 10 by 10 to be constructed and the use
  1744. X of L2 norm in the distance computation. The second only modifies the norm
  1745. X to be used to L4.
  1746. X
  1747. X By default this option is disabled. When enabled, 3d data read from a file
  1748. X is always treaded as a scattered data set. A grid with dimensions derived
  1749. X from a bounding box of the scattered data and size as specified by the
  1750. X row/col_size above is created for plotting and contouring. The grid is
  1751. X equally spaced in x and y while the z value is computed as a weighted
  1752. X average of the scattered points distance to the grid points. The closer
  1753. X the scatter points to a grid point are the more effect they have on that
  1754. X grid point. The third, norm, parameter controls the "meaning" of the
  1755. X distance, by specifying the distance norm. This distance computation
  1756. X is optimized for powers of 2 norms, specifically 1, 2, 4, 8, and 16, but
  1757. X any nonnegative integer can be used.
  1758. X
  1759. X This dgrid3d option is a simple low pass filter that converts scattered data
  1760. X to a grid data set. More sophisticated approaches to this problem exists and
  1761. X should be used as a preprocess to and outside gnuplot if this simple solution
  1762. X is found inadequate.
  1763. X
  1764. X3 dummy
  1765. X?set dummy
  1766. X?show dummy
  1767. X?dummy
  1768. X By default, GNUPLOT assumes that the independent variable for the
  1769. X `plot` command is x, and the independent variables for the `splot`
  1770. X command are x and y. They are called the dummy variables because it
  1771. X is just a notation to indicate the independent variables.
  1772. X The `set dummy` command changes these default dummy variable names.
  1773. X For example, it may be more convenient to call the dummy variable t
  1774. X when plotting time functions:
  1775. X
  1776. X         set dummy t
  1777. X         plot sin(t), cos(t)
  1778. X
  1779. X Syntax:
  1780. X         set dummy <dummy-var>{,<dummy-var>}
  1781. X         show dummy
  1782. X
  1783. X Examples:
  1784. X         set dummy u,v
  1785. X         set dummy ,s
  1786. X
  1787. X to set both dummy variables to u and v or set only the second
  1788. X variable to s.
  1789. X
  1790. X The `set parametric` command also changes the dummy variables (to t
  1791. X for `plot` and u,v for `splot`s).
  1792. X
  1793. X3 format
  1794. X?set format
  1795. X?show format
  1796. X?format
  1797. X The format of the tic-mark labels can be set with the `set format`
  1798. X command. The default format for both axes is "%g", but other formats
  1799. X such as "%.2f" or "%3.0fm" are often desirable. Anything accepted by
  1800. X printf when given a double precision number, and then accepted by the
  1801. X terminal, will work. In particular, the formats f, e, and g will work,
  1802. X and the d, o, x, c, s, and u formats will not work.
  1803. X
  1804. X Syntax:
  1805. X         set format {<axes>} {"<format-string>"}
  1806. X         show format
  1807. X
  1808. X where <axes> is either `x`, `y`, `z`, `xy`, or nothing (which is the
  1809. X same as `xy`). The length of the string representing a ticmark (after
  1810. X formatting with printf) is restricted to 100 characters.  If the
  1811. X format string is omitted, the format will be returned to the default
  1812. X "%g". For LaTeX users, the format "$%g$" is often desirable.  If the
  1813. X empty string "" is used, no label will be plotted with each tic,
  1814. X though the tic mark will still be plotted. To eliminate all tic marks,
  1815. X use `set noxtics` or `set noytics`.
  1816. X
  1817. X See also `set xtics` and `set ytics` for more control over tic labels.
  1818. X3 function style
  1819. X?set function style
  1820. X?show function style
  1821. X?function style
  1822. X The `set function style` command changes the default plotting style
  1823. X for functions.
  1824. X
  1825. X Syntax:
  1826. X         set function style
  1827. X         show function style
  1828. X         set function style <style-choice>
  1829. X
  1830. X In the first case, `set function style` returns the possible style
  1831. END_OF_FILE
  1832.   if test 66025 -ne `wc -c <'gnuplot/docs/gnuplot.doc.A'`; then
  1833.     echo shar: \"'gnuplot/docs/gnuplot.doc.A'\" unpacked with wrong size!
  1834.  elif test -f 'gnuplot/docs/gnuplot.doc.B' ; then
  1835.     echo shar: Combining  \"'gnuplot/docs/gnuplot.doc'\" \(129941 characters\)
  1836.     cat 'gnuplot/docs/gnuplot.doc.A' 'gnuplot/docs/gnuplot.doc.B' > 'gnuplot/docs/gnuplot.doc'
  1837.     if test 129941 -ne `wc -c <'gnuplot/docs/gnuplot.doc'`; then
  1838.       echo shar: \"'gnuplot/docs/gnuplot.doc'\" combined with wrong size!
  1839.     else
  1840.       rm gnuplot/docs/gnuplot.doc.A gnuplot/docs/gnuplot.doc.B 
  1841.     fi
  1842.   fi
  1843.   # end of 'gnuplot/docs/gnuplot.doc.A'
  1844. fi
  1845. if test -f 'gnuplot/term/post.trm' -a "${1}" != "-c" ; then 
  1846.   echo shar: Will not clobber existing file \"'gnuplot/term/post.trm'\"
  1847. else
  1848.   echo shar: Extracting \"'gnuplot/term/post.trm'\" \(11386 characters\)
  1849.   sed "s/^X//" >'gnuplot/term/post.trm' <<'END_OF_FILE'
  1850. X/*
  1851. X * $Id: post.trm%v 3.50 1993/07/09 05:35:24 woo Exp $
  1852. X */
  1853. X
  1854. X/* GNUPLOT - post.trm */
  1855. X/*
  1856. X * Copyright (C) 1990 - 1993   
  1857. X *
  1858. X * Permission to use, copy, and distribute this software and its
  1859. X * documentation for any purpose with or without fee is hereby granted, 
  1860. X * provided that the above copyright notice appear in all copies and 
  1861. X * that both that copyright notice and this permission notice appear 
  1862. X * in supporting documentation.
  1863. X *
  1864. X * Permission to modify the software is granted, but not the right to
  1865. X * distribute the modified code.  Modifications are to be distributed 
  1866. X * as patches to released version.
  1867. X *  
  1868. X * This software  is provided "as is" without express or implied warranty.
  1869. X * 
  1870. X * This file is included by ../term.c.
  1871. X *
  1872. X * This terminal driver supports:
  1873. X *     postscript
  1874. X *
  1875. X * AUTHORS
  1876. X *  Russell Lang
  1877. X * 
  1878. X * send your comments or suggestions to (info-gnuplot@dartmouth.edu).
  1879. X *
  1880. X * The 'postscript' driver produces landscape output 10" wide and 7" high.  
  1881. X * To change font to Times-Roman and font size to 20pts use 
  1882. X * 'set term postscript "Times-Roman" 20'.
  1883. X * To get a smaller (5" x 3.5") eps output use 'set term post eps'
  1884. X * and make only one plot per file.  Font size for eps will be half
  1885. X * the specified size.
  1886. X */
  1887. X
  1888. X
  1889. X/* PostScript driver by Russell Lang, rjl@monu1.cc.monash.edu.au */
  1890. X
  1891. Xchar ps_font[MAX_ID_LEN+1] = "Helvetica" ; /* name of font */
  1892. Xint ps_fontsize = 14;                     /* size of font in pts */
  1893. XTBOOLEAN ps_portrait = FALSE;                 /* vertical page */
  1894. XTBOOLEAN ps_color = FALSE;
  1895. XTBOOLEAN ps_solid = FALSE;           /*  use solid lines */
  1896. XTBOOLEAN ps_eps = FALSE;    /* Is this for an eps file? */
  1897. X            /* Added by Robert Davis <davis@ecn.purdue.edu> */
  1898. Xint ps_page=0;            /* page count */
  1899. Xint ps_path_count=0;     /* count of lines in path */
  1900. Xint ps_ang=0;            /* text angle */
  1901. Xenum JUSTIFY ps_justify=LEFT;    /* text is flush left */
  1902. X
  1903. Xchar GPFAR * GPFAR PS_header[] = {
  1904. X"/M {moveto} bind def\n",
  1905. X"/L {lineto} bind def\n",
  1906. X"/R {rmoveto} bind def\n",
  1907. X"/V {rlineto} bind def\n",
  1908. X"/vpt2 vpt 2 mul def\n",
  1909. X"/hpt2 hpt 2 mul def\n",
  1910. X/* flush left show */
  1911. X"/Lshow { currentpoint stroke M\n",
  1912. X"  0 vshift R show } def\n", 
  1913. X/* flush right show */
  1914. X"/Rshow { currentpoint stroke M\n",
  1915. X"  dup stringwidth pop neg vshift R show } def\n", 
  1916. X/* centred show */
  1917. X"/Cshow { currentpoint stroke M\n",
  1918. X"  dup stringwidth pop -2 div vshift R show } def\n", 
  1919. X/* Dash or Color Line */
  1920. X"/DL { Color {setrgbcolor Solid {pop []} if 0 setdash }\n",
  1921. X" {pop pop pop Solid {pop []} if 0 setdash} ifelse } def\n",
  1922. X/* Border Lines */
  1923. X"/BL { stroke gnulinewidth 2 mul setlinewidth } def\n",
  1924. X/* Axes Lines */
  1925. X"/AL { stroke gnulinewidth 2 div setlinewidth } def\n",
  1926. X/* Plot Lines */
  1927. X"/PL { stroke gnulinewidth setlinewidth } def\n",
  1928. X/* Line Types */
  1929. X"/LTb { BL [] 0 0 0 DL } def\n", /* border */
  1930. X"/LTa { AL [1 dl 2 dl] 0 setdash 0 0 0 setrgbcolor } def\n", /* axes */
  1931. X"/LT0 { PL [] 0 1 0 DL } def\n",
  1932. X"/LT1 { PL [4 dl 2 dl] 0 0 1 DL } def\n",
  1933. X"/LT2 { PL [2 dl 3 dl] 1 0 0 DL } def\n",
  1934. X"/LT3 { PL [1 dl 1.5 dl] 1 0 1 DL } def\n",
  1935. X"/LT4 { PL [5 dl 2 dl 1 dl 2 dl] 0 1 1 DL } def\n",
  1936. X"/LT5 { PL [4 dl 3 dl 1 dl 3 dl] 1 1 0 DL } def\n",
  1937. X"/LT6 { PL [2 dl 2 dl 2 dl 4 dl] 0 0 0 DL } def\n",
  1938. X"/LT7 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 1 0.3 0 DL } def\n",
  1939. X"/LT8 { PL [2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 2 dl 4 dl] 0.5 0.5 0.5 DL } def\n",
  1940. X"/P { stroke [] 0 setdash\n", /* Point */
  1941. X"  currentlinewidth 2 div sub M\n",
  1942. X"  0 currentlinewidth V stroke } def\n",
  1943. X"/D { stroke [] 0 setdash 2 copy vpt add M\n", /* Diamond */
  1944. X"  hpt neg vpt neg V hpt vpt neg V\n",
  1945. X"  hpt vpt V hpt neg vpt V closepath stroke\n",
  1946. X"  P } def\n",
  1947. X"/A { stroke [] 0 setdash vpt sub M 0 vpt2 V\n", /* Plus (Add) */
  1948. X"  currentpoint stroke M\n",
  1949. X"  hpt neg vpt neg R hpt2 0 V stroke\n",
  1950. X"  } def\n",
  1951. X"/B { stroke [] 0 setdash 2 copy exch hpt sub exch vpt add M\n", /* Box */
  1952. X"  0 vpt2 neg V hpt2 0 V 0 vpt2 V\n",
  1953. X"  hpt2 neg 0 V closepath stroke\n",
  1954. X"  P } def\n",
  1955. X"/C { stroke [] 0 setdash exch hpt sub exch vpt add M\n", /* Cross */
  1956. X"  hpt2 vpt2 neg V currentpoint stroke M\n",
  1957. X"  hpt2 neg 0 R hpt2 vpt2 V stroke } def\n",
  1958. X"/T { stroke [] 0 setdash 2 copy vpt 1.12 mul add M\n", /* Triangle */
  1959. X"  hpt neg vpt -1.62 mul V\n",
  1960. X"  hpt 2 mul 0 V\n",
  1961. X"  hpt neg vpt 1.62 mul V closepath stroke\n",
  1962. X"  P  } def\n",
  1963. X"/S { 2 copy A C} def\n", /* Star */
  1964. XNULL
  1965. X};
  1966. X
  1967. X#define PS_XOFF    50    /* page offset in pts */
  1968. X#define PS_YOFF    50
  1969. X
  1970. X#define PS_XMAX 7200
  1971. X#define PS_YMAX 5040
  1972. X
  1973. X#define PS_XLAST (PS_XMAX - 1)
  1974. X#define PS_YLAST (PS_YMAX - 1)
  1975. X
  1976. X#define PS_VTIC (PS_YMAX/80)
  1977. X#define PS_HTIC (PS_YMAX/80)
  1978. X
  1979. X#define PS_SC (10)                /* scale is 1pt = 10 units */
  1980. X#define    PS_LW (0.5*PS_SC)        /* linewidth = 0.5 pts */
  1981. X
  1982. X#define PS_VCHAR (14*PS_SC)        /* default is 14 point characters */
  1983. X#define PS_HCHAR (14*PS_SC*6/10)
  1984. X
  1985. Xint PS_pen_x, PS_pen_y;
  1986. Xint PS_taken;
  1987. Xint PS_linetype_last;
  1988. XTBOOLEAN PS_relative_ok;
  1989. X
  1990. XPS_options()
  1991. X{
  1992. X    extern struct value *const_express();
  1993. X    extern double real();
  1994. X
  1995. X    if (!END_OF_COMMAND) {
  1996. X        if (almost_equals(c_token,"p$ortrait")) {
  1997. X            ps_portrait=TRUE;
  1998. X             ps_eps=FALSE;
  1999. X            c_token++;
  2000. X        }
  2001. X        else if (almost_equals(c_token,"l$andscape")) {
  2002. X            ps_portrait=FALSE;
  2003. X             ps_eps=FALSE;
  2004. X            c_token++;
  2005. X        }
  2006. X         else if (almost_equals(c_token,"e$psf")) {
  2007. X             ps_portrait=TRUE;
  2008. X             ps_eps = TRUE;
  2009. X             c_token++;
  2010. X         }
  2011. X        else if (almost_equals(c_token,"d$efault")) {
  2012. X            ps_portrait=FALSE;
  2013. X             ps_eps=FALSE;
  2014. X            ps_color=FALSE;
  2015. X            strcpy(ps_font,"Helvetica");
  2016. X            ps_fontsize = 14;
  2017. X            term_tbl[term].v_char = (unsigned int)(ps_fontsize*PS_SC);
  2018. X            term_tbl[term].h_char = (unsigned int)(ps_fontsize*PS_SC*6/10);
  2019. X            c_token++;
  2020. X        }
  2021. X    }
  2022. X
  2023. X    if (!END_OF_COMMAND) {
  2024. X        if (almost_equals(c_token,"m$onochrome")) {
  2025. X            ps_color=FALSE;
  2026. X            c_token++;
  2027. X        }
  2028. X        else if (almost_equals(c_token,"c$olor")) {
  2029. X            ps_color=TRUE;
  2030. X            c_token++;
  2031. X        }
  2032. X    }
  2033. X
  2034. X    if (!END_OF_COMMAND) {
  2035. X        if (almost_equals(c_token,"s$olid")) {
  2036. X            ps_solid=TRUE;
  2037. X            c_token++;
  2038. X        }
  2039. X        else if (almost_equals(c_token,"d$ashed")) {
  2040. X            ps_solid=FALSE;
  2041. X            c_token++;
  2042. X        }
  2043. X    }
  2044. X
  2045. X    if (!END_OF_COMMAND && isstring(c_token)) {
  2046. X        quote_str(ps_font,c_token);
  2047. X        c_token++;
  2048. X    }
  2049. X
  2050. X    if (!END_OF_COMMAND) {
  2051. X        /* We have font size specified */
  2052. X        struct value a;
  2053. X        ps_fontsize = (int)real(const_express(&a));
  2054. X        term_tbl[term].v_char = (unsigned int)(ps_fontsize*PS_SC);
  2055. X        term_tbl[term].h_char = (unsigned int)(ps_fontsize*PS_SC*6/10);
  2056. X    }
  2057. X
  2058. X    sprintf(term_options,"%s %s %s \"%s\" %d",
  2059. X        ps_eps ? "eps" : (ps_portrait ? "portrait" : "landscape"),
  2060. X        ps_color ? "color" : "monochrome",
  2061. X        ps_solid ? "solid" : "dashed",
  2062. X        ps_font,ps_fontsize);
  2063. X}
  2064. X
  2065. X
  2066. XPS_init()
  2067. X{
  2068. Xstatic char GPFAR psi1[] = "%%%%Creator: gnuplot\n\
  2069. X%%%%DocumentFonts: %s\n\
  2070. X%%%%BoundingBox: %d %d ";
  2071. Xstatic char GPFAR psi2[] = "%%%%EndComments\n\
  2072. X/gnudict 40 dict def\ngnudict begin\n\
  2073. X/Color %s def\n\
  2074. X/Solid %s def\n\
  2075. X/gnulinewidth %.3f def\n\
  2076. X/vshift %d def\n\
  2077. X/dl {%d mul} def\n\
  2078. X/hpt %.1f def\n\
  2079. X/vpt %.1f def\n";
  2080. X
  2081. Xstruct termentry *t = &term_tbl[term];
  2082. Xint i;
  2083. X    ps_page = 0;
  2084. X    if (!ps_eps)
  2085. X        fprintf(outfile,"%%!PS-Adobe-2.0\n");
  2086. X    else
  2087. X        fprintf(outfile,"%%!PS-Adobe-2.0 EPSF-2.0\n");
  2088. X    fprintf(outfile, psi1, ps_font, PS_XOFF, PS_YOFF);
  2089. X    if (ps_portrait)
  2090. X        fprintf(outfile,"%d %d\n", 
  2091. X            (int)(xsize*(ps_eps ? 0.5 : 1.0)*(PS_XMAX)/PS_SC+0.5+PS_XOFF), 
  2092. X            (int)(ysize*(ps_eps ? 0.5 : 1.0)*(PS_YMAX)/PS_SC+0.5+PS_YOFF) );
  2093. X    else 
  2094. X        fprintf(outfile,"%d %d\n", 
  2095. X            (int)(ysize*(ps_eps ? 0.5 : 1.0)*(PS_YMAX)/PS_SC+0.5+PS_XOFF), 
  2096. X            (int)(xsize*(ps_eps ? 0.5 : 1.0)*(PS_XMAX)/PS_SC+0.5+PS_YOFF) );
  2097. X    if (!ps_eps)
  2098. X        fprintf(outfile,"%%%%Pages: (atend)\n");
  2099. X    fprintf(outfile, psi2,
  2100. X        ps_color ? "true" : "false",
  2101. X        ps_solid ? "true" : "false",
  2102. X        PS_LW,            /* line width */
  2103. X         (int)(t->v_char)/(-3),    /* shift for vertical centring */
  2104. X        PS_SC,            /* dash length */
  2105. X        PS_HTIC/2.0,        /* half point width */
  2106. X        PS_VTIC/2.0);        /* half point height */
  2107. X
  2108. X    for ( i=0; PS_header[i] != NULL; i++)
  2109. X        fprintf(outfile,"%s",PS_header[i]);
  2110. X    fprintf(outfile,"end\n%%%%EndProlog\n");
  2111. X}
  2112. X
  2113. X
  2114. XPS_graphics()
  2115. X{
  2116. Xstatic char GPFAR psg1[] = "0 setgray\n/%s findfont %d scalefont setfont\nnewpath\n";
  2117. Xstruct termentry *t = &term_tbl[term];
  2118. X    ps_page++;
  2119. X    if (!ps_eps)
  2120. X        fprintf(outfile,"%%%%Page: %d %d\n",ps_page,ps_page);
  2121. X    fprintf(outfile,"gnudict begin\ngsave\n");
  2122. X    fprintf(outfile,"%d %d translate\n",PS_XOFF,PS_YOFF);
  2123. X    fprintf(outfile,"%.3f %.3f scale\n", (ps_eps ? 0.5 : 1.0)/PS_SC,
  2124. X                                         (ps_eps ? 0.5 : 1.0)/PS_SC);
  2125. X    if (!ps_portrait) {
  2126. X        fprintf(outfile,"90 rotate\n0 %d translate\n", (int)(-PS_YMAX*ysize));
  2127. X    }
  2128. X    fprintf(outfile, psg1, ps_font, (t->v_char) );
  2129. X    ps_path_count = 0;
  2130. X    PS_relative_ok = FALSE;
  2131. X    PS_pen_x = PS_pen_y = -4000;
  2132. X    PS_taken = 0;
  2133. X    PS_linetype_last = -1;
  2134. X}
  2135. X
  2136. X
  2137. XPS_text()
  2138. X{
  2139. X    ps_path_count = 0;
  2140. X    fprintf(outfile,"stroke\ngrestore\nend\nshowpage\n");
  2141. X    /* fprintf(stderr,"taken %d times\n",PS_taken); */
  2142. X    /* informational:  tells how many times it was "cheaper"
  2143. X       to do a relative moveto or lineto rather than an
  2144. X       absolute one */
  2145. X}
  2146. X
  2147. X
  2148. XPS_reset()
  2149. X{
  2150. X    fprintf(outfile,"%%%%Trailer\n");
  2151. X    if (!ps_eps)
  2152. X        fprintf(outfile,"%%%%Pages: %d\n",ps_page);
  2153. X}
  2154. X
  2155. X
  2156. XPS_linetype(linetype)
  2157. Xint linetype;
  2158. X{
  2159. Xchar *line = "ba012345678"; 
  2160. X    linetype = (linetype % 9) + 2;
  2161. X    PS_relative_ok = FALSE;
  2162. X    if (PS_linetype_last == linetype) return(0);
  2163. X    PS_linetype_last = linetype;
  2164. X    fprintf(outfile,"LT%c\n", line[linetype]);
  2165. X    ps_path_count = 0;
  2166. X}
  2167. X
  2168. X
  2169. XPS_move(x,y)
  2170. Xunsigned int x,y;
  2171. X{
  2172. X    int dx, dy;
  2173. X    char abso[20],rel[20];
  2174. X    dx = x - PS_pen_x;
  2175. X    dy = y - PS_pen_y;
  2176. X    /* can't cancel all null moves--need a move after stroke'ing */
  2177. X    if (dx==0 && dy==0 && PS_relative_ok)
  2178. X        return(0);
  2179. X    sprintf(abso, "%d %d M\n", x, y);
  2180. X    sprintf(rel, "%d %d R\n", dx, dy);
  2181. X    if (strlen(rel) < strlen(abso) && PS_relative_ok){
  2182. X        fputs(rel, outfile);
  2183. X        PS_taken++;
  2184. X    }else
  2185. X        fputs(abso, outfile);
  2186. X    PS_relative_ok = TRUE;
  2187. X    ps_path_count += 1;
  2188. X    PS_pen_x = x;
  2189. X    PS_pen_y = y;
  2190. X}
  2191. X
  2192. XPS_vector(x,y)
  2193. Xunsigned int x,y;
  2194. X{
  2195. X    int dx, dy;
  2196. X    char abso[20],rel[20];
  2197. X    dx = x - PS_pen_x;
  2198. X    dy = y - PS_pen_y;
  2199. X    if (dx==0 && dy==0) return(0);
  2200. X    sprintf(abso, "%d %d L\n", x, y);
  2201. X    sprintf(rel, "%d %d V\n", dx, dy);
  2202. X    if (strlen(rel) < strlen(abso) && PS_relative_ok){
  2203. X        fputs(rel, outfile);
  2204. X        PS_taken++;
  2205. X    }else
  2206. X        fputs(abso, outfile);
  2207. X    PS_relative_ok = TRUE;
  2208. X    ps_path_count += 1;
  2209. X    PS_pen_x = x;
  2210. X    PS_pen_y = y;
  2211. X    if (ps_path_count >= 400) {
  2212. X        fprintf(outfile,"currentpoint stroke M\n");
  2213. X        ps_path_count = 0;
  2214. X    }
  2215. X}
  2216. X
  2217. X
  2218. XPS_put_text(x,y,str)
  2219. Xunsigned int x, y;
  2220. Xchar *str;
  2221. X{
  2222. Xchar ch;
  2223. X    if (!strlen(str)) return(0);
  2224. X    PS_move(x,y);
  2225. X    if (ps_ang != 0)
  2226. X        fprintf(outfile,"currentpoint gsave translate %d rotate 0 0 M\n"
  2227. X            ,ps_ang*90);
  2228. X    putc('(',outfile);
  2229. X    ch = *str++;
  2230. X    while(ch!='\0') {
  2231. X        if ( (ch=='(') || (ch==')') || (ch=='\\') )
  2232. X            putc('\\',outfile);
  2233. X        putc(ch,outfile);
  2234. X        ch = *str++;
  2235. X    }
  2236. X    switch(ps_justify) {
  2237. X        case LEFT : fprintf(outfile,") Lshow\n");
  2238. X            break;
  2239. X        case CENTRE : fprintf(outfile,") Cshow\n");
  2240. X            break;
  2241. X        case RIGHT : fprintf(outfile,") Rshow\n");
  2242. X            break;
  2243. X    }
  2244. X    if (ps_ang != 0)
  2245. X        fprintf(outfile,"grestore\n");
  2246. X    ps_path_count = 0;
  2247. X    PS_relative_ok = FALSE;
  2248. X}
  2249. X
  2250. Xint PS_text_angle(ang)
  2251. Xint ang;
  2252. X{
  2253. X    ps_ang=ang;
  2254. X    return TRUE;
  2255. X}
  2256. X
  2257. Xint PS_justify_text(mode)
  2258. Xenum JUSTIFY mode;
  2259. X{
  2260. X    ps_justify=mode;
  2261. X    return TRUE;
  2262. X}
  2263. X
  2264. X/* postscript point routines */
  2265. XPS_point(x,y,number)
  2266. Xint x,y;
  2267. Xint number;
  2268. X{
  2269. Xchar *point = "PDABCTS";
  2270. X    number %= POINT_TYPES;
  2271. X     if (number < -1)
  2272. X        number = -1;        /* negative types are all 'dot' */
  2273. X    fprintf(outfile,"%d %d %c\n", x, y, point[number+1]);
  2274. X    PS_relative_ok = 0;
  2275. X    ps_path_count = 0;
  2276. X    PS_linetype_last = -1; /* force next linetype change */
  2277. X}
  2278. X
  2279. END_OF_FILE
  2280.   if test 11386 -ne `wc -c <'gnuplot/term/post.trm'`; then
  2281.     echo shar: \"'gnuplot/term/post.trm'\" unpacked with wrong size!
  2282.   fi
  2283.   # end of 'gnuplot/term/post.trm'
  2284. fi
  2285. echo shar: End of archive 3 \(of 33\).
  2286. cp /dev/null ark3isdone
  2287. MISSING=""
  2288. for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 ; do
  2289.     if test ! -f ark${I}isdone ; then
  2290.     MISSING="${MISSING} ${I}"
  2291.     fi
  2292. done
  2293. if test "${MISSING}" = "" ; then
  2294.     echo You have unpacked all 33 archives.
  2295.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2296. else
  2297.     echo You still must unpack the following archives:
  2298.     echo "        " ${MISSING}
  2299. fi
  2300. exit 0
  2301. exit 0 # Just in case...
  2302.