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

  1. Newsgroups: comp.sources.misc
  2. From: woo@playfair.stanford.edu ("Alexander Woo")
  3. Subject: v40i016:  gnuplot - interactive function plotting utility, Part04/33
  4. Message-ID: <1993Oct21.144306.1545@sparky.sterling.com>
  5. X-Md4-Signature: da497ef7bb76e44e555708b01088abe5
  6. Sender: kent@sparky.sterling.com (Kent Landfield)
  7. Organization: Sterling Software
  8. Date: Thu, 21 Oct 1993 14:43:06 GMT
  9. Approved: kent@sparky.sterling.com
  10.  
  11. Submitted-by: woo@playfair.stanford.edu ("Alexander Woo")
  12. Posting-number: Volume 40, Issue 16
  13. Archive-name: gnuplot/part04
  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.B gnuplot/os2/print.c
  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 4 (of 33)."'
  26. if test -f 'gnuplot/docs/gnuplot.doc.B' -a "${1}" != "-c" ; then 
  27.   echo shar: Will not clobber existing file \"'gnuplot/docs/gnuplot.doc.B'\"
  28. else
  29.   echo shar: Extracting \"'gnuplot/docs/gnuplot.doc.B'\" \(63916 characters\)
  30.   sed "s/^X//" >'gnuplot/docs/gnuplot.doc.B' <<'END_OF_FILE'
  31. X choices:  `lines`, `points`, `linespoints`, `dots`, `steps`,
  32. X `impulses`, `errorbars`, `boxes`, or `boxerrorbars`.
  33. X `show function style` shows the current default plotting style for
  34. X functions.  `set function style linespoints` would actually change
  35. X the default plotting style.   See also `plot`.
  36. X3 functions
  37. X?show functions
  38. X The `show functions` command lists all user-defined functions and
  39. X their definitions.
  40. X
  41. X Syntax:
  42. X         show functions
  43. X3 grid
  44. X?set grid
  45. X?show grid
  46. X?grid
  47. X The optional `set grid` draws a grid at the tic marks with the axis
  48. X linetype.
  49. X
  50. X Syntax:
  51. X         set grid
  52. X         set nogrid
  53. X         show grid
  54. X3 hidden3d
  55. X?set hidden3d
  56. X?show hidden3d
  57. X The `set hidden3d` command enables hidden line removal for explicit
  58. X surface plotting (see `splot`).
  59. X Hidden line removal may be used for both explicit functions and for
  60. X explicit data.  It now works for parametric surfaces as well.
  61. X
  62. X When this flag is set both the surface hidden portion and possibly
  63. X its hidden contours (see `set contour`) as well as the hidden grid will be
  64. X removed. Labels and arrows are always visible and are unaffected by this
  65. X command.
  66. X
  67. X Each surface has its hidden parts removed with respect to itself and to
  68. X other surfaces, if more than one surface is plotted. This mode is
  69. X meaningful when surfaces are plotted using line style drawing only.
  70. X
  71. X Syntax:
  72. X         set hidden3d
  73. X         set nohidden3d
  74. X         show hidden3d
  75. X3 isosamples
  76. X?set isosamples
  77. X?show isosamples
  78. X?isosamples
  79. X An isoline is a curve parametrized by one of the surface parameters
  80. X while the other surface parameter is fixed. Isolines are a simple
  81. X means to display a surface. By fixing the u parameter of surface
  82. X s(u,v), the iso-u lines of the form c(v) = s(u0,v) are produced, and
  83. X by fixing the v parameter, the iso-v lines of the form c(u) = s(u,v0)
  84. X are produced.
  85. X
  86. X The isoline density of surfaces may be changed by the `set isosamples`
  87. X command. By default, sampling is set to 10 isolines per u or v axis.
  88. X A higher sampling rate will produce more accurate plots, but will take
  89. X longer. This parameter has no effect on data file plotting.
  90. X
  91. X Syntax:
  92. X         set isosamples <iso_1> {,<iso_2>}
  93. X         show isosamples
  94. X
  95. X Each surface plot will have <iso_1> iso-u lines and <iso_2> iso-v lines.
  96. X If you only specify <iso_1>, <iso_2> will be set to the same value as
  97. X <iso_1>.
  98. X
  99. X When a surface plot is being done without the removal of hidden
  100. X lines, `set samples` also has an effect on the number of points being
  101. X evaluated. See `set samples`.
  102. X3 key
  103. X?set key
  104. X?show key
  105. X?key
  106. X The `set key` enables a key describing curves on a plot.  By default
  107. X the key is placed in the upper right corner of the plot.
  108. X
  109. X Syntax:
  110. X         set key
  111. X         set key <x>,<y>{,<z>}
  112. X         set nokey
  113. X         show key
  114. X
  115. X The coordinates <x>, <y> (and <z> for `splot`s) specify the location
  116. X of the key on the plot. The key is drawn as a sequence of lines, with
  117. X one plot described on each line. On the right hand side of each line
  118. X is a representation that attempts to mimic the way the curve is
  119. X plotted.  On the left side of each line is the text description,
  120. X obtained from the `plot` command. See `plot title` to change this
  121. X description. The lines are vertically arranged so an imaginary
  122. X straight line divides the left- and right-hand sides of the key. It is
  123. X the coordinates of this line that are specified with the `set key`
  124. X command. In a `plot`, only the x and y coordinates are used to specify
  125. X the line position.  For a `splot`, x, y and z are all being used as a
  126. X 3-d location mapped using the same mapping as the plot itself to form
  127. X the required 2-d screen position of the imaginary line.
  128. X
  129. X Some or all of the key may be outside of the plot boundary, although
  130. X this may interfere with other labels and may cause an error on some
  131. X devices.
  132. X
  133. X Examples:
  134. X
  135. X This places the key at the default location:
  136. X         set key
  137. X This disables the key:
  138. X         set nokey
  139. X This places a key at coordinates 2,3.5,2
  140. X         set key 2,3.5,2
  141. X3 label
  142. X?set label
  143. X?set nolabel
  144. X?show label
  145. X?label
  146. X?nolabel
  147. X Arbitrary labels can be placed on the plot using the `set label`
  148. X command.  If the z coordinate is given on a `plot` it is ignored; if
  149. X it is missing on a `splot` it is assumed to be 0.
  150. X
  151. X Syntax:
  152. X
  153. X          set label {<tag>} {"<label_text>"} {at <x>,<y>{,<z>}}
  154. X                            {<justification>}
  155. X          set nolabel {<tag>}
  156. X          show label
  157. X
  158. X
  159. X The text defaults to "", and the position to 0,0,0.  The <x>, <y>, and
  160. X <z> values are in the graph's coordinate system.  The tag is an
  161. X integer that is used to identify the label. If no <tag> is given, the
  162. X lowest unused tag value is assigned automatically. The tag can be used
  163. X to delete or change a specific label. To change any attribute of an
  164. X existing label, use the `set label` command with the appropriate tag,
  165. X and specify the parts of the label to be changed.
  166. X
  167. X By default, the text is placed flush left against the point x,y,z.
  168. X To adjust the way the label is positioned with respect to the point
  169. X x,y,z, add the parameter <justification>, which may be `left`, `right`
  170. X or `center`, indicating that the point is to be at the left, right or
  171. X center of the text. Labels outside the plotted boundaries are
  172. X permitted but may interfere with axes labels or other text.
  173. X
  174. X Examples:
  175. X
  176. X To set a label at (1,2) to "y=x" use:
  177. X          set label "y=x" at 1,2
  178. X To set a label "y=x^2" with the right of the text at (2,3,4), and tag
  179. X the label number 3, use:
  180. X          set label 3 "y=x^2" at 2,3,4 right
  181. X To change the preceding label to center justification, use:
  182. X          set label 3 center
  183. X To delete label number 2 use:
  184. X          set nolabel 2
  185. X To delete all labels use:
  186. X          set nolabel
  187. X To show all labels (in tag order) use:
  188. X          show label
  189. X
  190. X (The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  191. X a newline.)
  192. X3 logscale
  193. X?set logscale
  194. X?set nologscale
  195. X?show logscale
  196. X?logscale
  197. X?nologscale
  198. X Log scaling may be set on the x, y, and z axes.
  199. X
  200. X Syntax:
  201. X         set logscale <axes> <base>
  202. X         set nologscale <axes>
  203. X         show logscale
  204. X
  205. X where <axes> may be any combinations of `x`, `y`, and `z`, in any
  206. X order, and where <base> is the base of the log scaling.  If <base>
  207. X is not given, then 10 is assumed.  If <axes> is not given then all
  208. X three axes are assumed.  The command `set logscale` turns on log
  209. X scaling on the specified axes, while `set nologscale` turns off
  210. X log scaling.
  211. X
  212. X Examples:
  213. X
  214. X To enable log scaling in both x and z axes:
  215. X        set logscale xz
  216. X To enable scaling log base 2 of the y axis:
  217. X        set logscale y 2
  218. X To disable z axis log scaling:
  219. X        set nologscale z
  220. X3 mapping
  221. X?set mapping
  222. X?show mapping
  223. X?mapping
  224. X
  225. X Syntax:
  226. X         set mapping { cartesian | spherical | cylindrical }
  227. X
  228. X Data for `splot`s are usually in regular Euclidean space and are
  229. X provided in Cartesian coordinates. Such 3-d data require three
  230. X coordinates (x, y and z) or one coordinate (only z) in each line in
  231. X the data file.  In order to be able to use spherical or cylindrical
  232. X coordinate systems, use the `set mapping` command. In both cases two
  233. X coordinates are expected in each line of the data. For a spherical
  234. X coordinate system, these are theta and phi (in units as specified by
  235. X `set angles`) and the mapping is:
  236. X
  237. X         x = cos( theta ) * cos( phi )
  238. X         y = sin( theta ) * cos( phi )
  239. X         z = sin( phi )
  240. X
  241. X For a cylindrical coordinate system, the mapping uses two variables,
  242. X theta (in units as specified by `set angles`) and z:
  243. X
  244. X         x = cos( theta )
  245. X         y = sin( theta )
  246. X         z = z
  247. X
  248. X Again, note that mapping will affect data file `splot`s only.
  249. X3 offsets
  250. X?set offsets
  251. X?show offsets
  252. X?offsets
  253. X The amount of the graph that the plot takes up may be controlled to
  254. X some extent with the `set offsets` command. This command takes four
  255. X offset arguments: <left>, <right>, <top> and <bottom>. By default,
  256. X each offset is 0. Each offset may be a constant or an expression. Left
  257. X and right offsets are given in units of the x axis, while top and
  258. X bottom offsets are given in units of the y axis. The plot of sin(x),
  259. X displayed with offsets of 0, 0, 2, 2 will take up 1/3 of the
  260. X displayed y axis. Offsets are particularly useful with polar
  261. X coordinates as a means of compensating for aspect ratio distortion.
  262. X Offsets are ignored in `splot`s.
  263. X
  264. X Syntax:
  265. X         set offsets <left>, <right>, <top>, <bottom>
  266. X         show offsets
  267. X3 output
  268. X?set output
  269. X?show output
  270. X?output
  271. X By default, plots are displayed to the standard output. The
  272. X `set output` command redirects the display to the specified file
  273. X or device.
  274. X
  275. X Syntax:
  276. X         set output {"<filename>"}
  277. X         show output
  278. X
  279. X The filename must be enclosed in quotes. If the filename is
  280. X omitted, output will be sent to the standard output.
  281. X
  282. X On machines with popen functions (UNIX), output can be piped
  283. X through a shell command if the first letter of the filename
  284. X is '|'.  For instance,
  285. X
  286. X Syntax:
  287. X         set output "|lpr -Plaser filename"
  288. X         set output "|lp -dlaser filename"
  289. X
  290. X (On MSDOS machines, set output "prn" will direct the output
  291. X to the default printer.)
  292. X
  293. X3 parametric
  294. X?set parametric
  295. X?set noparametric
  296. X?show parametric
  297. X?parametric
  298. X?noparametric
  299. X The `set parametric` command changes the meaning of `plot` (`splot`)
  300. X from normal functions to parametric functions. The command
  301. X `set noparametric` changes the plotting style back to normal,
  302. X single-valued expression plotting.
  303. X
  304. X In 2-d plotting, a parametric function is determined by a pair
  305. X of parametric functions operating on a parameter. An example
  306. X of a 2-d parametric function would be plot sin(t),cos(t) (which
  307. X defines a circle).
  308. X
  309. X For 3-d plotting, the surface is described as x=f(u,v), y=g(u,v),
  310. X z=h(u,v). Therefore a triplet of functions are required. An example of
  311. X 3-d parametric function would be cos(u)*cos(v),cos(u)*sin(v),sin(u)
  312. X (which defines a sphere). It takes three parametric function
  313. X specifications in terms of the parametric dummy arguments to describe
  314. X a single graph.
  315. X
  316. X The total set of possible plots is a superset of the simple f(x)
  317. X style plots, since the two (three) functions can describe the
  318. X x and y (and z) values to be computed separately. In fact,
  319. X plots of the type t,f(t) (u,v,f(u,v)) are equivalent to those
  320. X produced with f(x) when the x values are computed using the
  321. X identity function as the first function.
  322. X
  323. X Note that the order the parametric functions are specified is
  324. X xfunction, yfunction (and zfunction) and that each operates over the
  325. X common parametric domain.
  326. X
  327. X Also, the `set parametric` function implies a new range of values.
  328. X Whereas the normal f(x) and f(x,y) style plotting assume an xrange
  329. X and yrange (and zrange), the parametric mode additionally specifies a
  330. X trange, urange, and vrange. These ranges may be set
  331. X directly with `set trange`, `set urange` and `set vrange`, or by
  332. X specifying the range on the `plot` or `splot` commands. Currently
  333. X the default range for these parametric variables is [-5:5].
  334. X Setting the ranges to something more meaningful is expected.
  335. X3 polar
  336. X?set polar
  337. X?set nopolar
  338. X?show polar
  339. X?polar
  340. X?nopolar
  341. X The `set polar` command changes the meaning of the plot from
  342. X rectangular coordinates to polar coordinates. In polar coordinates,
  343. X the dummy variable (x) is an angle. The range of this angle is changed
  344. X from whatever it was to [0:2*pi], or, if degree unit has been selected,
  345. X to [0:360] (see `set angles`).
  346. X
  347. X The command `set nopolar` changes the meaning of the plot back to the
  348. X default rectangular coordinate system. The range of x is changed from
  349. X whatever it was to [-10:10].
  350. X
  351. X The `set polar` command is not supported for `splot`s.  See the
  352. X `set mapping` command for similar functionality for `splot`s.
  353. X
  354. X While in polar coordinates the meaning of an expression in x is really
  355. X r = f(x), where x is an angle of rotation. The xrange controls the
  356. X domain (the angle) of the function, and the yrange controls the range
  357. X (the radius). The plot is plotted in a rectangular box, and the x and
  358. X y axes are both in units of the radius. Thus, the yrange controls both
  359. X dimensions of the plot output. The tics and units are written along
  360. X the axes rather than at the left and bottom. These unit are offset by
  361. X <rmin> specified by the `rrange` (See `set rrange`). It is not
  362. X possible to specify different output dimensions in the x or y
  363. X directions. The yrange can be used to shift the plot diagonally to
  364. X display only the first or third quadrants.
  365. X
  366. X Syntax:
  367. X         set polar
  368. X         set nopolar
  369. X         show polar
  370. X Example:
  371. X         set polar
  372. X         plot x*sin(x)
  373. X         plot [-2*pi:2*pi] [-3:3] x*sin(x)
  374. X The first plot uses the default polar angular domain of 0 to 2*pi.
  375. X The radius (and the size of the plot) is scaled automatically. The
  376. X second plot expands the domain, and restricts the range of the radius
  377. X (and the size of the plot) to [-3:3].
  378. X3 rrange
  379. X?set rrange
  380. X?show rrange
  381. X?rrange
  382. X The `set rrange` command sets the radial range used to compute x and y
  383. X values when in polar mode. If not in polar mode (see `set polar`) then
  384. X this range is not used. Use of this command offsets the polar
  385. X singularity to the <rmin> value and shifts the units on the axes tic
  386. X marks. For instance, `set rrange [-40:40]` would set the origin to -40
  387. X and would plot values of radial values between -40 to 40. Thus, if
  388. X 360 degrees of data were plotted, then the plot would extend 80 units
  389. X in radially from the origin.  To view the entire plot,  a
  390. X `set yrange [-80:80]` command would create a square viewport with
  391. X a circular plot tangent at the axes.  Because `xrange` is used
  392. X specify the angular extent, only a square viewport can be specified
  393. X by `yrange`.  For instance, `set yrange [0:80]` would display the
  394. X first quadrant and `set yrange [-80:0]` would display the third
  395. X quadrant.  Any square viewport of any size can be specified but it
  396. X is constrained to be centered on a 45 degree line.
  397. X
  398. X This range may also be specified on the `plot` command line when in
  399. X polar mode.
  400. X
  401. X Syntax:
  402. X         set rrange [{<rmin> : <rmax>}]
  403. X
  404. X where <rmin> and <rmax> terms are constants or expressions.
  405. X
  406. X Both the <rmin> and <rmax> terms are optional. Anything omitted will
  407. X not be changed, so
  408. X         set rrange [:10]
  409. X changes rmax to 10 without affecting rmin.
  410. X3 samples
  411. X?set samples
  412. X?show samples
  413. X?samples
  414. X The sampling rate of functions may be changed by the `set samples`
  415. X command. By default, sampling is set to 100 points. A higher sampling
  416. X rate will produce more accurate plots, but will take longer. This
  417. X parameter no longer has any effect on data-file plotting.
  418. X
  419. X Syntax:
  420. X         set samples <samples_1> {,<samples_2>}
  421. X         show samples
  422. X
  423. X When a 2-d plot is being done, only the value of <samples_1> is
  424. X relevant.
  425. X
  426. X When a surface plot is being done without the removal of hidden
  427. X lines, the value of samples specifies the number of samples that are
  428. X evaluated per iso line. Each iso-v line will have <sample_1> samples
  429. X and each iso-u line will have <sample_2> samples. If you only specify
  430. X <samples_1>, <samples_2> will be set to the same value as <samples_1>.
  431. X See also `set isosamples`.
  432. X3 size
  433. X?set size
  434. X?show size
  435. X?size
  436. X The `set size` command scales the displayed size of the plot.  On some
  437. X terminals, changing the size of the plot will result in text being
  438. X misplaced. Increasing the size of the plot may produce strange
  439. X results. Decreasing is safer.
  440. X
  441. X Syntax:
  442. X
  443. X         set size {<xscale>,<yscale>}
  444. X         show size
  445. X
  446. X The <xscale> and <yscale> values are the scaling factors for the size.
  447. X The defaults (1,1) are selected if the scaling factors are omitted.
  448. X
  449. X Examples:
  450. X
  451. X To set the size to normal size use:
  452. X         set size
  453. X To make the plot half size use:
  454. X         set size 0.5,0.5
  455. X To make a landscape plot have a 1:1 aspect ratio in polar mode use:
  456. X         set size 0.721,1.0
  457. X To show the size use:
  458. X         show size
  459. X
  460. X For the LaTeX and Fig terminals the default size (scale factor 1,1)
  461. X is 5 inches wide by 3 inches high. The big Fig terminal (`bfig`) is 7
  462. X inches wide by 5 inches high. The postscript default is landscape mode
  463. X 10 inches wide and 7 inches high.
  464. X Note that the size of the plot includes the space used by the labels;
  465. X the plotting area itself is smaller.
  466. X3 style
  467. X?set style
  468. X?show style
  469. X?style
  470. X?lines
  471. X?points
  472. X?linespoints
  473. X?impulses
  474. X?dots
  475. X?steps
  476. X?errorbars
  477. X?boxes
  478. X?boxerrorbars
  479. X?bargraph
  480. X Plots may be displayed in one of eight styles: `lines`, `points`,
  481. X `linespoints`, `impulses`, `dots`, `steps`, `errorbars`, `boxes`, or
  482. X `boxerrorbars`.  The `lines` style connects adjacent points with lines.
  483. X The `points` style displays a small symbol at each point.
  484. X The `linespoints` style does both `lines` and `points`.
  485. X The `impulses` style displays a vertical line from the x axis
  486. X (or from the grid base for `splot`) to each point. The `dots` style
  487. X plots a tiny dot at each point; this is useful for
  488. X scatter plots with many points.
  489. X
  490. X The `errorbars` style is only relevant to 2-d data file plotting. It
  491. X is treated like `points` for `splot`s and function `plot`s. For data
  492. X `plot`s, `errorbars` is like `points`, except that a vertical error
  493. X bar is also drawn: for each point (x,y), a line is drawn from
  494. X (x,ylow) to (x,yhigh). A tic mark is placed at the ends of the error
  495. X bar. The ylow and yhigh values are read from the data file's columns,
  496. X as specified with the `using` option to plot. See `plot errorbars` for
  497. X more information.
  498. X
  499. X The `boxes` style is only relevant to 2-d plotting.  It draws
  500. X a box centred about the given x coordinate from the yaxis to the given
  501. X y coordinate.   The width of the box is obtained in one of three
  502. X ways.  If a data file has a fifth column, this will be used to set
  503. X the width of the box.  Otherwise, if a width has been set using the
  504. X `set boxwidth` command, this will be used.  Otherwise the width of each
  505. X box will be calculated automatically so that it touches the adjacent
  506. X boxes.  Another style called `boxerrorbars` is also available and is
  507. X only  relevant to 2-d data file plotting.  This style is a combination
  508. X of the `boxes` and `errorbars` styles.
  509. X
  510. X The `steps` style is only relevant to 2-d plotting.  This style
  511. X connects consecutive points with two line segments: the first
  512. X from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2).
  513. X
  514. X Default styles are chosen with the `set function style` and
  515. X `set data style` commands. See `plot style` for information about
  516. X how to override the default plotting style for individual functions.
  517. X
  518. X Syntax:
  519. X         set function style <style>
  520. X         set data style <style>
  521. X         show function style
  522. X         show data style
  523. X
  524. X where <style> is `lines`, `points`, `linespoints`, `impulses`,
  525. X `dots`, `steps`, `errorbars`, `boxes`, or `boxerrorbars`.
  526. X3 surface
  527. X?set surface
  528. X?set nosurface
  529. X?show surface
  530. X?surface
  531. X `set surface` controls the display of surfaces. It is useful if
  532. X contours are to be displayed by themselves. Whenever `set nosurface`
  533. X is issued, no surface isolines/mesh will be drawn. See also
  534. X `set contour`.
  535. X
  536. X Syntax:
  537. X         set surface
  538. X         set nosurface
  539. X         show surface
  540. X3 terminal
  541. X?set terminal
  542. X?show terminal
  543. X?terminal
  544. X GNUPLOT supports many different graphics devices. Use the
  545. X `set terminal` command to select the type of device for which
  546. X GNUPLOT will produce output.
  547. X
  548. X Syntax:
  549. X         set terminal {<terminal-type>}
  550. X         show terminal
  551. X
  552. X If <terminal-type> is omitted, GNUPLOT will list the available
  553. X terminal types. <terminal-type> may be abbreviated.
  554. X
  555. X Use `set output` to redirect this output to a file or device.
  556. X
  557. X Several terminals have additional options. For example, see `dumb`,
  558. X `iris4d`, `hpljii` or `postscript`.
  559. X4 aifm
  560. X?set terminal aifm
  561. X?aifm
  562. X Several options may be set in the Adobe Illustrator 3.0 driver.
  563. X
  564. X Syntax:
  565. X         set terminal aifm {<color>}
  566. X                                 {"<fontname>"} {<fontsize>}
  567. X
  568. X Selecting default sets all options to their default values.
  569. X <color> is either `color` or `monochrome`.
  570. X "<fontname>" is the name of a valid PostScript font.
  571. X <fontsize> is the size of the font in PostScript points, before
  572. X scaling by the `set size` command.
  573. X Defaults are `monochrome`, "Helvetica", and 14pt.
  574. X
  575. X Also, since AI does not really support multiple pages, multiple
  576. X graphs will be output directly on one another.  However, each graph
  577. X will be grouped individually, making it easy to separate them inside
  578. X AI (just pick them up and move them).
  579. X
  580. X Examples:
  581. X
  582. X         set term aifm
  583. X         set term aifm 22
  584. X         set size 0.7,1.4
  585. X         set term aifm color "Times-Roman" 14
  586. X
  587. X4 atari ST
  588. X?set terminal atari
  589. X?atari
  590. X The `atari` terminal has an option to set the character size and the
  591. X screen colors.  The driver expects a space separated list the char size
  592. X and maximal 16 3 digit hex numbers where each digit represents RED, GREEN
  593. X and BLUE (in that order).  The range of 0-15 is scaled to whatever color
  594. X range the screen actually has.  On a normal ST screen, odd and even
  595. X intensities are the same.
  596. X
  597. X Examples:
  598. X
  599. X        set terminal atari 4 # (use small (6x6) font)
  600. X        set terminal atari 6 0 # (set monochrome screen to white on black)
  601. X        set terminal atari 13 0 fff f00 f0 f ff f0f ff0
  602. X        # (set first eight colors to black, white, green, blue, cyan, \
  603. X          purple, and yellow and use large font (8x16).)
  604. X
  605. X Additionally, if an environment variable GNUCOLORS exists, its
  606. X contents are interpreted as an options string, but an explicit terminal
  607. X option takes precedence.
  608. X
  609. X4 dumb
  610. X?set terminal dumb
  611. X?dumb
  612. X The dumb terminal driver has an optional size specification.
  613. X
  614. X Syntax:
  615. X         set terminal dumb {<xsize> <ysize>}
  616. X
  617. X where <xsize> and <ysize> set the size of the dumb terminals. Default
  618. X is 79 by 24.
  619. X
  620. X Examples:
  621. X         set term dumb
  622. X         set term dumb 79 49 # VGA screen--why would anyone want to do that?
  623. X4 epson
  624. X?set terminal epson
  625. X?set terminal epson180
  626. X?set terminal epson60
  627. X?set terminal starc
  628. X?set terminal tandy60
  629. X?epson
  630. X
  631. X This set of drivers support Epson printers and derivatives.   See also
  632. X the NEC driver.  `epson` is a generic 9 wire printer with a resolution
  633. X of 512x384. `starc` is a Star Color printer with the same resolution.
  634. X `epson180` and `epson60` are 180 dpi and 60 dpi drivers for newer
  635. X 24 wire printers.  This also includes bubble jet printers.  Their
  636. X resolutions are 1260x1080 and 480x360, respectively.  The `tandy60`
  637. X is identical to the `epson60` driver with one additional escape
  638. X sequence to start IBM mode.  With all of these drivers, a binary
  639. X copy is required on a PC to print.  Do not use `print`.
  640. X
  641. X        copy file /b lpt1:
  642. X
  643. X
  644. X4 gpic
  645. X?set terminal gpic
  646. X?gpic
  647. X
  648. X This driver is only known to work the Free Software Foundation
  649. X gpic/groff package.  Modification for the Document Workbench
  650. X pic/troff package would be appreciated.  FSF gpic can also
  651. X produce TeX output.
  652. X
  653. X A simple graph can be formatted using
  654. X
  655. X      groff -p -mpic -Tps file.pic > file.ps.
  656. X
  657. X The output from pic can be pipe-lined into eqn, so it is possible to put
  658. X complex functions in a graph with the set label and set {x/y}label commands.
  659. X For instance,
  660. X
  661. X    set ylab '@space 0 int from 0 to x alpha ( t ) roman d t@'
  662. X
  663. X Will label the y-axis with a nice integral if formatted with the
  664. X command:
  665. X
  666. X    gpic filename.pic | geqn -d@@ -Tps | groff -m[macro-package] -Tps
  667. X         > filename.ps
  668. X
  669. X Figures made this way can be scaled to fit into a document. The pic
  670. X language is easy to understand, so the graphs can be edited by hand if
  671. X need be. All coordinates in the pic-file produced by gnuplot are given
  672. X as x+gnuplotx and y+gnuploty. By default x and y are given the value 0
  673. X If this line is removed with an editor in a number of files one can
  674. X put several graphs i one figure like this (default size is 5.0x3.0 inches)
  675. X
  676. X    .PS 8.0
  677. X    x=0;y=3
  678. X    copy "figa.pic"
  679. X    x=5;y=3
  680. X    copy "figb.pic"
  681. X    x=0;y=0
  682. X    copy "figc.pic"
  683. X    x=5;y=0
  684. X    copy "figd.pic"
  685. X    .PE
  686. X
  687. X This will produce an 8 inches wide figure with four graphs in two rows
  688. X on top of each other
  689. X
  690. X One can also achieve the same thing by the command
  691. X
  692. X   set term pic x y
  693. X
  694. X For example, using
  695. X
  696. X   .PS 6.0
  697. X   copy "trig.pic"
  698. X   .PE
  699. X
  700. X4 hpljii
  701. X?set terminal hpljii
  702. X?hpljii
  703. X The HP LaserJet II and HP DeskJet drivers have a single option.
  704. X
  705. X Syntax:
  706. X         set terminal hpljii {<resolution>}
  707. X         set terminal hpdj   {<resolution>}
  708. X
  709. X where <resolution> is the resolution of the output in dots per inch.
  710. X It must be `75`, `100`, `150` or `300`.  Note: there must be
  711. X enough memory available to rasterize at the higher resolutions.
  712. X
  713. X Example:
  714. X         set terminal hpljii 150
  715. X
  716. X4 latex
  717. X?set terminal latex
  718. X?latex
  719. X The LaTeX and EMTeX driver allows one to specify a font type and a font
  720. X size for the labels around a gnuplot graph.
  721. X
  722. X Options are:
  723. X Fonts:
  724. X       default          (Roman 10 point)
  725. X       courier
  726. X       roman
  727. X
  728. X at any size you specify. (BEWARE METAFONT will not like odd sizes.)
  729. X eg.
  730. X       gnuplot> set term latex courier 5
  731. X
  732. X Unless your driver is capable of building fonts at any size (e.g. dvips),
  733. X stick to the standard 10, 11 and 12 point size.
  734. X
  735. X4 iris4d
  736. X?set terminal iris4d
  737. X?iris4d
  738. X The iris4d driver can operate in two modes.
  739. X
  740. X Syntax:
  741. X         set terminal iris4d {24}
  742. X
  743. X If the hardware supports only 8 bits, use the default
  744. X `set terminal iris4d`. If, however, the hardware supports 24 bits
  745. X (8 per red/green/blue), use `set terminal iris4d 24`.
  746. X
  747. X When using 24-bit mode, the colors can be directly specified via the
  748. X file .gnuplot_iris4d that is searched in the current directory and
  749. X then in the home directory specified by the HOME environment variable.
  750. X This file holds RGB values for the background, border, labels and nine
  751. X plotting colors, in that order. For example, here is a file containing
  752. X the default colors:
  753. X
  754. X         85   85   85     /* Back Ground */
  755. X         0    0    0      /* Boundary */
  756. X         170  0    170    /* Labeling */
  757. X         85   255  255    /* Plot Color 1 */
  758. X         170  0    0      /* Plot Color 2 */
  759. X         0    170  0      /* Plot Color 3 */
  760. X         255  85   255    /* Plot Color 4 */
  761. X         255  255  85     /* Plot Color 5 */
  762. X         255  85   85     /* Plot Color 6 */
  763. X         85   255  85     /* Plot Color 7 */
  764. X         0    170  170    /* Plot Color 8 */
  765. X         170  170  0      /* Plot Color 9 */
  766. X
  767. X This file has exactly 12 lines of RGB triples. No empty lines are
  768. X allowed and anything after the third number in line is ignored.
  769. X
  770. X4 mf
  771. X?set terminal mf
  772. X?mf
  773. X?metafont
  774. X The mf terminal driver creates a input file to the MetaFont program.
  775. X Thus a figure may be used in the TeX document in the same way as a
  776. X character is.
  777. X
  778. X To use the plot in a document the MetaFont program must be run
  779. X with the output file from GnuPlot as input. Thus, the user needs a basic
  780. X knowledge of the font creating process and inclusion of a new font in a
  781. X document. However, if the Metafont program is set up properly at the
  782. X local site an unexperienced user could perform the operation without
  783. X much trouble.
  784. X
  785. X The text support is based on a MetaFont character set.
  786. X Currently the Computer Modern Roman font set is input but the
  787. X user are in principal free to chose whatever fonts he/she needs.
  788. X The MetaFont source files for the chosen font must be available.
  789. X Each character is stored in a separate picture variable in MetaFont. These
  790. X variables may be manipulated (rotated, scaled etc.) when characters are
  791. X needed. The drawback is the interpretation time in the MetaFont
  792. X program. On some machines (i.e. PC) the limited amount of memory available
  793. X may also cause problem if too many pictures are stored.
  794. X
  795. X5 Metafont Instructions
  796. X?set terminal mf detailed
  797. X?mf detailed
  798. X?metafont detailed
  799. X
  800. X - Set your terminal to metafont:
  801. X   set terminal mf
  802. X - Select an output-file, e.g.:
  803. X   set output "myfigures.mf"
  804. X - Do your plots. Each plot will generate a separate character. Its default
  805. X size will be 5*3 inches. You can change the size by saying set size 0.5,0.5
  806. X or whatever fraction of the default size you want to have.
  807. X
  808. X - Quit gnuplot.
  809. X
  810. X - Generate a tfm- and gf-file by running metafont on the output of gnuplot.
  811. X Since the plot is quite large (5*3 in), you will have to use a version
  812. X of metafont that has a value of at least 150000 for memmax. On Unix-systems
  813. X these are conventionally installed under the name bigmf. For the following
  814. X assume that the command virmf stands for a big version of metafont. For example:
  815. X
  816. X - Invoke metafont:
  817. X     virmf '&plain'
  818. X - Select the output device: At the metafont prompt ('*') type:
  819. X     \mode:=CanonCX;     % or whatever printer you use
  820. X - Optionally select a magnification:
  821. X     mag:=1;             % or whatever you wish
  822. X - Input the gnuplot-file:
  823. X     input myfigures.mf
  824. X On a typical Unix machine there will usually be a script called mf that
  825. X executes virmf '&plain', so you probably can substitute mf for virmf &plain.
  826. X This will generate two files: mfput.tfm and mfput.$$$gf (where $$$ indicates
  827. X the resolution of your device). The above can be conveniently achieved by
  828. X typing everything on the command line, e.g.:
  829. X virmf '&plain' '\mode:=CanonCX; mag:=1; input myfigures.mf'
  830. X In this case the output files will be named myfigures.tfm and
  831. X myfigures.300gf.
  832. X
  833. X - Generate a pk-file from the gf-file using gftopk:
  834. X   gftopk myfigures.300gf myfigures.300pk
  835. X The name of the output-file for gftopk depends on the dvi-driver you use.
  836. X Ask your local TeX-administrator about the naming conventions.
  837. X Next, either install the tfm- and pk-files in the appropriate directories,
  838. X or set your environment-variables properly. Usually this involves setting
  839. X TEXFONTS to include the current directory and do the same thing for the
  840. X environment-variable that your dvi-driver uses (no standard name here...).
  841. X This step is necessary so that TeX will find the font-metric file and your
  842. X dvi-driver will find the pk-file.
  843. X
  844. X - To include your plots in your document you have to tell TeX the font:
  845. X   \font\gnufigs=myfigures
  846. X Each plot you made is stored in a single character. The first plot is
  847. X character 0, the second is character 1, and so on... After doing the above
  848. X step you can use the plots just like any other characters. Therefore, to
  849. X place plots 1 and 2 centered in your document, all you have to do is:
  850. X   \centerline{\gnufigs\char0}
  851. X   \centerline{\gnufigs\char1}
  852. X in plain TeX. For LaTeX you can, of course, use the picture environment
  853. X and place the plot according to your wishes using the \makebox and \put
  854. X macros.
  855. X
  856. X It saves you a lot of time, once you have generated the
  857. X font, since TeX handles the plots as characters and uses minimal time to
  858. X place them. Also the documents you make change more often, than the plots
  859. X do. Also it saves a lot of TeX-memory. One last advantage of
  860. X using the metafont-driver is that the dvi-file really remains device
  861. X independent, because no \special-commands are used as in the eepic- and
  862. X tpic-drivers.
  863. X4 mif
  864. X?set terminal mif
  865. X?mif
  866. X Several options may be set in the MIF 3.00 driver.
  867. X
  868. X Syntax:
  869. X      set terminal mif {<pentype>} {<curvetype>} {<help>}
  870. X
  871. X <pentype> selects "colour" of the graphics.
  872. X      `colour`     plot lines with line types >= 0 in colour (MIF sep. 2-7).
  873. X      `monochrome` plot all line types in black (MIF sep. 0).
  874. X <curvetype> selects how "curves" are plotted.
  875. X      `polyline`   plot curves as continuous curves.
  876. X      `vectors`    plot curves as collections of vectors
  877. X <help> print online help on standard error output.
  878. X      `help`       print a short description of the usage, and the options
  879. X      `?`          print a short description of the usage
  880. X
  881. X This terminal driver produces Frame Maker MIF format version 3.00. It
  882. X plots in MIF Frames with the size 15*10 [cm], and plot primitives with
  883. X the same pen will be grouped in the same MIF group. Plot primitives in
  884. X a gnuplot plot will be plotted in a MIF Frame, and several MIF Frames
  885. X are collected in one large MIF Frame.
  886. X Plot primitives with line types >= 0 will as default be drawn in colour.
  887. X As default curves are plotted as continuous lines. The MIF font used for
  888. X text is "Times".
  889. X
  890. X Examples:
  891. X
  892. X      set term mif
  893. X      set term mif vectors
  894. X      set term mif help
  895. X
  896. X
  897. X4 nec-cp6
  898. X?set terminal nec-cp6
  899. X?nec-cp6
  900. X One option may be set in the nec-cp6 driver.  The resolution of this
  901. X driver is 400x320.
  902. X
  903. X Syntax:
  904. X         set terminal nec-cp6 monochrome
  905. X         set terminal nec-cp6 color
  906. X         set terminal nec-cp6 draft
  907. X
  908. X4 pbm
  909. X?set terminal pbm
  910. X?pbm
  911. X Several options may be set in the PBMplus driver.
  912. X
  913. X Syntax:
  914. X         set terminal pbm {<fontsize>} {<colormode>}
  915. X
  916. X where <fontsize> is `small`, `medium`, or `large` and <colormode> is
  917. X `monochrome`, `gray` or `color`.
  918. X Default size is 640 pixels wide and 480 pixels high.
  919. X The output for `monochrome` is a portable bitmap (one bit per pixel).
  920. X The output for `gray` is a portable graymap (three bits per pixel).
  921. X The output for `color` is a portable pixmap (color, four bits per pixel).
  922. X The output of these drivers can be used with Jef Poskanzer's
  923. X excellent PBMPLUS package which provides programs to convert
  924. X the above PBMPLUS formats to GIF, TIFF, MacPaint, Macintosh PICT,
  925. X PCX, X11 bitmap and many others.
  926. X
  927. X Examples:
  928. X
  929. X         set term pbm small
  930. X         set size 2,2
  931. X         set term pbm color medium
  932. X
  933. X4 pcl5
  934. X?set terminal pcl5
  935. X?pcl5
  936. X Three options may be set in the pcl5 driver.  The driver
  937. X actually uses HPGL-2 but there is a name conflict among
  938. X the terminal devices.
  939. X
  940. X Syntax:
  941. X         set terminal pcl5 {<mode>} {<font>} {<fontsize>}
  942. X
  943. X where <mode> is `landscape`, or `portrait`, <font> is `stick`,
  944. X `univers`, or `cg_times`, and fontsize is the size in points.
  945. X         set terminal pcl5 landscape
  946. X
  947. X4 postscript
  948. X?set terminal postscript
  949. X?postscript
  950. X Several options may be set in the PostScript driver.
  951. X
  952. X Syntax:
  953. X         set terminal postscript {<mode>} {<color>} {<dashed>}
  954. X                                 {"<fontname>"} {<fontsize>}
  955. X
  956. X where <mode> is `landscape`, `portrait`, `eps` or `default`.
  957. X Selecting default sets all options to their defaults.
  958. X <color> is either `color` or `monochrome`.
  959. X <dashed> is either `solid` or `dashed`.
  960. X "<fontname>" is the name of a valid PostScript font.
  961. X <fontsize> is the size of the font in PostScript points.
  962. X Defaults are `landscape`, `monochrome`, `dashed`, "Helvetica", and 14pt.
  963. X Default size of PostScript plot is landscape mode 10 inches wide
  964. X and 7 inches high.
  965. X
  966. X To get EPS output, use the `eps` mode and make only one plot per file.
  967. X In `eps` mode the whole plot is halved in size; the fonts are half the
  968. X given size, and the plot is 5 inches wide and 3.5 inches high.
  969. X
  970. X Examples:
  971. X
  972. X         set term postscript default       # old postscript
  973. X         set term postscript landscape 22  # old psbig
  974. X         set term postscript eps 14   # old epsf1
  975. X         set term postscript eps 22   # old epsf2
  976. X         set size 0.7,1.4
  977. X         set term post portrait color "Times-Roman" 14
  978. X
  979. X4 regis
  980. X?set terminal regis
  981. X?table
  982. X The `regis` terminal device has the option of using 4 or 16
  983. X colors.  The default is 4.  For example:
  984. X        set term regis 16
  985. X
  986. X4 table
  987. X?set terminal table
  988. X?table
  989. X Instead of producing a picture, term type `table` prints out
  990. X the evaluation results in a multicolumn ASCII table of X Y Z values.
  991. X For those times when you really want to see the numbers, now you
  992. X can see them on the screen or save to a file.
  993. X
  994. X4 windows
  995. X?set terminal windows
  996. X?windows
  997. X Three options may be set in the windows driver.
  998. X
  999. X Syntax:
  1000. X         set terminal windows {<color>} {"<fontname>"} {<fontsize>}
  1001. X
  1002. X `<color>` is either `color` or `monochrome`.
  1003. X `"<fontname>"` is the name of a valid Windows font.
  1004. X `<fontsize>` is the size of the font in points.
  1005. X
  1006. X5 graph-menu
  1007. X?set terminal windows graph-menu
  1008. X?graph-menu
  1009. X The `gnuplot graph` window has the following options on a pop up menu
  1010. X accessed by pressing the right mouse button or selecting `Options`
  1011. X from the system menu:
  1012. X
  1013. X `Bring to Top` when checked brings the graph window to
  1014. X the top after every plot.
  1015. X
  1016. X `Color` when checked enables color linestyles.
  1017. X When unchecked it forces monochrome linestyles.
  1018. X
  1019. X `Copy to Clipboard` copies a bitmap and a Metafile picture.
  1020. X
  1021. X `Background...` sets the window background color.
  1022. X
  1023. X `Choose Font...` selects the font used in the graphics window.
  1024. X
  1025. X `Line Styles...` allows customization of the line colors
  1026. X and styles.
  1027. X
  1028. X `Print...` prints the graphics windows using a Windows printer
  1029. X driver and allows selection of the printer and scaling of the output.
  1030. X The output produced by `Print` is not as good as that from gnuplot's
  1031. X own printer drivers.
  1032. X
  1033. X `Update wgnuplot.ini` saves the current window locations, window
  1034. X sizes, text window font, text window font size, graph window font,
  1035. X graph window font size, background color and linestyles to the
  1036. X initialisation file `WGNUPLOT.INI`.
  1037. X
  1038. X5 printing
  1039. X?set terminal windows printing
  1040. X?printing
  1041. X In order of preference, graphs may be be printed in the
  1042. X following ways.
  1043. X
  1044. X `1.` Use the gnuplot command `set terminal` to select a printer
  1045. X and `set output` to redirect output to a file.
  1046. X
  1047. X `2.` Select the `Print...` command from the `gnuplot graph` window.
  1048. X An extra command `screendump` does this from the text window.
  1049. X
  1050. X `3.` If `set output "PRN"` is used, output will go to a temporary file.
  1051. X When you exit from gnuplot or when you change the output with another
  1052. X `set output` command, a dialog box will appear for you to select
  1053. X a printer port.  If you choose OK, the output will be printed
  1054. X on the selected port, passing unmodified through the print
  1055. X manager.  It is possible to accidently (or deliberately) send
  1056. X printer output meant for one printer to an incompatible printer.
  1057. X
  1058. X5 text-menu
  1059. X?set terminal windows text-menu
  1060. X?text-menu
  1061. X The `gnuplot text` window has the following options on a pop up menu
  1062. X accessed by pressing the right mouse button or selecting `Options`
  1063. X from the system menu:
  1064. X
  1065. X `Copy to Clipboard` copies marked text to the clipboard.
  1066. X
  1067. X `Paste` copies text from the clipboard as if typed by the user.
  1068. X
  1069. X `Choose Font...` selects the font used in the text window.
  1070. X
  1071. X `System Colors` when selected makes the text window honor the
  1072. X System Colors set using the Control Panel.  When unselected,
  1073. X text is black or blue on a white background.
  1074. X
  1075. X `Update wgnuplot.ini` saves the current text window location, text
  1076. X window size, text window font and text window font size to the
  1077. X initialisation file `WGNUPLOT.INI`.
  1078. X
  1079. X `MENU BAR`
  1080. X
  1081. X If the menu file `WGNUPLOT.MNU` is found in the same directory as
  1082. X WGNUPLOT.EXE, then the menu specified in `WGNUPLOT.MNU` will
  1083. X be loaded.
  1084. X
  1085. X Menu commands are:
  1086. X   [Menu]       Start a new menu with the name on the following line
  1087. X   [EndMenu]    End current menu.
  1088. X   --           Insert a horizontal menu separator
  1089. X   |            Insert a vertical menu separator
  1090. X   [Button]     Put next macro on a push button instead of a menu.
  1091. X
  1092. X Macros take two lines with the macro name (menu entry) on the first
  1093. X line and the macro on the second line.  Leading spaces are ignored.
  1094. X
  1095. X Macros commands are:
  1096. X   [INPUT]      Input string with prompt terminated by [EOS] or {ENTER}
  1097. X   [EOS]        End Of String terminator.  Generates no output.
  1098. X   [OPEN]       Get name of file to open from list box, with title of
  1099. X                list box terminated by [EOS], followed by default
  1100. X                filename terminated by [EOS] or {ENTER}
  1101. X                This uses COMMDLG.DLL from Windows 3.1.
  1102. X   [SAVE]       Get name of file to save.  Similar to [OPEN]
  1103. X
  1104. X Macros character substitutions are:
  1105. X   {ENTER}      Carriage Return '\r'
  1106. X   {TAB}        Tab     '\011'
  1107. X   {ESC}        Escape  '\033'
  1108. X   {^A}         '\001'
  1109. X   ...
  1110. X   {^_}         '\031'
  1111. X
  1112. X Macros are limited to 256 characters after expansion.
  1113. X
  1114. X5 wgnuplot.ini
  1115. X?set terminal windows wgnuplot.ini
  1116. X?wgnuplot.ini
  1117. X Windows gnuplot will read some of its options from the `[WGNUPLOT]` section
  1118. X of `WGNUPLOT.INI` in the Windows directory.
  1119. X An example `WGNUPLOT.INI` file is shown below.
  1120. X  [WGNUPLOT]
  1121. X  TextOrigin=0 0
  1122. X  TextSize=640 150
  1123. X  TextFont=Terminal,9
  1124. X  GraphOrigin=0 150
  1125. X  GraphSize=640 330
  1126. X  GraphFont=Arial,10
  1127. X  GraphColor=1
  1128. X  GraphToTop=1
  1129. X  GraphBackground=255 255 255
  1130. X  Border=0 0 0 0 0
  1131. X  Axis=192 192 192 2 2
  1132. X  Line1=0 0 255 0 0
  1133. X  Line2=0 255 0 0 1
  1134. X  Line3=255 0 0 0 2
  1135. X  Line4=255 0 255 0 3
  1136. X  Line5=0 0 128 0 4
  1137. X The `GraphFont` entry specifies the font name and size in points.
  1138. X The 5 numbers given in the `Border`, `Axis` and `Line` entries are
  1139. X the `Red` intensity (0-255), `Green` intensity, `Blue` intensity,
  1140. X `Color Linestyle` and `Mono Linestyle`.
  1141. X `Linestyles` are 0=SOLID, 1=DASH, 2=DOT, 3=DASHDOT, 4=DASHDOTDOT.
  1142. X In the example `WGNUPLOT.INI` file above, Line 2 is a green solid
  1143. X line in color mode, or a dashed line in monochrome mode.
  1144. X The default line width is 1 pixel.  If `Linestyle` is negative it
  1145. X specifies the width of a SOLID line in pixels.
  1146. X Line1 and any linestyle used with the `points` style must be
  1147. X SOLID with unit width.
  1148. X
  1149. X5 windows3.0
  1150. X?set terminal windows windows3.0
  1151. X?windows3.0
  1152. X Windows 3.1 is preferred, but WGNUPLOT will run under Windows 3.0
  1153. X with the following restrictions:
  1154. X
  1155. X `1.` COMMDLG.DLL and SHELL.DLL (available with Windows 3.1 or Borland C++ 3.1)
  1156. X must be in the windows directory.
  1157. X
  1158. X `2.` WGNUPLOT.HLP produced by Borland C++ 3.1 is in Windows 3.1 format.
  1159. X You need to use the WINHELP.EXE supplied with Borland C++ 3.1.
  1160. X
  1161. X `3.` It won't run in real mode due to lack of memory.
  1162. X
  1163. X `4.` Truetype fonts are not available in the graph window.
  1164. X
  1165. X `5.` Drag-drop does not work.
  1166. X
  1167. X3 tics
  1168. X?set tics
  1169. X?show tics
  1170. X?tics
  1171. X By default, tics are drawn inwards from the border on all four sides.
  1172. X The `set tics` command can be used to change the tics to be
  1173. X drawn outwards on the left and bottom borders only.
  1174. X This is useful when doing impulse plots.
  1175. X
  1176. X Syntax:
  1177. X         set tics {<direction>}
  1178. X         show tics
  1179. X
  1180. X where <direction> may be `in` or `out`. `set tics` defaults to `in`.
  1181. X
  1182. X See also the `set xtics`, `set ytics`, and `set ztics` command for more
  1183. X control of tic marks.
  1184. X?set ticslevel
  1185. X?show ticslevel
  1186. X?ticslevel
  1187. X Using splot, in 3-d plots, one can adjust the relative height of the
  1188. X vertical (Z) axis using `set ticslevel`. The numeric argument provided
  1189. X specifies the location of the bottom of the scale. a zero will put it
  1190. X on the bottom grid and any positive number somewhere along the z axis.
  1191. X
  1192. X Syntax:
  1193. X         set ticslevel {<level>}
  1194. X         show tics
  1195. X
  1196. X where <level> is a non negative numeric argument. For example,
  1197. X
  1198. X         set ticslevel 0.5
  1199. X
  1200. X sets the tics level to the default value.
  1201. X
  1202. X See also the `set view`.
  1203. X3 time
  1204. X?set time
  1205. X?show time
  1206. X?time
  1207. X The optional `set time` places the time and date of the plot either
  1208. X at the top or bottom of the left margin. The exact location is
  1209. X device dependent.
  1210. X
  1211. X Syntax:
  1212. X         set time {<xoff>}{,<yoff>}
  1213. X         set notime
  1214. X         show time
  1215. X
  1216. X Specifying constants <xoff> or <yoff> as optional offsets for the time
  1217. X will move the time <xoff> or <yoff> character screen coordinates. For
  1218. X example,
  1219. X
  1220. X         set time ,-3
  1221. X
  1222. X will change only the y offset of the time, moving the title down by
  1223. X roughly the height of three characters.
  1224. X
  1225. X3 title
  1226. X?set title
  1227. X?show title
  1228. X?title
  1229. X The `set title` command produces a plot title that is centered at the
  1230. X top of the plot. Using the optional x,y screen offsets, the title
  1231. X can be placed anywhere on the plot. `set title` with no parameters
  1232. X clears the title.
  1233. X
  1234. X Syntax:
  1235. X          set title {"<title-text>"} {<xoff>}{,<yoff>}
  1236. X          show title
  1237. X
  1238. X Specifying constants <xoff> or <yoff> as optional offsets for the
  1239. X title will move the title <xoff> or <yoff> character screen
  1240. X coordinates. Note these are screen coordinates and not plot
  1241. X coordinates. For example,
  1242. X
  1243. X          set title ,-1
  1244. X
  1245. X will change only the y offset of the title, moving the title down by
  1246. X roughly the height of one character.
  1247. X
  1248. X (The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  1249. X a newline.)
  1250. X3 trange
  1251. X?set trange
  1252. X?show trange
  1253. X?trange
  1254. X The `set trange` command sets the parametric range used to compute
  1255. X x and y values when in parametric mode. If not in parametric mode
  1256. X (see `set parametric`) then this range is not used. This command
  1257. X does not affect x/y autoscaling or x/y ranges.
  1258. X
  1259. X This range may also be specified on the `plot` command line when
  1260. X in parametric mode.
  1261. X
  1262. X Syntax:
  1263. X         set trange [{<tmin> : <tmax>}]
  1264. X
  1265. X where <tmin> and <tmax> terms are constants or expressions.
  1266. X
  1267. X Both the <tmin> and <tmax> terms are optional. Anything omitted will
  1268. X not be changed, so
  1269. X         set trange [:10]
  1270. X changes tmax to 10 without affecting tmin.  See also `set urange` and
  1271. X `set parametric`.
  1272. X3 urange
  1273. X?set urange
  1274. X?show urange
  1275. X?urange
  1276. X The `set urange` and `set vrange` commands sets the parametric ranges used
  1277. X to compute x, y, and z values when in `splot` parametric mode. If not in
  1278. X parametric mode (see `set parametric`) then these ranges are not used. This
  1279. X command does not affect x/y autoscaling or x/y ranges.
  1280. X
  1281. X This range may also be specified on the `splot` command line when
  1282. X in parametric mode.  See `plot` for more information
  1283. X
  1284. X Syntax:
  1285. X         set urange [{<umin> : <umax>}]
  1286. X
  1287. X where <umin> and <umax> terms are constants or expressions.
  1288. X
  1289. X Both the <umin> and <umax> terms are optional. Anything omitted will
  1290. X not be changed, so
  1291. X         set urange [:10]
  1292. X changes umax to 10 without affecting umin.  See also `set trange`.
  1293. X3 variables
  1294. X?show variables
  1295. X The `show variables` command lists all user-defined variables and
  1296. X their values.
  1297. X
  1298. X Syntax:
  1299. X         show variables
  1300. X3 view
  1301. X?set view
  1302. X?show view
  1303. X?view
  1304. X The `set view` command sets the view point for `splot`s. This
  1305. X command controls the way the 3-d coordinates of the plot are mapped
  1306. X into the 2-d screen space. This command provides controls to both
  1307. X rotation and scaling of the plotted data but supports orthographic
  1308. X projections only.
  1309. X
  1310. X Syntax:
  1311. X         set view <rot_x> {,{<rot_z>}{,{<scale>}{,<scale_z>}}}
  1312. X         show view
  1313. X
  1314. X where <rot_x> and <rot_z> control the rotation angles (in degrees)
  1315. X along a virtual 3-d coordinate system aligned with the screen such
  1316. X that the screen horizontal axis is x, screen vertical axis is y, and
  1317. X the axis perpendicular to the screen is z. <rot_x> is bounded to the
  1318. X [0:180] range with a default of 60 degrees, while <rot_z> is bounded
  1319. X to the [0:360] range with a default of 30 degrees. <scale> controls
  1320. X the scaling of the entire `splot`, while <scale_z> scales the z axis
  1321. X only. Both scales default to 1.0.
  1322. X
  1323. X Examples:
  1324. X         set view 60, 30, 1, 1
  1325. X         set view ,,0.5
  1326. X
  1327. X The first sets all the four default values. The second changes
  1328. X only scale, to 0.5.
  1329. X
  1330. X See also `set ticslevel`.
  1331. X3 vrange
  1332. X?set vrange
  1333. X?show vrange
  1334. X?vrange
  1335. X The `set vrange` command is similar to the `set urange` command.
  1336. X Please see `set urange`.
  1337. X3 xlabel
  1338. X?set xlabel
  1339. X?show xlabel
  1340. X?xlabel
  1341. X The `set xlabel` command sets the x-axis label that is centered along
  1342. X the x axis. Using the optional x,y screen offsets, the label can be
  1343. X placed anywhere on the plot. `set xlabel` with no parameters clears
  1344. X the label.
  1345. X
  1346. X Syntax:
  1347. X          set xlabel {"<label>"} {<xoff>}{,<yoff>}
  1348. X          show xlabel
  1349. X
  1350. X Specifying constants <xoff> or <yoff> as optional offsets for the
  1351. X label will move the label <xoff> or <yoff> character screen
  1352. X coordinates. For example,
  1353. X
  1354. X          set xlabel -1
  1355. X
  1356. X will change only the x offset of the xlabel, moving the label roughly
  1357. X one character width to the left.
  1358. X
  1359. X (The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  1360. X a newline.)
  1361. X3 xrange
  1362. X?set xrange
  1363. X?show xrange
  1364. X?xrange
  1365. X The `set xrange` command sets the horizontal range that will be
  1366. X displayed. This command turns x axis autoscaling off.
  1367. X
  1368. X This range may also be specified on the `plot` command line.
  1369. X
  1370. X Syntax:
  1371. X         set xrange [{<xmin> : <xmax>}]
  1372. X
  1373. X where <xmin> and <xmax> terms are constants or expressions.
  1374. X
  1375. X Both the <xmin> and <xmax> terms are optional. Anything omitted will
  1376. X not be changed, so
  1377. X         set xrange [:10]
  1378. X changes xmax to 10 without affecting xmin.
  1379. X3 xtics
  1380. X?set xtics
  1381. X?set noxtics
  1382. X?show xtics
  1383. X?xtics
  1384. X?noxtics
  1385. X Fine control of the x axis tic marks is possible with the
  1386. X `set xtics` command. The x-axis tic marks may be turned off with the
  1387. X `set noxtics` command. They may be turned on (the default state) with
  1388. X `set xtics`.
  1389. X
  1390. X Syntax:
  1391. X          set xtics { {<start>, <incr>{, <end>}} |
  1392. X                      {({"<label>"} <pos> {, {"<label>"} <pos>}...)} }
  1393. X          set noxtics
  1394. X          show xtics
  1395. X
  1396. X The <start>, <incr>, <end> form specifies that a series of tics will
  1397. X be plotted on the x axis between the x values <start> and <end>
  1398. X with an increment of <incr>. If <end> is not given it is assumed to be
  1399. X infinity. The increment may be negative. For example,
  1400. X           set xtics 0,.5,10
  1401. X makes tics at 0, 0.5, 1, 1.5, ..., 9.5, 10.
  1402. X
  1403. X The ("<label>" <pos>, ...) form allows arbitrary tic positions or
  1404. X non-numeric tic labels. A set of tics are a set of positions, each
  1405. X with its own optional label. Note that the label is a string enclosed
  1406. X by quotes, and may be a constant string, such as "hello", or contain
  1407. X formatting information for the tic number (which is the same as the
  1408. X position), such as "%3f clients". See `set format` for more
  1409. X information about this case. The label may even be empty.
  1410. X Examples:
  1411. X          set xtics ("low" 0, "medium" 50, "high" 100)
  1412. X          set xtics (1,2,4,8,16,32,64,128,256,512,1024)
  1413. X          set xtics ("bottom" 0, "" 10, "top" 20)
  1414. X
  1415. X Tics will only be plotted when in range.
  1416. X
  1417. X The `set ytics` and `set noytics` commands work identically.
  1418. X See also the `set format` command.
  1419. X3 xdtics
  1420. X?set xdtics
  1421. X?set noxdtics
  1422. X?show xdtics
  1423. X?xdtics
  1424. X?noxdtics
  1425. X The `set xdtics` commands converts the x axis tic marks to days of
  1426. X the week where 0=Sun and 6=Sat.  Overflows are converted modulo 7
  1427. X to dates.
  1428. X
  1429. X Examples:
  1430. X        set xdtics
  1431. X
  1432. X Sets x axis tics in days.
  1433. X
  1434. X The `set ydtics` `set zdtics` and `set noydtics` `set nozdtics` commands
  1435. X work identically.
  1436. X See also the `set format` command.
  1437. X
  1438. X3 xmtics
  1439. X?set xmtics
  1440. X?set noxmtics
  1441. X?show xmtics
  1442. X?xmtics
  1443. X?noxmtics
  1444. X The `set xmtics` commands converts the x axis tic marks to months of
  1445. X the years where 1=Jan and 12=Dec.  Overflows are converted modulo 12
  1446. X to months.
  1447. X
  1448. X Examples:
  1449. X        set xmtics
  1450. X
  1451. X Sets x axis tics into months.
  1452. X
  1453. X The `set ymtics` `set zmtics` and `set noymtics` `set nozmtics` commands
  1454. X work identically.
  1455. X See also the `set format` command.
  1456. X
  1457. X3 xzeroaxis
  1458. X?set xzeroaxis
  1459. X?set noxzeroaxis
  1460. X?show xzeroaxis
  1461. X?xzeroaxis
  1462. X?noxzeroaxis
  1463. X `set xzeroaxis` draws the x-axis. By default, this option is on.
  1464. X `set noxzeroaxis` causes GNUPLOT to omit the x-axis.
  1465. X
  1466. X Syntax:
  1467. X         set xzeroaxis
  1468. X         set noxzeroaxis
  1469. X         show xzeroaxis
  1470. X3 ylabel
  1471. X?set ylabel
  1472. X?show ylabel
  1473. X?ylabel
  1474. X The `set ylabel` command sets the y-axis label.  The position of this
  1475. X label depends on the terminal, and can be one of the following three
  1476. X positions (the position can be adjusted with optional parameters).
  1477. X
  1478. X 1. Horizontal text flushed left at the top left of the plot.
  1479. X Terminals that cannot rotate text will probably use this method.
  1480. X
  1481. X 2. Vertical text centered vertically at the left of the plot.
  1482. X Terminals that can rotate text will probably use this method.
  1483. X
  1484. X 3. Horizontal text centered vertically at the left of the plot.
  1485. X The EEPIC, LaTeX and TPIC drivers use this method. The user must insert
  1486. X line breaks using \\ to prevent the ylabel from overwriting
  1487. X the plot. To produce a vertical row of characters, add \\
  1488. X between every printing character (but this is ugly).
  1489. X
  1490. X Syntax:
  1491. X          set ylabel {"<label>"} {<xoff>}{,<yoff>}
  1492. X          show ylabel
  1493. X
  1494. X With no parameters, the label is cleared. Specifying constants <xoff>
  1495. X or <yoff> as optional offsets for the label will move the label <xoff>
  1496. X or <yoff> character screen coordinates. For example,
  1497. X
  1498. X          set ylabel -1
  1499. X
  1500. X will change only the x offset of the ylabel, moving the label roughly
  1501. X one character width left of its default position. This is especially
  1502. X useful with the LaTeX driver.
  1503. X
  1504. X (The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  1505. X a newline.)
  1506. X3 yrange
  1507. X?set yrange
  1508. X?show yrange
  1509. X?yrange
  1510. X The `set yrange` command sets the vertical range that will be
  1511. X displayed. This command turns y axis autoscaling off.
  1512. X
  1513. X This range may also be specified on the `plot` command line.
  1514. X
  1515. X Syntax:
  1516. X         set yrange [{<ymin> : <ymax>}]
  1517. X
  1518. X where <ymin> and <ymax> terms are constants or expressions.
  1519. X
  1520. X Both the <ymin> and <ymax> terms are optional. Anything omitted will
  1521. X not be changed, so
  1522. X         set yrange [:10]
  1523. X changes ymax to 10 without affecting ymin.
  1524. X3 ytics
  1525. X?set ytics
  1526. X?set noytics
  1527. X?show ytics
  1528. X?ytics
  1529. X?noytics
  1530. X The `set ytics` and `set noytics` commands are similar to the `set xtics`
  1531. X and `set noxtics` commands. Please see `set xtics`.
  1532. X3 ydtics
  1533. X?set ydtics
  1534. X?set noydtics
  1535. X?show ydtics
  1536. X?ydtics
  1537. X?noydtics
  1538. X The `set ydtics` and `set noydtics` commands are similar to the `set xdtics`
  1539. X and `set noxdtics` commands. Please see `set xdtics`.
  1540. X3 ymtics
  1541. X?set ymtics
  1542. X?set noymtics
  1543. X?show ymtics
  1544. X?ymtics
  1545. X?noymtics
  1546. X The `set ymtics` and `set noymtics` commands are similar to the `set xmtics`
  1547. X and `set noxmtics` commands. Please see `set xmtics`.
  1548. X3 yzeroaxis
  1549. X?set yzeroaxis
  1550. X?set noyzeroaxis
  1551. X?show yzeroaxis
  1552. X?yzeroaxis
  1553. X?noyzeroaxis
  1554. X `set yzeroaxis` draws the y-axis. By default, this option is on.
  1555. X `set noyzeroaxis` causes GNUPLOT to omit the y-axis.
  1556. X
  1557. X Syntax:
  1558. X         set yzeroaxis
  1559. X         set noyzeroaxis
  1560. X         show yzeroaxis
  1561. X3 zero
  1562. X?set zero
  1563. X?show zero
  1564. X?zero
  1565. X The `zero` value is the default threshold for values approaching 0.0.
  1566. X GNUPLOT will not plot a point if its imaginary part is greater in
  1567. X magnitude than the `zero` threshold. Axis ranges cannot be less than
  1568. X `zero`. The default `zero` value is 1e-8. This can be changed with
  1569. X the `set zero` command.
  1570. X
  1571. X Syntax:
  1572. X         set zero <expression>
  1573. X         show zero
  1574. X3 zeroaxis
  1575. X?set zeroaxis
  1576. X?set nozeroaxis
  1577. X?show zeroaxis
  1578. X?zeroaxis
  1579. X?nozeroaxis
  1580. X `set zeroaxis` draws the x-axis and y-axis. By default, this option is
  1581. X on.  `set nozeroaxis` causes GNUPLOT to omit the axes, and is
  1582. X equivalent to `set noxzeroaxis; set noyzeroaxis.`
  1583. X
  1584. X Syntax:
  1585. X         set zeroaxis
  1586. X         set nozeroaxis
  1587. X         show zeroaxis
  1588. X See `set xzeroaxis` and `set yzeroaxis`.
  1589. X3 zlabel
  1590. X?set zlabel
  1591. X?show zlabel
  1592. X?zlabel
  1593. X The `set zlabel` command sets the z-axis label that is centered along
  1594. X the z axis. Using the optional x,y screen offsets, the label can be
  1595. X placed anywhere on the plot. `set zlabel` with no parameters clears
  1596. X the label.
  1597. X
  1598. X Syntax:
  1599. X          set zlabel {"<label>"} {<xoff>}{,<yoff>}
  1600. X          show zlabel
  1601. X
  1602. X Specifying constants <xoff> or <yoff> as optional offsets for the
  1603. X label will move the label <xoff> or <yoff> character screen
  1604. X coordinates. For example,
  1605. X
  1606. X          set zlabel ,1
  1607. X
  1608. X will change only the y offset of the zlabel, moving the label roughly
  1609. X one character height up.
  1610. X
  1611. X The zlabel will be drawn whenever surfaces or contours are plotted,
  1612. X in the space above the grid level.
  1613. X
  1614. X (The EEPIC, Imagen, LaTeX, and TPIC drivers allow \\ in a string to specify
  1615. X a newline.)
  1616. X3 zrange
  1617. X?set zrange
  1618. X?show zrange
  1619. X?zrange
  1620. X The `set zrange` command sets the vertical range that will be
  1621. X displayed. This command turns z axis autoscaling off.  The zrange is
  1622. X used only by `splot` and is ignored by `plot`.
  1623. X
  1624. X This range may also be specified on the `splot` command line.
  1625. X
  1626. X Syntax:
  1627. X         set zrange [{<zmin> : <zmax>}]
  1628. X
  1629. X where <zmin> and <zmax> terms are constants or expressions.
  1630. X
  1631. X Both the <zmin> and <zmax> terms are optional. Anything omitted will
  1632. X not be changed, so
  1633. X         set zrange [2:]
  1634. X changes zmin to 2 without affecting zmax.
  1635. X3 ztics
  1636. X?set ztics
  1637. X?set noztics
  1638. X?show ztics
  1639. X?ztics
  1640. X?noztics
  1641. X The `set ztics` and `set noztics` commands are similar to the
  1642. X `set xtics` and `set noxtics` commands. Please see `set xtics`.
  1643. X3 zdtics
  1644. X?set zdtics
  1645. X?set nozdtics
  1646. X?show zdtics
  1647. X?zdtics
  1648. X?nozdtics
  1649. X The `set zdtics` and `set nozdtics` commands are similar to the
  1650. X `set xdtics` and `set noxdtics` commands. Please see `set xdtics`.
  1651. X
  1652. X3 zmtics
  1653. X?set zmtics
  1654. X?set nozmtics
  1655. X?show zmtics
  1656. X?zmtics
  1657. X?nozmtics
  1658. X The `set zmtics` and `set nozmtics` commands are similar to the
  1659. X `set xmtics` and `set noxmtics` commands. Please see `set xmtics`.
  1660. X2 shell
  1661. X?shell
  1662. X The `shell` command spawns an interactive shell. To return to
  1663. X GNUPLOT, type `logout` if using VMS, `exit` or the END-OF-FILE
  1664. X character if using Unix, `endcli` if using AmigaDOS, or `exit` if
  1665. X using MS-DOS or OS/2.
  1666. X
  1667. X A single shell command may be spawned by preceding it with the !
  1668. X character ($ if using VMS) at the beginning of a command line.
  1669. X Control will return immediately to GNUPLOT after this command is
  1670. X executed. For example, in VMS, AmigaDOS, MS-DOS or OS/2,
  1671. X
  1672. X      ! dir
  1673. X
  1674. X prints a directory listing and then returns to GNUPLOT.
  1675. X
  1676. X On an Atari, the `!` command first checks whether a shell is already
  1677. X loaded and uses it, if available. This is practical if GNUPLOT is run
  1678. X from `gulam`, for example.
  1679. X2 splot
  1680. X?splot
  1681. X?surface plot
  1682. X Three-dimensional surface and contour plotting is available in
  1683. X GNUPLOT with the `splot` command. See the `plot` command for features
  1684. X common to the `plot` command.
  1685. X
  1686. X See also `set contour`, `set cntrparam`, and `set surface`.
  1687. X
  1688. X3 Binary Data
  1689. X?binary-data
  1690. X?binary files
  1691. X Gnuplot will dynamically determine if a datafile is ASCII or
  1692. X binary.  ASCII data files are discussed in the `plot` section.
  1693. X For three dimensions, single precision floats are stored as follows:
  1694. X
  1695. X       <ncols> <x0> <x1> <x2> ...
  1696. X       <y0> <z0,0> <z0,1> <z0,2> ...
  1697. X       <y1> <z1,0> <z1,1> <z1,2> ...
  1698. X
  1699. X which is converted into triplet:
  1700. X
  1701. X       <x0> <y0> <z0,0>
  1702. X       <x0> <y1> <z0,1>
  1703. X       <x0> <y2> <z0,2>
  1704. X
  1705. X       <x1> <y0> <z1,0>
  1706. X       <x1> <y1> <z1,1>
  1707. X       <x1> <y2> <z1,2>
  1708. X
  1709. X These triplets are then converted into gnuplot iso_curves and then
  1710. X uses gnuplot to do the rest of the plotting.
  1711. X
  1712. X A collection of matrix and vector manipulation routines (in C) are
  1713. X provided in `gnubin.c`.  The routine to write binary data is
  1714. X
  1715. X  int fwrite_matrix(file,m,nrl,nrl,ncl,nch,row_title,column_title)
  1716. X
  1717. X An example of using these routines is provided in the file `bf_test.c`.
  1718. X The corresponding demo file is `demo/binary.dem`.
  1719. X2 start-up
  1720. X?startup
  1721. X?start
  1722. X?.gnuplot
  1723. X When GNUPLOT is run, it looks for an initialization file to load.
  1724. X This file is called `.gnuplot` on Unix and AmigaDOS systems, and
  1725. X `GNUPLOT.INI` on other systems. If this file is not found in the
  1726. X current directory, the program will look for it in the home directory
  1727. X (under AmigaDOS, AtariTOS, MS-DOS and OS/2, the environment variable
  1728. X GNUPLOT should contain the name of this directory).  Note: if NOCWDRC
  1729. X is defined during the installation, GNUPLOT will not read from the
  1730. X current directory.
  1731. X
  1732. X If this file is found, GNUPLOT executes the commands in this file.
  1733. X This is most useful for setting the terminal type and defining any
  1734. X functions or variables that are used often.
  1735. X2 substitution
  1736. X?substitution
  1737. X Command-line substitution is specified by a system command enclosed in
  1738. X backquotes. This command is spawned and the output it produces
  1739. X replaces the name of the command (and backquotes) on the command line.
  1740. X
  1741. X Newlines in the output produced by the spawned command are replaced
  1742. X with blanks.
  1743. X
  1744. X Command-line substitution can be used anywhere on the GNUPLOT command
  1745. X line.
  1746. X
  1747. X Example:
  1748. X
  1749. X This will run the program `leastsq` and replace `leastsq` (including
  1750. X backquotes) on the command line with its output:
  1751. X
  1752. X          f(x) = `leastsq`
  1753. X
  1754. X or, in VMS
  1755. X
  1756. X          f(x) = `run leastsq`
  1757. X2 user-defined
  1758. X?userdefined
  1759. X?variables
  1760. X New user-defined variables and functions of one through five variables may
  1761. X be declared and used anywhere.
  1762. X
  1763. X User-defined function syntax:
  1764. X         <function-name> ( <dummy1> {,<dummy2> {, ...} } ) = <expression>
  1765. X
  1766. X where <expression> is defined in terms of <dummy1> through <dummy5>.
  1767. X
  1768. X User-defined variable syntax:
  1769. X         <variable-name> = <constant-expression>
  1770. X
  1771. X Examples:
  1772. X         w = 2
  1773. X         q = floor(tan(pi/2 - 0.1))
  1774. X         f(x) = sin(w*x)
  1775. X         sinc(x) = sin(pi*x)/(pi*x)
  1776. X         delta(t) = (t == 0)
  1777. X         ramp(t) = (t > 0) ? t : 0
  1778. X         min(a,b) = (a < b) ? a : b
  1779. X         comb(n,k) = n!/(k!*(n-k)!)
  1780. X         len3d(x,y,z) = sqrt(x*x+y*y+z*z)
  1781. X
  1782. X Note that the variable `pi` is already defined.
  1783. X
  1784. X See `show functions` and `show variables`.
  1785. X2 bugs
  1786. X?bugs
  1787. X The bessel functions do not work for complex arguments.
  1788. X
  1789. X The gamma function does not work for complex arguments.
  1790. X
  1791. X There is a bug in the stdio library for old Sun operating systems
  1792. X (SunOS Sys4-3.2). The "%g" format for 'printf' sometimes incorrectly
  1793. X prints numbers (e.g., 200000.0 as "2"). Thus, tic mark labels may be
  1794. X incorrect on a Sun4 version of GNUPLOT. A work-around is to rescale
  1795. X the data or use the `set format` command to change the tic mark format
  1796. X to "%7.0f" or some other appropriate format. This appears to have been
  1797. X fixed in SunOS 4.0.
  1798. X
  1799. X Another bug: On a Sun3 under SunOS 4.0, and on Sun4's under Sys4-3.2
  1800. X and SunOS 4.0, the 'sscanf' routine incorrectly parses "00 12" with
  1801. X the format "%f %f" and reads 0 and 0 instead of 0 and 12. This
  1802. X affects data input. If the data file contains x coordinates that are
  1803. X zero but are specified like '00', '000', etc, then you will read the
  1804. X wrong y values. Check any data files or upgrade the SunOS.
  1805. X It appears to have been fixed in SunOS 4.1.1.
  1806. X
  1807. X Microsoft C 5.1 has a nasty bug associated with the %g format for
  1808. X printf. When any of the formats "%.2g", "%.1g", "%.0g", "%.g" are
  1809. X used, printf will incorrectly print numbers in the range 1e-4 to 1e-1.
  1810. X Numbers that should be printed in the %e format are incorrectly
  1811. X printed in the %f format, with the wrong number of zeros after the
  1812. X decimal point.
  1813. X
  1814. X To work around this problem, use the %e or %f formats explicitly.
  1815. X
  1816. X GNUPLOT, when compiled with Microsoft C, did not work correctly on two
  1817. X VGA displays that were tested. The CGA, EGA and VGA drivers should
  1818. X probably be rewritten to use the Microsoft C graphics library.
  1819. X GNUPLOT compiled with Borland C++ uses the Turbo C graphics drivers and
  1820. X does work correctly with VGA displays.
  1821. X
  1822. X VAX/VMS 4.7 C compiler release 2.4 also has a poorly implemented %g
  1823. X format for printf. The numbers are printed numerically correct, but
  1824. X may not be in the requested format. The K&R second edition says that
  1825. X for the %g format, %e is used if the exponent is less than -4 or greater
  1826. X than or equal to the precision. The VAX uses %e format if the exponent
  1827. X is less than -1. The VAX appears to take no notice of the precision
  1828. X when deciding whether to use %e or %f for numbers less than 1.
  1829. X To work around this problem, use the %e or %f formats explicitly.
  1830. X From the VAX C 2.4 release notes:
  1831. X e,E,f,F,g,G  Result will always contain a decimal  point.
  1832. X For g and G, trailing zeros will not be removed from the result.
  1833. X
  1834. X VAX/VMS 5.2 C compiler release 3.0 has a slightly better implemented
  1835. X %g format than release 2.4, but not much. Trailing decimal points are
  1836. X now removed, but trailing zeros are still not removed from %g numbers
  1837. X in exponential format.
  1838. X
  1839. X ULTRIX X11R3 has a bug that causes the X11 driver to display "every
  1840. X other" plot.  The bug seems to be fixed in DEC's release of X11R4 so
  1841. X newer releases of ULTRIX don't seem to have the problem.  Solutions for
  1842. X older sites include upgrading the X11 libraries (from DEC or direct from
  1843. X MIT) or defining ULTRIX_KLUDGE when compiling the x11.trm file.  Note
  1844. X that the kludge is not an ideal fix, however.
  1845. X
  1846. X The constant HUGE was incorrectly defined in the NeXT OS 2.0 operating
  1847. X system.  HUGE should be set to 1e38 in plot.h. This error has been
  1848. X corrected in the 2.1 version of NeXT OS.
  1849. X
  1850. X Some older models of HP plotters do not have a page eject command 'PG'.
  1851. X The current HPGL driver uses this command in HPGL_reset.  This may need
  1852. X to be removed for these plotters.  The current PCL5 driver uses HPGL/2
  1853. X for text as well as graphics.  This should be modified to use scalable
  1854. X PCL fonts.
  1855. X
  1856. X On the Atari version, it is not possible to send output directly to
  1857. X the printer (using `/dev/lp` as output file), since CRs are added to LFs in
  1858. X binary output. As a workaround write the output to a file and copy it to
  1859. X the printer afterwards using a shell command.
  1860. X
  1861. X Please report any bugs to bug-gnuplot@dartmouth.edu.
  1862. END_OF_FILE
  1863.   if test 63916 -ne `wc -c <'gnuplot/docs/gnuplot.doc.B'`; then
  1864.     echo shar: \"'gnuplot/docs/gnuplot.doc.B'\" unpacked with wrong size!
  1865.   elif test -f 'gnuplot/docs/gnuplot.doc.A' ; then
  1866.     echo shar: Combining  \"'gnuplot/docs/gnuplot.doc'\" \(129941 characters\)
  1867.     cat 'gnuplot/docs/gnuplot.doc.A' 'gnuplot/docs/gnuplot.doc.B' > 'gnuplot/docs/gnuplot.doc'
  1868.     if test 129941 -ne `wc -c <'gnuplot/docs/gnuplot.doc'`; then
  1869.       echo shar: \"'gnuplot/docs/gnuplot.doc'\" combined with wrong size!
  1870.     else
  1871.       rm gnuplot/docs/gnuplot.doc.A gnuplot/docs/gnuplot.doc.B
  1872.     fi
  1873.   fi
  1874.   # end of 'gnuplot/docs/gnuplot.doc.B'
  1875. fi
  1876. if test -f 'gnuplot/os2/print.c' -a "${1}" != "-c" ; then 
  1877.   echo shar: Will not clobber existing file \"'gnuplot/os2/print.c'\"
  1878. else
  1879.   echo shar: Extracting \"'gnuplot/os2/print.c'\" \(13292 characters\)
  1880.   sed "s/^X//" >'gnuplot/os2/print.c' <<'END_OF_FILE'
  1881. X#ifdef INCRCSDATA
  1882. Xstatic char RCSid[]="$Id: print.c%v 3.50 1993/07/09 05:35:24 woo Exp $" ;
  1883. X#endif
  1884. X
  1885. X/****************************************************************************
  1886. X
  1887. X    PROGRAM: gnupmdrv
  1888. X    
  1889. X    Outboard PM driver for GNUPLOT 3.3
  1890. X
  1891. X    MODULE:  print.c -- support for printing graphics under OS/2 
  1892. X        
  1893. X****************************************************************************/
  1894. X
  1895. X/*
  1896. X * PM driver for GNUPLOT
  1897. X * Copyright (C) 1992   Roger Fearick
  1898. X *
  1899. X * Permission to use, copy, and distribute this software and its
  1900. X * documentation for any purpose with or without fee is hereby granted, 
  1901. X * provided that the above copyright notice appear in all copies and 
  1902. X * that both that copyright notice and this permission notice appear 
  1903. X * in supporting documentation.
  1904. X *
  1905. X * Permission to modify the software is granted, but not the right to
  1906. X * distribute the modified code.  Modifications are to be distributed 
  1907. X * as patches to released version.
  1908. X *  
  1909. X * This software is provided "as is" without express or implied warranty.
  1910. X * 
  1911. X *
  1912. X * AUTHOR
  1913. X * 
  1914. X *   Gnuplot driver for OS/2:  Roger Fearick
  1915. X * 
  1916. X * Send your comments or suggestions to 
  1917. X *  info-gnuplot@dartmouth.edu.
  1918. X * This is a mailing list; to join it send a note to 
  1919. X *  info-gnuplot-request@dartmouth.edu.  
  1920. X * Send bug reports to
  1921. X *  bug-gnuplot@dartmouth.edu.
  1922. X**/
  1923. X
  1924. X#define INCL_SPLDOSPRINT
  1925. X#define INCL_DOSPROCESS
  1926. X#define INCL_DOSSEMAPHORES
  1927. X#define INCL_DEV
  1928. X#define INCL_SPL
  1929. X#define INCL_PM
  1930. X#define INCL_WIN
  1931. X#include <os2.h>
  1932. X#include <stdio.h>
  1933. X#include <stdlib.h>
  1934. X#include <string.h>
  1935. X#include <process.h>
  1936. X#include "gnupmdrv.h"
  1937. X
  1938. Xtypedef struct {            /* for print thread parameters */
  1939. X    HWND  hwnd ;
  1940. X    char  szPrintFile[256] ;    /* file for printer output if not to printer */
  1941. X    PPRQINFO3 piPrinter ;       /* print queue info */
  1942. X    } PRINTPARAMS ;
  1943. X
  1944. Xstatic struct { 
  1945. X    long    lTech ;     // printer technology
  1946. X    long    lVer ;      // driver version
  1947. X    long    lWidth ;    // page width in pels
  1948. X    long    lHeight ;   // page height in pels
  1949. X    long    lWChars ;   // page width in chars    
  1950. X    long    lHChars ;   // page height in chars    
  1951. X    long    lHorRes ;   // horizontal resolution pels / metre
  1952. X    long    lVertRes ;  // vertical resolution pels / metre
  1953. X    } prCaps ;
  1954. X
  1955. Xstatic float   flXFrac = (float) 0.6 ;   /* print area fractions */
  1956. Xstatic float   flYFrac = (float) 0.5 ;
  1957. X
  1958. Xstatic DRIVDATA     driv = {sizeof( DRIVDATA) } ;
  1959. Xstatic PDRIVDATA    pdriv = NULL ;
  1960. Xstatic char         szPrintFile[CCHMAXPATHCOMP] = {0} ;
  1961. Xstatic DEVOPENSTRUC devop ;
  1962. X
  1963. Xvoid            ThreadPrintPage( PRINTPARAMS* ) ;
  1964. X
  1965. XMPARAM PrintCmdProc( HWND hWnd, ULONG msg, MPARAM mp1, MPARAM mp2 )
  1966. X/*
  1967. X**  Handle messages for print commands for 1- and 2-d spectra
  1968. X** (i.e for the appropriate 1-and 2-d child windows )
  1969. X*/
  1970. X    {
  1971. X    static BYTE abStack[4096] ;  
  1972. X    static PRINTPARAMS tp ;
  1973. X    static char szBusy[] = "Busy - try again later" ;
  1974. X    static char szStart[] = "Printing started" ;
  1975. X    static HEV semPrint = 0L ;
  1976. X    char szTemp[32] ;
  1977. X    long lErr ;
  1978. X    PBYTE pStack = abStack;
  1979. X    TID tid ;
  1980. X    char *pszMess, *szPrinter ;
  1981. X
  1982. X    if( semPrint == 0L ) {
  1983. X        DosCreateMutexSem( NULL, &semPrint, 0L, 0L ) ;
  1984. X        }
  1985. X
  1986. X    switch( msg ) {
  1987. X        
  1988. X        case WM_USER_PRINT_BEGIN:
  1989. X        
  1990. X            if( DosRequestMutexSem( semPrint, SEM_IMMEDIATE_RETURN ) != 0 ) {
  1991. X                pszMess = szBusy ;
  1992. X                WinMessageBox( HWND_DESKTOP,
  1993. X                               hWnd, 
  1994. X                               pszMess,
  1995. X                               APP_NAME,
  1996. X                               0,
  1997. X                               MB_OK | MB_ICONEXCLAMATION ) ;
  1998. X                }
  1999. X            else {
  2000. X                pszMess = szStart ;
  2001. X                tp.hwnd = hWnd ;
  2002. X                tp.piPrinter = (PPRQINFO3) mp1 ;
  2003. X                strcpy( tp.szPrintFile, szPrintFile ) ;
  2004. X                DosCreateThread( &tid, (PFNTHREAD)ThreadPrintPage, (ULONG)&tp, 0L, 8192L ) ;
  2005. X                }
  2006. X            break ;
  2007. X
  2008. X
  2009. X        case WM_USER_PRINT_OK :
  2010. X
  2011. X            WinMessageBox( HWND_DESKTOP,
  2012. X                           hWnd, 
  2013. X                           "Print done",
  2014. X                           APP_NAME,
  2015. X                           0,
  2016. X                           MB_OK | MB_ICONEXCLAMATION ) ;
  2017. X             DosReleaseMutexSem( semPrint ) ;
  2018. X             break ;
  2019. X
  2020. X        case WM_USER_DEV_ERROR :
  2021. X
  2022. X            lErr = ERRORIDERROR( (ERRORID) mp1 ) ;
  2023. X            sprintf( szTemp, "Dev error: %d %x", lErr, lErr ) ;
  2024. X            WinMessageBox( HWND_DESKTOP,
  2025. X                           hWnd, 
  2026. X                           szTemp,
  2027. X                           APP_NAME,
  2028. X                           0,
  2029. X                           MB_OK | MB_ICONEXCLAMATION ) ;
  2030. X             DosReleaseMutexSem( semPrint ) ;
  2031. X             break ;
  2032. X
  2033. X        case WM_USER_PRINT_ERROR :
  2034. X        
  2035. X            lErr = ERRORIDERROR( (ERRORID) mp1 ) ;
  2036. X            sprintf( szTemp, "Print error: %d %x", lErr, lErr ) ;
  2037. X            WinMessageBox( HWND_DESKTOP,
  2038. X                           hWnd, 
  2039. X                           szTemp,
  2040. X                           APP_NAME,
  2041. X                           0,
  2042. X                           MB_OK | MB_ICONEXCLAMATION ) ;
  2043. X             DosReleaseMutexSem( semPrint ) ;
  2044. X             break ;
  2045. X
  2046. X        case WM_USER_PRINT_QBUSY :
  2047. X
  2048. X            return( (MPARAM)DosRequestMutexSem( semPrint, SEM_IMMEDIATE_RETURN ) ) ;
  2049. X            
  2050. X        default : break ;
  2051. X        }
  2052. X        
  2053. X    return 0L ;
  2054. X    }
  2055. X
  2056. Xint SetupPrinter( HWND hwnd, char *szPrintername, PPRQINFO3 pinfPrinter )
  2057. X/*
  2058. X**  Set up the printer
  2059. X**
  2060. X*/
  2061. X    {
  2062. X    QPRINT qp ;
  2063. X    
  2064. X    HDC hdc ;
  2065. X        /* check that printer is still around .. */
  2066. X    if( FindPrinter( szPrintername, pinfPrinter ) != 0 ) return 0 ;
  2067. X    qp.piPrinter =  pinfPrinter  ;
  2068. X        /* get printer capabilities */
  2069. X    if( (hdc = OpenPrinterDC( WinQueryAnchorBlock( hwnd ), pinfPrinter, OD_INFO, NULL )) != DEV_ERROR ) {
  2070. X        DevQueryCaps( hdc, CAPS_TECHNOLOGY, (long)sizeof(prCaps)/sizeof(long), (PLONG)&prCaps ) ;
  2071. X        DevCloseDC( hdc ) ;
  2072. X        qp.xsize = (float)100.0* (float) prCaps.lWidth / (float) prCaps.lHorRes ; // in cm
  2073. X        qp.ysize = (float)100.0* (float) prCaps.lHeight / (float) prCaps.lVertRes ; // in cm
  2074. X        qp.xfrac = flXFrac ;
  2075. X        qp.yfrac = flYFrac ;
  2076. X        qp.szFilename[0] = 0 ;
  2077. X        szPrintFile[0] = 0 ;
  2078. X        qp.caps  = prCaps.lTech & (CAPS_TECH_VECTOR_PLOTTER|CAPS_TECH_POSTSCRIPT) ?
  2079. X                   QP_CAPS_FILE : QP_CAPS_NORMAL ;        
  2080. X        if( WinDlgBox( HWND_DESKTOP,
  2081. X                      hwnd,
  2082. X                      (PFNWP)QPrintDlgProc,
  2083. X                      0L,
  2084. X                      ID_QPRINT,
  2085. X                      &qp ) == DID_OK ) {
  2086. X            flXFrac = qp.xfrac ;
  2087. X            flYFrac = qp.yfrac ;
  2088. X            if( qp.caps & QP_CAPS_FILE ) {
  2089. X                if( qp.szFilename[0] != 0 ) strcpy( szPrintFile, qp.szFilename ) ;
  2090. X                }
  2091. X            return 1 ;
  2092. X            }    
  2093. X        }
  2094. X    return 0 ;
  2095. X    }
  2096. X
  2097. Xint SetPrinterMode( HWND hwnd, PPRQINFO3 pinfo )
  2098. X/*
  2099. X**  call up printer driver's own setup dialog box
  2100. X**
  2101. X**  returns :  -1 if error
  2102. X**              0 if no settable modes
  2103. X**              1 if OK
  2104. X*/
  2105. X    {
  2106. X    HAB hab ;
  2107. X    LONG lBytes ;
  2108. X    
  2109. X    hab = WinQueryAnchorBlock( hwnd ) ;
  2110. X    lBytes = DevPostDeviceModes( hab,
  2111. X                                 NULL,
  2112. X                                 devop.pszDriverName,
  2113. X                                 driv.szDeviceName,
  2114. X                                 NULL,
  2115. X                                 DPDM_POSTJOBPROP ) ;
  2116. X    if( lBytes > 0L ) {
  2117. X            /* if we have old pdriv data, and if its for the same printer,
  2118. X               keep it to retain user's current settings, else get new */
  2119. X        if( pdriv != NULL
  2120. X        && strcmp( pdriv->szDeviceName, pinfo->pDriverData->szDeviceName ) != 0 ) {
  2121. X            free( pdriv ) ;
  2122. X            pdriv = NULL ;
  2123. X            }
  2124. X        if( pdriv == NULL ) {
  2125. X            if( lBytes < pinfo->pDriverData->cb ) lBytes = pinfo->pDriverData->cb ;
  2126. X            pdriv = malloc( lBytes ) ;
  2127. X            memcpy( pdriv, pinfo->pDriverData, pinfo->pDriverData->cb ) ;
  2128. X            }
  2129. X        pdriv->szDeviceName[0] = '\0' ;  /* to check if 'cancel' selected */
  2130. X        lBytes = DevPostDeviceModes( hab,
  2131. X                                     pdriv,
  2132. X                                     devop.pszDriverName,
  2133. X                                     driv.szDeviceName,
  2134. X                                     NULL,
  2135. X                                     DPDM_POSTJOBPROP ) ;
  2136. X        if( pdriv->szDeviceName[0] == '\0' ) {  /* could be: 'cancel' selected */
  2137. X            lBytes = 0 ;
  2138. X            free(pdriv ) ;   /* is this right ???? */
  2139. X            pdriv = NULL ;
  2140. X            }
  2141. X        }
  2142. X    return ( (int) lBytes ) ;
  2143. X    }
  2144. X
  2145. Xvoid ThreadPrintPage( PRINTPARAMS *ptp )
  2146. X/*
  2147. X**  thread to set up printer DC and print page 
  2148. X**
  2149. X**  Input: THREADPARAMS *ptp -- pointer to thread data passed by beginthread
  2150. X**
  2151. X*/
  2152. X    {    
  2153. X    HAB         hab ;       // thread anchor block nandle
  2154. X    HDC         hdc ;       // printer device context handle
  2155. X    HPS         hps ;       // presentation space handle
  2156. X    SHORT       msgRet ;    // message posted prior to return (end of thread)
  2157. X    SIZEL       sizPage ;   // size of page for creation of presentation space
  2158. X    LONG        alPage[2] ; // actual size of printer page in pixels
  2159. X    RECTL       rectPage ;  // viewport on page into which we draw
  2160. X    LONG        lColors ;
  2161. X    char        *szPrintFile ;
  2162. X    
  2163. X    hab = WinInitialize( 0 ) ;
  2164. X    
  2165. X    szPrintFile = ptp->szPrintFile[0] == '\0' ? NULL : ptp->szPrintFile ;
  2166. X    
  2167. X    if( (hdc = OpenPrinterDC( hab, ptp->piPrinter, 0L, szPrintFile )) != DEV_ERROR ) {
  2168. X    
  2169. X            // create presentation space for printer
  2170. X
  2171. X       sizPage.cx = 0 ;
  2172. X       sizPage.cy = 0 ;
  2173. X       hps = GpiCreatePS( hab,
  2174. X                          hdc,
  2175. X                          &sizPage,
  2176. X                          PU_ARBITRARY | GPIF_DEFAULT | GPIT_MICRO | GPIA_ASSOC ) ;
  2177. X
  2178. X       DevQueryCaps( hdc, CAPS_WIDTH, 2L, alPage ) ;
  2179. X       DevQueryCaps( hdc, CAPS_PHYS_COLORS, 1L, &lColors ) ;
  2180. X       rectPage.xLeft = 0L ;
  2181. X       rectPage.xRight = alPage[0]*flXFrac ;
  2182. X       rectPage.yTop = alPage[1]*flYFrac ;//alPage[1]*(1.0-flYFrac) ;
  2183. X       rectPage.yBottom = 0L ; //  = alPage[1] ;
  2184. X       
  2185. X            // start printing
  2186. X                    
  2187. X        if( DevEscape( hdc, 
  2188. X                       DEVESC_STARTDOC,
  2189. X                       7L,
  2190. X                       APP_NAME,
  2191. X                       NULL,
  2192. X                       NULL ) != DEVESC_ERROR ) {
  2193. X
  2194. X            ScalePS( hps, &rectPage, 0 ) ;
  2195. X            PlotThings( hps, lColors ) ;            
  2196. X            DevEscape( hdc, DEVESC_ENDDOC, 0L, NULL, NULL, NULL ) ;
  2197. X            msgRet = WM_USER_PRINT_OK ;
  2198. X            }
  2199. X        else
  2200. X            msgRet = WM_USER_PRINT_ERROR ;
  2201. X        
  2202. X        GpiDestroyPS( hps ) ;
  2203. X        DevCloseDC( hdc ) ;
  2204. X        }
  2205. X    else
  2206. X        msgRet = WM_USER_DEV_ERROR ;
  2207. X        
  2208. X    DosEnterCritSec() ;
  2209. X    WinPostMsg( ptp->hwnd, msgRet, (MPARAM)WinGetLastError(hab), 0L ) ;
  2210. X    WinTerminate( hab ) ;
  2211. X    }
  2212. X
  2213. XHDC OpenPrinterDC( HAB hab, PPRQINFO3 pqinf, LONG lMode, char *szPrintFile )
  2214. X/*
  2215. X** get printer info from os2.ini and set up DC
  2216. X**
  2217. X** Input:  HAB hab  -- handle of anchor block of printing thread
  2218. X**         PPRQINFO3-- pointer to data of current selected printer
  2219. X**         LONG lMode -- mode in which device context is opened = OD_QUEUED, OD_DIRECT, OD_INFO
  2220. X**         char *szPrintFile -- name of file for printer output, NULL
  2221. X**                  if to printer (only used for devices that support file
  2222. X**                  output eg plotter, postscript)
  2223. X**
  2224. X** Return: HDC      -- handle of printer device context
  2225. X**                   = DEV_ERROR (=0) if error
  2226. X*/
  2227. X    {
  2228. X    CHAR   *pchDelimiter ;
  2229. X    LONG   lType ;
  2230. X    static CHAR   achPrinterData[256] ;
  2231. X
  2232. X    if( pqinf == NULL ) return DEV_ERROR ;
  2233. X        
  2234. X    strcpy( achPrinterData, pqinf->pszDriverName ) ;
  2235. X    achPrinterData[ strcspn(achPrinterData,".") ] = '\0' ;
  2236. X
  2237. X    devop.pszDriverName = achPrinterData ;
  2238. X    devop.pszLogAddress = pqinf->pszName ;
  2239. X
  2240. X    if( (pdriv != NULL ) ) devop.pdriv = pdriv ;
  2241. X    else devop.pdriv = pqinf->pDriverData ;
  2242. X
  2243. X    if( szPrintFile != NULL )  devop.pszLogAddress = szPrintFile ;
  2244. X        
  2245. X            // set data type to RAW
  2246. X            
  2247. X    devop.pszDataType = "PM_Q_RAW" ;
  2248. X    
  2249. X            // open device context
  2250. X    if( lMode != 0L ) 
  2251. X        lType = lMode ;
  2252. X    else
  2253. X        lType = (szPrintFile == NULL) ? OD_QUEUED: OD_DIRECT ;
  2254. X
  2255. X    return DevOpenDC( hab, //  WinQueryAnchorBlock( hwnd ),
  2256. X                      lType,
  2257. X                      "*",
  2258. X                      4L,
  2259. X                      (PDEVOPENDATA) &devop,
  2260. X                      NULLHANDLE ) ;
  2261. X    }
  2262. X
  2263. Xint FindPrinter( char *szName, PPRQINFO3 piPrinter )
  2264. X/*
  2265. X**  Find a valid printer
  2266. X*/
  2267. X    {
  2268. X    PPRQINFO3 pprq ;
  2269. X    int np ;
  2270. X    
  2271. X    if( *szName && (strcmp( szName, piPrinter->pszName ) == 0) ) return 0 ;
  2272. X    if( GetPrinters( &pprq , &np ) == 0 ) return 1 ;
  2273. X    for( --np; np>=0; np-- ) {
  2274. X        if( strcmp( szName, pprq[np].pszName ) == 0 ) {
  2275. X            memcpy( piPrinter, &pprq[np], sizeof( PRQINFO3 ) ) ;
  2276. X            free( pprq ) ;
  2277. X            return 0 ;
  2278. X            }
  2279. X        }
  2280. X    memcpy( piPrinter, &pprq[0], sizeof( PRQINFO3 ) ) ;
  2281. X    free( pprq ) ;
  2282. X    return 0 ;
  2283. X    }
  2284. END_OF_FILE
  2285.   if test 13292 -ne `wc -c <'gnuplot/os2/print.c'`; then
  2286.     echo shar: \"'gnuplot/os2/print.c'\" unpacked with wrong size!
  2287.   fi
  2288.   # end of 'gnuplot/os2/print.c'
  2289. fi
  2290. echo shar: End of archive 4 \(of 33\).
  2291. cp /dev/null ark4isdone
  2292. MISSING=""
  2293. 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
  2294.     if test ! -f ark${I}isdone ; then
  2295.     MISSING="${MISSING} ${I}"
  2296.     fi
  2297. done
  2298. if test "${MISSING}" = "" ; then
  2299.     echo You have unpacked all 33 archives.
  2300.     rm -f ark[1-9]isdone ark[1-9][0-9]isdone
  2301. else
  2302.     echo You still must unpack the following archives:
  2303.     echo "        " ${MISSING}
  2304. fi
  2305. exit 0
  2306. exit 0 # Just in case...
  2307.