home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / answers / graphics / gnuplot-faq / text0000.txt < prev   
Encoding:
Text File  |  1993-12-19  |  26.5 KB  |  707 lines

  1. Archive-name: graphics/gnuplot-faq
  2. Version: $Header: comp-graphics-gnuplot,v 1.31 93/11/25 10:27:36 ig25 Exp $
  3.  
  4. This is the FAQ (Frequently Answered Questions) list of the
  5. comp.graphics.gnuplot newsgroup, which discusses the gnuplot program for
  6. plotting 2D - and 3D - graphs.
  7.  
  8. Most of the information in this document came from public discussion on
  9. comp.graphics.gnuplot; quotations are believed to be in the public
  10. domain.
  11.  
  12. Here's a list of the questions.  If you are looking for the answer for a
  13. specific question, look for the string Qx.x:  at the beginning of a line,
  14. with x.x being the question number.
  15.  
  16. Questions:
  17.  
  18. Section 0: Meta - Questions
  19. Q0.1: Where do I get this document?
  20. Q0.2: Where do I send comments about this document?
  21.  
  22. Section 1: General Information
  23. Q1.1: What is gnuplot?
  24. Q1.2: How did it come about and why is it called gnuplot?
  25. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  26. Q1.4: What does gnuplot offer?
  27. Q1.5: Is gnuplot suitable for batch processing?
  28. Q1.6: Can I run gnuplot on my computer?
  29.  
  30. Section 2: Setting it up
  31. Q2.1: What is the current version of gnuplot?
  32. Q2.2: Where can I get gnuplot?
  33. Q2.3: How do I get gnuplot to compile on my system?
  34. Q2.4: What documentation is there, and how do I get it?
  35.  
  36. Section 3: Working with it
  37. Q3.1: How do I get help?
  38. Q3.2: How do I print out my graphs?
  39. Q3.3: How do I include my graphs in <word processor>?
  40.  
  41. Section 4: Wanted features in gnuplot
  42. Q4.1: Does gnuplot have hidden line removal?
  43. Q4.2: Does gnuplot support bar-charts/histograms/boxes?
  44. Q4.3: Does gnuplot support multiple y-axes on a single plot?
  45. Q4.4: Can I put multiple plots on a single page?
  46. Q4.5: Can I put both data files and commands into a single file?
  47. Q4.6: Can I put Greek letters and super/subscripts into my labels?
  48. Q4.7: Can I do 1:1 scaling of axes?
  49. Q4.8: Can I put tic marks for x and y axes into 3d plots?
  50.  
  51. Section 5: Miscellaneous
  52. Q5.1: I've found a bug, what do I do?
  53. Q5.2: Can I use gnuplot routines for my own programs?
  54. Q5.3: What extensions have people made to gnuplot?  Where can I get them?
  55. Q5.4: Can I do heavy - duty data processing with gnuplot?
  56. Q5.5: I have ported gnuplot to another system, or patched it.  What do I do?
  57.  
  58. Section 6: Making life easier
  59. Q6.1: How do I plot two functions in non - overlapping regions?
  60. Q6.2: How do I run my data through a filter before plotting?
  61. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  62. Q6.4: How do I save and restore my settings?
  63. Q6.5: How do I plot lines (not grids) using splot?
  64. Q6.6: How do I plot a function f(x,y) which is bounded by other
  65.     functions in the x-y plain?
  66.  
  67. Section 7: Known Problems
  68.  
  69. Q7.1: Gnuplot is not plotting any points under X11!  How come?
  70. Q7.2: My isoline data generated by a Fortran program is not handled
  71.         correctly.  What can I do?
  72. Q7.3: Why does gnuplot ignore my very small numbers?
  73. Q7.4:  Gnuplot is plotting nothing when run via gnuplot <filename>!
  74.     What can I do?
  75. Q7.5: My formulas are giving me nonsense results!  What's going on?
  76.  
  77. Section 8: Credits
  78.  
  79. Questions and Answers:
  80.  
  81. Section 0: Meta - Questions.
  82.  
  83. Q0.1: Where do I get this document?
  84.  
  85. This document is posted about once every two weeks to the newsgroups
  86. comp.graphics.gnuplot, comp.answers and news.answers.  Like many other
  87. FAQ's, it is available via anonymous ftp from rtfm.mit.edu [18.70.0.209]
  88. from the directory /pub/usenet/news.answers under the Archive-Name:  at
  89. the top of the article, graphics/gnuplot-faq, and from the directory
  90. /pub/usenet/comp.graphics.gnuplot, as well as via gopher from
  91. gopher.univ-lyon1.fr [134.214.100.25].
  92.  
  93. Q0.2: Where do I send comments about this document?
  94.  
  95. Send comments, suggestions etc. via e-mail to Thomas Koenig,
  96. ig25@rz.uni-karlsruhe.de or ig25@dkauni2.bitnet.
  97.  
  98. Section 1: General Information
  99.  
  100. Q1.1: What is gnuplot?
  101.  
  102. Gnuplot is a command-driven interactive function plotting program.  It
  103. can be used to plot functions and data points in both two- and three-
  104. dimensional plots in many different formats, and will accommodate many
  105. of the needs of today's scientists for graphic data representation.
  106. Gnuplot is copyrighted, but freely distributable; you don't have to pay
  107. for it.
  108.  
  109. Q1.2: How did it come about and why is it called gnuplot?
  110.  
  111. The authors of gnuplot are:
  112.  
  113. Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell,
  114. Gershon Elber, Alexander Woo and many others.
  115.  
  116. The following quote comes from Thomas Williams:
  117.  
  118. I was taking a differential equation class and Colin was taking
  119. Electromagnetics, we both thought it'd be helpful to visualize the
  120. mathematics behind them.  We were both working as sys admin for an EE
  121. VLSI lab, so we had the graphics terminals and the time to do some
  122. coding.  The posting was better received than we expected, and prompted
  123. us to add some, albeit lame, support for file data.
  124.  
  125. Any reference to GNUplot is incorrect.  The real name of the program
  126. is "gnuplot".  You see people use "Gnuplot" quite a bit because many
  127. of us have an aversion to starting a sentence with a lower case
  128. letter, even in the case of proper nouns and titles.  Gnuplot is not
  129. related to the GNU project or the FSF in any but the most peripheral
  130. sense.  Our software was designed completely independently and the
  131. name "gnuplot" was actually a compromise.  I wanted to call it
  132. "llamaplot" and Colin wanted to call it "nplot."  We agreed that
  133. "newplot" was acceptable but, we then discovered that there was an
  134. absolutely ghastly pascal program of that name that the Computer
  135. Science Dept. occasionally used.  I decided that "gnuplot" would make
  136. a nice pun and after a fashion Colin agreed.
  137.  
  138. Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
  139.  
  140. Gnuplot is neither written nor maintained by the FSF.  It is not covered
  141. by the General Public License, either.
  142.  
  143. However, the FSF has decided to distribute gnuplot as part of the GNU
  144. system, because it is useful, redistributable software.
  145.  
  146. Q1.4: What does gnuplot offer?
  147.  
  148. - Plotting of two - dimensional functions and data points in many different
  149.   styles (points, lines, error bars)
  150. - plotting of three - dimensional data points and surfaces in many
  151.   different styles (contour plot, mesh).
  152. - support for complex arithmetic
  153. - self - defined functions
  154. - support for a large number of operating systems, graphics file formats
  155.   and devices
  156. - extensive on-line help
  157. - labels for title, axes, data points
  158. - command line editing and history on most platforms
  159.  
  160. Q1.5: Is gnuplot suitable for batch processing?
  161.  
  162. Yes.  You can read in files from the command line, or you can redirect
  163. your standard input to read from a file.  Both data and command files
  164. can be generated automatically, from data acquisition programs or
  165. whatever else you use.
  166.  
  167. Q1.6: Can I run gnuplot on my computer?
  168.  
  169. Gnuplot is available for a number of platforms.  These are:  Unix (X11
  170. and NeXTSTEP), VAX/VMS, OS/2, MS-DOS, Amiga, MS-Windows, OS-9/68k, Atari
  171. ST and the Macintosh.  Modifications for NEC PC-9801 are said to exist
  172. (where?).
  173.  
  174. Section 2: Setting it up
  175.  
  176. Q2.1: What is the current version of gnuplot?
  177.  
  178. The current version of gnuplot is 3.5, which is a bugfix release over
  179. 3.4.
  180.  
  181. Q2.2: Where can I get gnuplot?
  182.  
  183. [This information may be dated, due to the release of gnuplot 3.5.
  184. Please report any inaccuracies, if you find them.  Ed.]
  185.  
  186. All of the later addresses refer to ftp sites.  Please note that it is
  187. preferable for you to use the symbolic name, rather than the IP address
  188. given in brackets, because that address is much more subject to change.
  189.  
  190. The official distribution site for the gnuplot source is ftp.dartmouth.edu
  191. [129.170.16.4], the file is called /pub/gnuplot/gnuplot.3.5.tar.Z.
  192. Official mirrors of that distribution are (for Australia)
  193. monu1.cc.monash.edu.au [130.194.1.101] and (for Europe) irisa.irisa.fr
  194. [131.254.254.2].  You can also get it from your friendly neighbourhood
  195. comp.sources.misc archive.
  196.  
  197. MS-DOS and MS-Windows binaries are available from oak.oakland.edu (North
  198. America) [141.210.10.117] as pub/msdos/plot/gpt35*.zip, garbo.uwasa.fi
  199. (Europe) [128.214.87.1] as /pc/plot/gpt35*.zip and archie.au (Australia)
  200. [139.130.4.6] as micros/pc/oak/plot/gpt35*.zip.  The files are:
  201. gpt35doc.zip, gpt35exe.zip, gpt35src.zip and gpt35win.zip.
  202.  
  203. OS/2 2.x binaries are at ftp-os2.nmsu.edu [128.123.35.151], in
  204. /os2/2.x/unix/gnu/gplt35.zip .
  205.  
  206. Amiga sources and binaries are available from ftp.wustl.edu
  207. [128.252.135.4] as /pub/aminet/util/gnu/gnuplot-3.5.lha; there are
  208. numerous mirrors of this distribution, for example ftp.uni-kl.de,
  209. oes.orst.edu or ftp.luth.se.
  210.  
  211. The NeXTSTEP front end can be found at sonata.cc.purdue.edu and
  212. cs.orst.edu.
  213.  
  214. A version for OS-9/68K can be found at cabrales.cs.wisc.edu
  215. [128.105.36.20] as /pub/OSK/GRAPHICS/gnuplot32x.tar.Z; it includes both
  216. X-Windows and non - X-windows versions.
  217.  
  218. A version of gnuplot for the Macintosh is included in the gpcontrb
  219. file, or can be found at wuarchive.wustl.edu [128.252.135.4], in
  220. edu/math/mac/graphingAids, as MacGnuPlot3.2.sea.hqx and
  221. MacGnuPlotPackage3.2.sea.hqx.
  222.  
  223. People without ftp access can use an ftp-mail server; send a message
  224. saying 'help' to bitftp@pucc.bitnet (for BITNET only) or to
  225. ftpmail@ftp.dartmouth.edu.
  226.  
  227. For a uuencoded copy of the the gnuplot sources (compressed tar file),
  228. send this as the body of a message to ftpmail@ftp.dartmouth.edu:
  229.  
  230.         open
  231.         cd pub/gnuplot
  232.         mode binary
  233.         get gnuplot3.5.tar.Z
  234.         quit
  235.  
  236. If you have some problem, you might need to stick
  237.  
  238. reply-to  <your-email-address-here>
  239.  
  240. before all the above.
  241.  
  242. It is a good idea to look for a nearby ftp site when downloading things.
  243. You can use archie for this.  See if an archie client is installed at
  244. your system (by simply typing archie at the command prompt), or send
  245. mail to archie@sura.net with the word 'help' in both the subject line
  246. and the body of the mail.  However, be aware that the version you find
  247. at a near ftp site may well be out of date; check the last modification
  248. date and the number of bytes against the newest release at one of the
  249. official servers.
  250.  
  251. Q2.3: How do I get gnuplot to compile on my system?
  252.  
  253. As you would any other installation.  Read the files README and
  254. README.Install, edit the Makefile according to taste, and run make or
  255. whatever is suitable for your operating system.
  256.  
  257. If you get a complaint about a missing file libplot.a or something
  258. similar when building gnuplot for x11, remove -DUNIXPLOT from the
  259. TERMFLAGS= line, remove -lplot from the LIBS= line and run again.  If
  260. you are making x11 on a sun, type 'make x11_sun'.
  261.  
  262. Q2.4: What documentation is there, and how do I get it?
  263.  
  264. The documentation is included in the source distribution.  Look at the
  265. docs subdirectory, where you'll find
  266.  
  267.  - a Unix man page, which says how to start gnuplot
  268.  - a help file, which also can be printed as a manual
  269.  - a tutorial on using gnuplot with LaTeX
  270.  - a quick reference summary sheet for TeX only
  271.  
  272. PostScript copies of the documentation can be ftp'd from ftp.dartmouth.edu,
  273. in pub/gnuplot, as manual.ps.Z and tutorial.ps.Z
  274.  
  275.  
  276. Section 3: Working with it
  277.  
  278. Q3.1: How do I get help?
  279.  
  280. Give the 'help' command at the initial prompt.  After that, keep
  281. looking through the keywords.  Good starting points are 'plot'
  282. and 'set'.
  283.  
  284. Read the manual, if you have it.
  285.  
  286. Look through the demo subdirectory; it should give you some ideas.
  287.  
  288. Ask your colleagues, the system administrator or the person who set
  289. up gnuplot.
  290.  
  291. Post a question to comp.graphics.gnuplot or send mail to the gatewayed
  292. mailing list info-gnuplot@dartmouth.edu.  If you want to subscribe to
  293. the mailing list, send mail to info-gnuplot-request@dartmouth.edu,
  294. but please don't do this if you can get comp.graphics.gnuplot directly.
  295. If you pose a question there, it is considered good form to solicit
  296. e-mail replies and post a summary.
  297.  
  298. Q3.2: How do I print out my graphs?
  299.  
  300. The kind of output produced is determined by the 'set terminal' command;
  301. for example, 'set terminal postscript' will produce the graph in
  302. PostScript format.  Output can be redirected using the 'set output'
  303. command.
  304.  
  305. As an example, the following prints out a graph of sin(x) on a Unix
  306. machine running X - Windows.
  307.  
  308. gnuplot> plot [-6:6] sin(x)
  309. gnuplot> set terminal postscript
  310. Terminal type set to 'postscript'
  311. Options are 'landscape monochrome "Courier" 14'
  312. gnuplot> set output "sin.ps"
  313. gnuplot> replot
  314. gnuplot> set output                      # set output back to default
  315. gnuplot> set terminal x11                # ditto for terminal type
  316. gnuplot> ! lp -ops sin.ps                # print ps - File (site dependent)
  317. request id is lprint-3433 (standard input)
  318. lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
  319. !
  320. gnuplot>
  321.  
  322. Q3.3: How do I include my graphs in <word processor>?
  323.  
  324. Basically, you save your plot to a file in a format your word processor
  325. can understand (using "set term" and "set output", see above), and then
  326. you read in the plot from your word processor.
  327.  
  328. Details depend on the kind of word processor you use; use "set term" to
  329. get a list of available file formats.
  330.  
  331. Many word processors can use Encapsulated PostScript for graphs.  This
  332. can be generated by the 'set terminal postscript eps' command.  Most
  333. MS-DOS word processors understand HPGL (terminal type hpgl).
  334.  
  335. With TeX, it depends on what you use to print your dvi files.  If you
  336. use dvips or dvi2ps, you can use Encapsulated PostScript.  For
  337. emTeX (popular for MS-DOS), you can use emTeX, otherwise use the
  338. LaTeX terminal type, which generates a picture environment.
  339.  
  340. If nothing else helps, try using the pgm or ppm format and converting it
  341. to a bitmap format your favourite word processor can understand.  An
  342. invaluable tool for this is Jef Poskanzer's PBMPLUS package.
  343.  
  344.  
  345. Section 4:  Wanted features in gnuplot
  346.  
  347. Q4.1: Does gnuplot have hidden line removal?
  348.  
  349. Version 3.5 supports hidden line removal on all platforms except MS-DOS;
  350. use the command
  351.  
  352.     set hidden3d
  353.  
  354. If someone can solve the 64K DGROUP memory problem, gnuplot would
  355. support hidden line removal on MS-DOS as well.  Version 3.2 supports
  356. limited hidden line removal.
  357.  
  358. Q4.2: Does gnuplot support bar-charts/histograms/boxes?
  359.  
  360. As of version 3.4, it does.
  361.  
  362. Q4.3: Does gnuplot support multiple y-axes on a single plot?
  363.  
  364. No.
  365.  
  366. Q4.4: Can I put multiple plots on a single page?
  367.  
  368. Look at the rosendorf subdirectory in the gpcontrb distribution;
  369. if you are using PostScript output, check out mpage, which can
  370. be ftp'd from
  371.  
  372. ftp.eng.umd.edu:pub/misc/mpage-2.tar.Z
  373.  
  374. Q4.5: Can I put both data files and commands into a single file?
  375.  
  376. Alex Woo has just put out an unofficial modification for beta test,
  377. which does exactly this.  Otherwise, you might consider using Fudgit,
  378. which can do it.
  379.  
  380. Q4.6: Can I put Greek letters and super/subscripts into my labels?
  381.  
  382. You might try using the LaTeX terminal type and putting text like
  383. \alpha_{3} into it.
  384.  
  385. If you use PostScript output, you might find something in the Green
  386. subdirectory of the gpcontrb file (see Q5.3).
  387.  
  388. David Denholm has written a PostScript terminal which allows for
  389. super/and subscripts, such as a^x or { Symbol a }.  Ftp to
  390. sotona.phys.soton.ac.uk and get divpost34.trm.
  391.  
  392. Q4.7: Can I do 1:1 scaling of axes?
  393.  
  394. Not easily.
  395.  
  396. Q4.8: Can I put tic marks for x and y axes into 3d plots?
  397.  
  398. In version 3.5, you can.
  399.  
  400. Section 5:  Miscellaneous
  401.  
  402. Q5.1: I've found a bug, what do I do?
  403.  
  404. First, try to see whether it actually is a bug, or whether it is a
  405. feature which may be turned off by some obscure set - command.
  406.  
  407. Next, see wether you have an old version of gnuplot; if you do, chances
  408. are the bug has been fixed in a newer release.
  409.  
  410. If, after checking these things, you still are convinced that there is a
  411. bug, proceed as follows.  If you have a fairly general sort of bug
  412. report, posting to comp.graphics.gnuplot is probably the way to go.  If
  413. you have investigated a problem in detail, especially if you have a
  414. context diff that fixes the problem, please e-email a report to
  415. bug-gnuplot@dartmouth.edu.  The bug-gnuplot list is for reporting and
  416. collecting bug fixes, the comp.graphics.gnuplot mailing list will be
  417. more help for finding work arounds or actually solving gnuplot related
  418. problems.  If you do send in a bug report, be sure and include the
  419. version of gnuplot (including patchlevel), terminal driver, operating
  420. system, an exact description of the bug and input which can reproduce
  421. the bug.  Also, any context diffs should be referenced against the
  422. latest official version of gnuplot if at all possible.
  423.  
  424. Q5.2: Can I use gnuplot routines for my own programs?
  425.  
  426. Yes.  John Campbell <jdc@nauvax.ucc.nau.edu> has written gplotlib, a
  427. version of gnuplot as C subroutines callable from a C program.  This is
  428. available as gplotlib.tar.Z on the machine ftp.nau.edu in the directory
  429. /pub/gplotlib.tar.Z.  It is also included in the gpcontrb distribution
  430. in the campbell subdirectory.
  431.  
  432. Q5.3: What extensions have people made to gnuplot?  Where can I get them?
  433.  
  434. [This is still hazy; please check this out and see whether it is correct.
  435. Ed.]
  436.  
  437. Extensions have been put into the file gpcontrb.tar.Z, which is
  438. available with the 3.5 release, from the same places you can
  439. download the main distribution from.
  440.  
  441. Note that it has a size of 3.5 megabytes.
  442.  
  443. It contains the following subdirectories:
  444.  
  445. bigler subdirectory:
  446.         From: bigler@cicg-calcul.grenet.fr
  447.         Subject: Multiple plots from a Fortran program
  448. budelsky subdirectory:
  449.         From: budelsky@haegar.ikp.uni-koeln.de
  450.         Subject: This is the information file for porting gnuplot 3.2
  451.                 to OS-9/68000
  452. byrne subdirectory:
  453.         From: "Margaret R. Byrne" <mrb2j@kelvin.seas.virginia.edu>
  454.         Subject: congp3d3 preprocessor to draw contour plots on
  455.                 irregular regions.
  456. clark subdirectory:
  457.         From: Michael Clark <clarkmp@prony.Colorado.EDU>
  458.         Subject: data filtering: adds point_skip & point_offs
  459. clift subdirectory:
  460.         From: ssclift@neumann.uwaterloo.ca (Simon Clift)
  461.         Subject: Re: Running gnuplot from Fortran, (and C)
  462. green subdirectory:
  463.         From: Roque Donizete de Oliveira <oliveria@engin.umich.edu>
  464.         Subject: PostScript Greek symbols in gnuplot, new prologue
  465. hanna subdirectory:
  466.         From: gregor@kafka.saic.com (gregg hanna)
  467.         Subject: x11-library mode, gnulib_x11.[c,h], xlibtest.c,makefile.xlib
  468. klosowski subdirectory:
  469.         From:   Carsten Steger <stegerc@informatik.tu-muenchen.de>
  470.         Subject: New file "klein.dat"
  471.         From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
  472.         Subject: calling gnuplot from Fortran
  473. kocaturk subdirectory:
  474.         From: mustafa@seas.smu.edu (Mustafa Kocaturk)
  475.         Subject: Histograms in gnuplot
  476. richardson subdirectory:
  477.         From: amr@chiton.ucsd.edu (Tony Richardson)
  478.         Subject: Programmatic control of gnuplot from Unix
  479. rosendorf subdirectory:
  480.         From:  prf@jprix.che.wisc.edu
  481.         Subject: Multiple plots on a page
  482. vanzandt subdirectory:
  483.         From: James R. Van Zandt <jrv@mitre-bedford.ARPA>
  484.         Subject: Spline generating program
  485. white subdirectory:
  486.         From: gwhite@bionet.bio.dfo.ca
  487.         Subject: gnuplot 3.2 for Titan 3000
  488. woo subdirectory:
  489.         From: "Alex Woo" <woo@ra-next.arc.nasa.gov>
  490.         Subject: two additional title lines and fixes to errorbar style
  491. yamamoto subdirectory:
  492.         From: "NOBORU YAMAMOTO     " <sun!kekvax.kek.jp!YAMAMOTO@pixar.com>
  493.         Subject: Re: gnuplot on Apple Macintosh, "diff -c" of version 3.0
  494.                 (now includes binaries)
  495. castro subdirectory:
  496.         From: maurice@bruce.cs.monash.edu.au (Maurice Castro)
  497.         Subject: Controlling gnuplot from another Windows program
  498. grammes subdirectory:
  499.         From: ph12hucg@rz.uni-sb.de (Carsten Grammes)
  500.         Subject: Nonlinear least squares fit mechanism
  501. henke subdirectory:
  502.         From: mgr@asgard.bo.open.de (Lars Hanke)
  503.         Subject: Re: Changes to gnuplot 3.3b9
  504. walton subdirectory:
  505.         From: dwalton@athena.mit.edu (Dave Walton)
  506.         Subject: Inter Process Communication stuff
  507.  
  508. Q5.4: Can I do heavy - duty data processing with gnuplot?
  509.  
  510. Gnuplot alone is not suited very well for this.  One thing you might try
  511. is fudgit, an interactive multi-purpose fitting program written by
  512. Martin-D. Lacasse (isaac@frodo.physics.mcgill.ca).  It can use gnuplot
  513. as its graphics back end and is available from ftp.physics.mcgill.ca
  514. in /pub/Fudgit/fudgit_2.33.tar.Z [132.206.9.13], and from the main Linux
  515. server, tsx-11.mit.edu [18.172.1.2] and its numerous mirrors around the
  516. world as /pub/linux/sources/usr.bin/fudgit-2.33.tar.z.  Versions are
  517. available for AIX, Data General, HP-UX, IRIX 4, Linux, NeXT, Sun3, Sun4,
  518. Ultrix, OS/2 and MS-DOS.  The MS-DOS version is available on simtel20
  519. mirrors (simtel20 itself has closed down) in the "math" subdirectory as
  520. fudg_231.zip.
  521.  
  522. Carsten Grammes has written a fitting program which goes together
  523. with gnuplot; it is called gnufit and is available from ftp.uni-kl.de
  524. [131.246.9.95] from the directory /pub/gnu/gnufit as gnufit10.tar.gz
  525. or gft10dos.zip.
  526.  
  527. Michael Courtney has written a program called lsqrft, which uses
  528. the Levenberg - Marquardt - Algorithm for fitting data to a function.
  529. It is avialiable from ftp.cdrom.com as /pub/os2/2_x/unix/lsqrft13.zip;
  530. sources, which should compile on Unix, and executables for MS-DOS and
  531. OS/2 2.x are included.  There is an interface to the OS/2 presentation
  532. manager.
  533.  
  534. You might also want to look at the applications developed by the
  535. Software Tools Group (STG) at the National Center for Supercomputing
  536. Applications.  Ftp to ftp.ncsa.uiuc.edu [141.142.20.50] and get the
  537. file README.BROCHURE for more information.
  538.  
  539. Q5.5: I have ported gnuplot to another system, or patched it.  What do I do?
  540.  
  541. If your patch is small, mail it to bug-gnuplot@dartmouth.edu, with
  542. a thorough description of what the patch is supposed to do, which version
  543. of gnuplot it is relative to, etc.  Please don't mail it to the FAQ
  544. maintainer.
  545.  
  546. If your modifications are extensive (such as a port to another system),
  547. upload your modifications to dartmouth.edu:/pub/dropoff.  Please drop a
  548. note to David.Kotz@dartmouth.edu, the maintainer of the gnuplot
  549. subdirectory there, plus a note to bug-gnuplot@dartmouth.edu.
  550.  
  551.  
  552. Section 6: Making life easier
  553.  
  554. Q6.1: How do I plot two functions in non - overlapping regions?
  555.  
  556. Use a parametric plot.  An example:
  557.  
  558. set parametric
  559. a=1
  560. b=3
  561. c=2
  562. d=4
  563. x1(t) = a+(b-a)*t
  564. x2(t) = c+(d-c)*t
  565. f1(x) = sin(x)
  566. f2(x) = x**2/8
  567. plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
  568.  
  569. Q6.2: How do I run my data through a filter before plotting?
  570.  
  571. If your system supports the popen() - function, as Unix does, you should
  572. be able to run the output through another process such as a short awk
  573. program (use the "help plot datafile" command for an example).
  574. Unfortunately, in 3.2, there is a rather short limitation on the maximum
  575. argument length, so your command line may be truncated (usually, this
  576. will mean that awk cannot find the filename).  Also, you may need to
  577. escape the $ - characters in your awk programs.
  578.  
  579. As of version 3.4, gnuplot includes the thru - keyword for the plot
  580. command for running data files through a gnuplot - defined function.
  581.  
  582. Q6.3: How do I make it easier to use gnuplot with LaTeX?
  583.  
  584. There is a set of LaTeX macros and shell scripts that are meant to make
  585. your life easier when using gnuplot with LaTeX.  This package can be
  586. found on ftp.dartmouth.edu [129.170.16.54] in pub/gnuplot/latex.shar, by
  587. David Kotz.  For example, the program "plotskel" can turn a
  588. gnuplot-output file plot.tex into a skeleton file skel.tex, that has the
  589. same size as the original plot but contains no graph.  With the right
  590. macros, the skeleton can be used for preliminary LaTeX passes, reserving
  591. the full graph for later passes, saving tremendous amounts of time.
  592.  
  593. Q6.4: How do I save and restore my settings?
  594.  
  595. Use the "save" and "load" commands for this; see "help save" and
  596. "help load" for details.
  597.  
  598. Q6.5: How do I plot lines (not grids) using splot?
  599.  
  600. If the data in a data file for splot is arranged in such a way that each
  601. one has the same number of data points (using blank lines as delimiters,
  602. as usual), splot will plot the data with a grid.  If you want to plot
  603. just lines, use a different number of data entries (you can do this by
  604. doubling the last data point, for example).  Don't forget to set
  605. parametric mode, of course.
  606.  
  607.  
  608. Q6.6: How do I plot a function f(x,y) which is bounded by other
  609.     functions in the x-y plain?
  610.  
  611. An example:
  612.  
  613. f(x,y) = x**2 + y **2
  614. x(u) = 3*u
  615. yu(x) = x**2
  616. yl(x) = -x**2
  617. set parametric
  618. set cont
  619. splot [0:1] [0:1] u,yl(x(u))+(yu(x(u)) - yl(x(u)))*v,\
  620.     f(x(u), (yu(x(u)) - yl(x(u)))*v)
  621.  
  622. Section 7: Known problems
  623.  
  624. Q7.1: Gnuplot is not plotting any points under X11!  How come?
  625.  
  626. Very probably, you still are using an old version of gnuplot_x11.
  627. Remove that, then do a full installation.
  628.  
  629. Q7.2: My isoline data generated by a Fortran program is not handled
  630.         correctly.  What can I do?
  631.  
  632. One known cause for this is the use of list - directed output (as in
  633. WRITE (10,*) for generating blank lines.  Fortran uses ASA carriage
  634. control characters, and for list - directed output this results
  635. in a space being output before the newline.  Gnuplot does not like
  636. this.
  637.  
  638. The solution is to generate blank lines using formatted output, as in
  639. WRITE (10,'()').
  640.  
  641. If you use carriage return files in VMS Fortran, you may have to open
  642. the file with OPEN(...,CARRIAGECONTROL='LIST') or convert it using
  643. the DECUS utility ATTRIB.EXE:
  644.  
  645. VMS> ATTRIB/RATTRIB=IMPLIED FOR010.DAT
  646.  
  647. Q7.3: Why does gnuplot ignore my very small numbers?
  648.  
  649. Gnuplot treats all numbers less than 1e-08 as zero, by default.  Thus,
  650. if you are trying to plot a collection of very small numbers, they may
  651. be plotted as zero.  Worse, if you're plotting on a log scale, they will
  652. be off scale.  Or, if the whole set of numbers is "zero", your range may
  653. be considered empty:
  654.  
  655. gnuplot> plot 'test1'
  656. Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1]
  657. gnuplot> set yrange [4e-19:3e-11]
  658. gnuplot> plot 'test1'
  659.                      ^
  660.          y range is less than `zero`
  661.  
  662. The solution is to change gnuplot's idea of "zero":
  663.  
  664. gnuplot> set zero 1e-20
  665.  
  666. For more information,
  667.  
  668. gnuplot> help set zero
  669.  
  670. Q7.4:  Gnuplot is plotting nothing when run via gnuplot <filename>!
  671.     What can I do?
  672.  
  673. Put a
  674.  
  675. pause -1
  676.  
  677. after the plot command in the file.
  678.  
  679. Q7.5: My formulas are giving me nonsense results!  What's going on?
  680.  
  681. Gnuplot does integer, and not floating point, arithmetic on integer
  682. expressions.  For example, the expression 1/3 evaluates to zero.  If you
  683. want floating point expressions, supply trailing dots for your floating
  684. point numbers.
  685.  
  686. Example:
  687.  
  688. gnuplot> print 1/3
  689.     0
  690. gnuplot> print 1./3.
  691.     0.333333
  692.  
  693. This way of evaluating integer expressions is shared by both C and
  694. Fortran.
  695.  
  696. Section 8: Credits
  697.  
  698. This list was initially compiled by John Fletcher with contributions
  699. from Russell Lang, John Campbell, David Kotz, Rob Cunningham,
  700. Daniel Lewart and Alex Woo.  Reworked by Thomas Koenig from a draft by
  701. Alex Woo, with corrections and additions from Alex Woo, John Campbell,
  702. Russell Lang, David Kotz and many corrections from Daniel Lewart.
  703. -- 
  704. Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet
  705. The joy of engineering is to find a straight line on a double
  706. logarithmic diagram.
  707.