home *** CD-ROM | disk | FTP | other *** search
- Archive-name: graphics/gnuplot-faq
- Version: $Header: comp-graphics-gnuplot,v 1.31 93/11/25 10:27:36 ig25 Exp $
-
- This is the FAQ (Frequently Answered Questions) list of the
- comp.graphics.gnuplot newsgroup, which discusses the gnuplot program for
- plotting 2D - and 3D - graphs.
-
- Most of the information in this document came from public discussion on
- comp.graphics.gnuplot; quotations are believed to be in the public
- domain.
-
- Here's a list of the questions. If you are looking for the answer for a
- specific question, look for the string Qx.x: at the beginning of a line,
- with x.x being the question number.
-
- Questions:
-
- Section 0: Meta - Questions
- Q0.1: Where do I get this document?
- Q0.2: Where do I send comments about this document?
-
- Section 1: General Information
- Q1.1: What is gnuplot?
- Q1.2: How did it come about and why is it called gnuplot?
- Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
- Q1.4: What does gnuplot offer?
- Q1.5: Is gnuplot suitable for batch processing?
- Q1.6: Can I run gnuplot on my computer?
-
- Section 2: Setting it up
- Q2.1: What is the current version of gnuplot?
- Q2.2: Where can I get gnuplot?
- Q2.3: How do I get gnuplot to compile on my system?
- Q2.4: What documentation is there, and how do I get it?
-
- Section 3: Working with it
- Q3.1: How do I get help?
- Q3.2: How do I print out my graphs?
- Q3.3: How do I include my graphs in <word processor>?
-
- Section 4: Wanted features in gnuplot
- Q4.1: Does gnuplot have hidden line removal?
- Q4.2: Does gnuplot support bar-charts/histograms/boxes?
- Q4.3: Does gnuplot support multiple y-axes on a single plot?
- Q4.4: Can I put multiple plots on a single page?
- Q4.5: Can I put both data files and commands into a single file?
- Q4.6: Can I put Greek letters and super/subscripts into my labels?
- Q4.7: Can I do 1:1 scaling of axes?
- Q4.8: Can I put tic marks for x and y axes into 3d plots?
-
- Section 5: Miscellaneous
- Q5.1: I've found a bug, what do I do?
- Q5.2: Can I use gnuplot routines for my own programs?
- Q5.3: What extensions have people made to gnuplot? Where can I get them?
- Q5.4: Can I do heavy - duty data processing with gnuplot?
- Q5.5: I have ported gnuplot to another system, or patched it. What do I do?
-
- Section 6: Making life easier
- Q6.1: How do I plot two functions in non - overlapping regions?
- Q6.2: How do I run my data through a filter before plotting?
- Q6.3: How do I make it easier to use gnuplot with LaTeX?
- Q6.4: How do I save and restore my settings?
- Q6.5: How do I plot lines (not grids) using splot?
- Q6.6: How do I plot a function f(x,y) which is bounded by other
- functions in the x-y plain?
-
- Section 7: Known Problems
-
- Q7.1: Gnuplot is not plotting any points under X11! How come?
- Q7.2: My isoline data generated by a Fortran program is not handled
- correctly. What can I do?
- Q7.3: Why does gnuplot ignore my very small numbers?
- Q7.4: Gnuplot is plotting nothing when run via gnuplot <filename>!
- What can I do?
- Q7.5: My formulas are giving me nonsense results! What's going on?
-
- Section 8: Credits
-
- Questions and Answers:
-
- Section 0: Meta - Questions.
-
- Q0.1: Where do I get this document?
-
- This document is posted about once every two weeks to the newsgroups
- comp.graphics.gnuplot, comp.answers and news.answers. Like many other
- FAQ's, it is available via anonymous ftp from rtfm.mit.edu [18.70.0.209]
- from the directory /pub/usenet/news.answers under the Archive-Name: at
- the top of the article, graphics/gnuplot-faq, and from the directory
- /pub/usenet/comp.graphics.gnuplot, as well as via gopher from
- gopher.univ-lyon1.fr [134.214.100.25].
-
- Q0.2: Where do I send comments about this document?
-
- Send comments, suggestions etc. via e-mail to Thomas Koenig,
- ig25@rz.uni-karlsruhe.de or ig25@dkauni2.bitnet.
-
- Section 1: General Information
-
- Q1.1: What is gnuplot?
-
- Gnuplot is a command-driven interactive function plotting program. It
- can be used to plot functions and data points in both two- and three-
- dimensional plots in many different formats, and will accommodate many
- of the needs of today's scientists for graphic data representation.
- Gnuplot is copyrighted, but freely distributable; you don't have to pay
- for it.
-
- Q1.2: How did it come about and why is it called gnuplot?
-
- The authors of gnuplot are:
-
- Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John Campbell,
- Gershon Elber, Alexander Woo and many others.
-
- The following quote comes from Thomas Williams:
-
- I was taking a differential equation class and Colin was taking
- Electromagnetics, we both thought it'd be helpful to visualize the
- mathematics behind them. We were both working as sys admin for an EE
- VLSI lab, so we had the graphics terminals and the time to do some
- coding. The posting was better received than we expected, and prompted
- us to add some, albeit lame, support for file data.
-
- Any reference to GNUplot is incorrect. The real name of the program
- is "gnuplot". You see people use "Gnuplot" quite a bit because many
- of us have an aversion to starting a sentence with a lower case
- letter, even in the case of proper nouns and titles. Gnuplot is not
- related to the GNU project or the FSF in any but the most peripheral
- sense. Our software was designed completely independently and the
- name "gnuplot" was actually a compromise. I wanted to call it
- "llamaplot" and Colin wanted to call it "nplot." We agreed that
- "newplot" was acceptable but, we then discovered that there was an
- absolutely ghastly pascal program of that name that the Computer
- Science Dept. occasionally used. I decided that "gnuplot" would make
- a nice pun and after a fashion Colin agreed.
-
- Q1.3: Does gnuplot have anything to do with the FSF and the GNU project?
-
- Gnuplot is neither written nor maintained by the FSF. It is not covered
- by the General Public License, either.
-
- However, the FSF has decided to distribute gnuplot as part of the GNU
- system, because it is useful, redistributable software.
-
- Q1.4: What does gnuplot offer?
-
- - Plotting of two - dimensional functions and data points in many different
- styles (points, lines, error bars)
- - plotting of three - dimensional data points and surfaces in many
- different styles (contour plot, mesh).
- - support for complex arithmetic
- - self - defined functions
- - support for a large number of operating systems, graphics file formats
- and devices
- - extensive on-line help
- - labels for title, axes, data points
- - command line editing and history on most platforms
-
- Q1.5: Is gnuplot suitable for batch processing?
-
- Yes. You can read in files from the command line, or you can redirect
- your standard input to read from a file. Both data and command files
- can be generated automatically, from data acquisition programs or
- whatever else you use.
-
- Q1.6: Can I run gnuplot on my computer?
-
- Gnuplot is available for a number of platforms. These are: Unix (X11
- and NeXTSTEP), VAX/VMS, OS/2, MS-DOS, Amiga, MS-Windows, OS-9/68k, Atari
- ST and the Macintosh. Modifications for NEC PC-9801 are said to exist
- (where?).
-
- Section 2: Setting it up
-
- Q2.1: What is the current version of gnuplot?
-
- The current version of gnuplot is 3.5, which is a bugfix release over
- 3.4.
-
- Q2.2: Where can I get gnuplot?
-
- [This information may be dated, due to the release of gnuplot 3.5.
- Please report any inaccuracies, if you find them. Ed.]
-
- All of the later addresses refer to ftp sites. Please note that it is
- preferable for you to use the symbolic name, rather than the IP address
- given in brackets, because that address is much more subject to change.
-
- The official distribution site for the gnuplot source is ftp.dartmouth.edu
- [129.170.16.4], the file is called /pub/gnuplot/gnuplot.3.5.tar.Z.
- Official mirrors of that distribution are (for Australia)
- monu1.cc.monash.edu.au [130.194.1.101] and (for Europe) irisa.irisa.fr
- [131.254.254.2]. You can also get it from your friendly neighbourhood
- comp.sources.misc archive.
-
- MS-DOS and MS-Windows binaries are available from oak.oakland.edu (North
- America) [141.210.10.117] as pub/msdos/plot/gpt35*.zip, garbo.uwasa.fi
- (Europe) [128.214.87.1] as /pc/plot/gpt35*.zip and archie.au (Australia)
- [139.130.4.6] as micros/pc/oak/plot/gpt35*.zip. The files are:
- gpt35doc.zip, gpt35exe.zip, gpt35src.zip and gpt35win.zip.
-
- OS/2 2.x binaries are at ftp-os2.nmsu.edu [128.123.35.151], in
- /os2/2.x/unix/gnu/gplt35.zip .
-
- Amiga sources and binaries are available from ftp.wustl.edu
- [128.252.135.4] as /pub/aminet/util/gnu/gnuplot-3.5.lha; there are
- numerous mirrors of this distribution, for example ftp.uni-kl.de,
- oes.orst.edu or ftp.luth.se.
-
- The NeXTSTEP front end can be found at sonata.cc.purdue.edu and
- cs.orst.edu.
-
- A version for OS-9/68K can be found at cabrales.cs.wisc.edu
- [128.105.36.20] as /pub/OSK/GRAPHICS/gnuplot32x.tar.Z; it includes both
- X-Windows and non - X-windows versions.
-
- A version of gnuplot for the Macintosh is included in the gpcontrb
- file, or can be found at wuarchive.wustl.edu [128.252.135.4], in
- edu/math/mac/graphingAids, as MacGnuPlot3.2.sea.hqx and
- MacGnuPlotPackage3.2.sea.hqx.
-
- People without ftp access can use an ftp-mail server; send a message
- saying 'help' to bitftp@pucc.bitnet (for BITNET only) or to
- ftpmail@ftp.dartmouth.edu.
-
- For a uuencoded copy of the the gnuplot sources (compressed tar file),
- send this as the body of a message to ftpmail@ftp.dartmouth.edu:
-
- open
- cd pub/gnuplot
- mode binary
- get gnuplot3.5.tar.Z
- quit
-
- If you have some problem, you might need to stick
-
- reply-to <your-email-address-here>
-
- before all the above.
-
- It is a good idea to look for a nearby ftp site when downloading things.
- You can use archie for this. See if an archie client is installed at
- your system (by simply typing archie at the command prompt), or send
- mail to archie@sura.net with the word 'help' in both the subject line
- and the body of the mail. However, be aware that the version you find
- at a near ftp site may well be out of date; check the last modification
- date and the number of bytes against the newest release at one of the
- official servers.
-
- Q2.3: How do I get gnuplot to compile on my system?
-
- As you would any other installation. Read the files README and
- README.Install, edit the Makefile according to taste, and run make or
- whatever is suitable for your operating system.
-
- If you get a complaint about a missing file libplot.a or something
- similar when building gnuplot for x11, remove -DUNIXPLOT from the
- TERMFLAGS= line, remove -lplot from the LIBS= line and run again. If
- you are making x11 on a sun, type 'make x11_sun'.
-
- Q2.4: What documentation is there, and how do I get it?
-
- The documentation is included in the source distribution. Look at the
- docs subdirectory, where you'll find
-
- - a Unix man page, which says how to start gnuplot
- - a help file, which also can be printed as a manual
- - a tutorial on using gnuplot with LaTeX
- - a quick reference summary sheet for TeX only
-
- PostScript copies of the documentation can be ftp'd from ftp.dartmouth.edu,
- in pub/gnuplot, as manual.ps.Z and tutorial.ps.Z
-
-
- Section 3: Working with it
-
- Q3.1: How do I get help?
-
- Give the 'help' command at the initial prompt. After that, keep
- looking through the keywords. Good starting points are 'plot'
- and 'set'.
-
- Read the manual, if you have it.
-
- Look through the demo subdirectory; it should give you some ideas.
-
- Ask your colleagues, the system administrator or the person who set
- up gnuplot.
-
- Post a question to comp.graphics.gnuplot or send mail to the gatewayed
- mailing list info-gnuplot@dartmouth.edu. If you want to subscribe to
- the mailing list, send mail to info-gnuplot-request@dartmouth.edu,
- but please don't do this if you can get comp.graphics.gnuplot directly.
- If you pose a question there, it is considered good form to solicit
- e-mail replies and post a summary.
-
- Q3.2: How do I print out my graphs?
-
- The kind of output produced is determined by the 'set terminal' command;
- for example, 'set terminal postscript' will produce the graph in
- PostScript format. Output can be redirected using the 'set output'
- command.
-
- As an example, the following prints out a graph of sin(x) on a Unix
- machine running X - Windows.
-
- gnuplot> plot [-6:6] sin(x)
- gnuplot> set terminal postscript
- Terminal type set to 'postscript'
- Options are 'landscape monochrome "Courier" 14'
- gnuplot> set output "sin.ps"
- gnuplot> replot
- gnuplot> set output # set output back to default
- gnuplot> set terminal x11 # ditto for terminal type
- gnuplot> ! lp -ops sin.ps # print ps - File (site dependent)
- request id is lprint-3433 (standard input)
- lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
- !
- gnuplot>
-
- Q3.3: How do I include my graphs in <word processor>?
-
- Basically, you save your plot to a file in a format your word processor
- can understand (using "set term" and "set output", see above), and then
- you read in the plot from your word processor.
-
- Details depend on the kind of word processor you use; use "set term" to
- get a list of available file formats.
-
- Many word processors can use Encapsulated PostScript for graphs. This
- can be generated by the 'set terminal postscript eps' command. Most
- MS-DOS word processors understand HPGL (terminal type hpgl).
-
- With TeX, it depends on what you use to print your dvi files. If you
- use dvips or dvi2ps, you can use Encapsulated PostScript. For
- emTeX (popular for MS-DOS), you can use emTeX, otherwise use the
- LaTeX terminal type, which generates a picture environment.
-
- If nothing else helps, try using the pgm or ppm format and converting it
- to a bitmap format your favourite word processor can understand. An
- invaluable tool for this is Jef Poskanzer's PBMPLUS package.
-
-
- Section 4: Wanted features in gnuplot
-
- Q4.1: Does gnuplot have hidden line removal?
-
- Version 3.5 supports hidden line removal on all platforms except MS-DOS;
- use the command
-
- set hidden3d
-
- If someone can solve the 64K DGROUP memory problem, gnuplot would
- support hidden line removal on MS-DOS as well. Version 3.2 supports
- limited hidden line removal.
-
- Q4.2: Does gnuplot support bar-charts/histograms/boxes?
-
- As of version 3.4, it does.
-
- Q4.3: Does gnuplot support multiple y-axes on a single plot?
-
- No.
-
- Q4.4: Can I put multiple plots on a single page?
-
- Look at the rosendorf subdirectory in the gpcontrb distribution;
- if you are using PostScript output, check out mpage, which can
- be ftp'd from
-
- ftp.eng.umd.edu:pub/misc/mpage-2.tar.Z
-
- Q4.5: Can I put both data files and commands into a single file?
-
- Alex Woo has just put out an unofficial modification for beta test,
- which does exactly this. Otherwise, you might consider using Fudgit,
- which can do it.
-
- Q4.6: Can I put Greek letters and super/subscripts into my labels?
-
- You might try using the LaTeX terminal type and putting text like
- \alpha_{3} into it.
-
- If you use PostScript output, you might find something in the Green
- subdirectory of the gpcontrb file (see Q5.3).
-
- David Denholm has written a PostScript terminal which allows for
- super/and subscripts, such as a^x or { Symbol a }. Ftp to
- sotona.phys.soton.ac.uk and get divpost34.trm.
-
- Q4.7: Can I do 1:1 scaling of axes?
-
- Not easily.
-
- Q4.8: Can I put tic marks for x and y axes into 3d plots?
-
- In version 3.5, you can.
-
- Section 5: Miscellaneous
-
- Q5.1: I've found a bug, what do I do?
-
- First, try to see whether it actually is a bug, or whether it is a
- feature which may be turned off by some obscure set - command.
-
- Next, see wether you have an old version of gnuplot; if you do, chances
- are the bug has been fixed in a newer release.
-
- If, after checking these things, you still are convinced that there is a
- bug, proceed as follows. If you have a fairly general sort of bug
- report, posting to comp.graphics.gnuplot is probably the way to go. If
- you have investigated a problem in detail, especially if you have a
- context diff that fixes the problem, please e-email a report to
- bug-gnuplot@dartmouth.edu. The bug-gnuplot list is for reporting and
- collecting bug fixes, the comp.graphics.gnuplot mailing list will be
- more help for finding work arounds or actually solving gnuplot related
- problems. If you do send in a bug report, be sure and include the
- version of gnuplot (including patchlevel), terminal driver, operating
- system, an exact description of the bug and input which can reproduce
- the bug. Also, any context diffs should be referenced against the
- latest official version of gnuplot if at all possible.
-
- Q5.2: Can I use gnuplot routines for my own programs?
-
- Yes. John Campbell <jdc@nauvax.ucc.nau.edu> has written gplotlib, a
- version of gnuplot as C subroutines callable from a C program. This is
- available as gplotlib.tar.Z on the machine ftp.nau.edu in the directory
- /pub/gplotlib.tar.Z. It is also included in the gpcontrb distribution
- in the campbell subdirectory.
-
- Q5.3: What extensions have people made to gnuplot? Where can I get them?
-
- [This is still hazy; please check this out and see whether it is correct.
- Ed.]
-
- Extensions have been put into the file gpcontrb.tar.Z, which is
- available with the 3.5 release, from the same places you can
- download the main distribution from.
-
- Note that it has a size of 3.5 megabytes.
-
- It contains the following subdirectories:
-
- bigler subdirectory:
- From: bigler@cicg-calcul.grenet.fr
- Subject: Multiple plots from a Fortran program
- budelsky subdirectory:
- From: budelsky@haegar.ikp.uni-koeln.de
- Subject: This is the information file for porting gnuplot 3.2
- to OS-9/68000
- byrne subdirectory:
- From: "Margaret R. Byrne" <mrb2j@kelvin.seas.virginia.edu>
- Subject: congp3d3 preprocessor to draw contour plots on
- irregular regions.
- clark subdirectory:
- From: Michael Clark <clarkmp@prony.Colorado.EDU>
- Subject: data filtering: adds point_skip & point_offs
- clift subdirectory:
- From: ssclift@neumann.uwaterloo.ca (Simon Clift)
- Subject: Re: Running gnuplot from Fortran, (and C)
- green subdirectory:
- From: Roque Donizete de Oliveira <oliveria@engin.umich.edu>
- Subject: PostScript Greek symbols in gnuplot, new prologue
- hanna subdirectory:
- From: gregor@kafka.saic.com (gregg hanna)
- Subject: x11-library mode, gnulib_x11.[c,h], xlibtest.c,makefile.xlib
- klosowski subdirectory:
- From: Carsten Steger <stegerc@informatik.tu-muenchen.de>
- Subject: New file "klein.dat"
- From: przemek@rrdstrad.nist.gov (Przemek Klosowski)
- Subject: calling gnuplot from Fortran
- kocaturk subdirectory:
- From: mustafa@seas.smu.edu (Mustafa Kocaturk)
- Subject: Histograms in gnuplot
- richardson subdirectory:
- From: amr@chiton.ucsd.edu (Tony Richardson)
- Subject: Programmatic control of gnuplot from Unix
- rosendorf subdirectory:
- From: prf@jprix.che.wisc.edu
- Subject: Multiple plots on a page
- vanzandt subdirectory:
- From: James R. Van Zandt <jrv@mitre-bedford.ARPA>
- Subject: Spline generating program
- white subdirectory:
- From: gwhite@bionet.bio.dfo.ca
- Subject: gnuplot 3.2 for Titan 3000
- woo subdirectory:
- From: "Alex Woo" <woo@ra-next.arc.nasa.gov>
- Subject: two additional title lines and fixes to errorbar style
- yamamoto subdirectory:
- From: "NOBORU YAMAMOTO " <sun!kekvax.kek.jp!YAMAMOTO@pixar.com>
- Subject: Re: gnuplot on Apple Macintosh, "diff -c" of version 3.0
- (now includes binaries)
- castro subdirectory:
- From: maurice@bruce.cs.monash.edu.au (Maurice Castro)
- Subject: Controlling gnuplot from another Windows program
- grammes subdirectory:
- From: ph12hucg@rz.uni-sb.de (Carsten Grammes)
- Subject: Nonlinear least squares fit mechanism
- henke subdirectory:
- From: mgr@asgard.bo.open.de (Lars Hanke)
- Subject: Re: Changes to gnuplot 3.3b9
- walton subdirectory:
- From: dwalton@athena.mit.edu (Dave Walton)
- Subject: Inter Process Communication stuff
-
- Q5.4: Can I do heavy - duty data processing with gnuplot?
-
- Gnuplot alone is not suited very well for this. One thing you might try
- is fudgit, an interactive multi-purpose fitting program written by
- Martin-D. Lacasse (isaac@frodo.physics.mcgill.ca). It can use gnuplot
- as its graphics back end and is available from ftp.physics.mcgill.ca
- in /pub/Fudgit/fudgit_2.33.tar.Z [132.206.9.13], and from the main Linux
- server, tsx-11.mit.edu [18.172.1.2] and its numerous mirrors around the
- world as /pub/linux/sources/usr.bin/fudgit-2.33.tar.z. Versions are
- available for AIX, Data General, HP-UX, IRIX 4, Linux, NeXT, Sun3, Sun4,
- Ultrix, OS/2 and MS-DOS. The MS-DOS version is available on simtel20
- mirrors (simtel20 itself has closed down) in the "math" subdirectory as
- fudg_231.zip.
-
- Carsten Grammes has written a fitting program which goes together
- with gnuplot; it is called gnufit and is available from ftp.uni-kl.de
- [131.246.9.95] from the directory /pub/gnu/gnufit as gnufit10.tar.gz
- or gft10dos.zip.
-
- Michael Courtney has written a program called lsqrft, which uses
- the Levenberg - Marquardt - Algorithm for fitting data to a function.
- It is avialiable from ftp.cdrom.com as /pub/os2/2_x/unix/lsqrft13.zip;
- sources, which should compile on Unix, and executables for MS-DOS and
- OS/2 2.x are included. There is an interface to the OS/2 presentation
- manager.
-
- You might also want to look at the applications developed by the
- Software Tools Group (STG) at the National Center for Supercomputing
- Applications. Ftp to ftp.ncsa.uiuc.edu [141.142.20.50] and get the
- file README.BROCHURE for more information.
-
- Q5.5: I have ported gnuplot to another system, or patched it. What do I do?
-
- If your patch is small, mail it to bug-gnuplot@dartmouth.edu, with
- a thorough description of what the patch is supposed to do, which version
- of gnuplot it is relative to, etc. Please don't mail it to the FAQ
- maintainer.
-
- If your modifications are extensive (such as a port to another system),
- upload your modifications to dartmouth.edu:/pub/dropoff. Please drop a
- note to David.Kotz@dartmouth.edu, the maintainer of the gnuplot
- subdirectory there, plus a note to bug-gnuplot@dartmouth.edu.
-
-
- Section 6: Making life easier
-
- Q6.1: How do I plot two functions in non - overlapping regions?
-
- Use a parametric plot. An example:
-
- set parametric
- a=1
- b=3
- c=2
- d=4
- x1(t) = a+(b-a)*t
- x2(t) = c+(d-c)*t
- f1(x) = sin(x)
- f2(x) = x**2/8
- plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
-
- Q6.2: How do I run my data through a filter before plotting?
-
- If your system supports the popen() - function, as Unix does, you should
- be able to run the output through another process such as a short awk
- program (use the "help plot datafile" command for an example).
- Unfortunately, in 3.2, there is a rather short limitation on the maximum
- argument length, so your command line may be truncated (usually, this
- will mean that awk cannot find the filename). Also, you may need to
- escape the $ - characters in your awk programs.
-
- As of version 3.4, gnuplot includes the thru - keyword for the plot
- command for running data files through a gnuplot - defined function.
-
- Q6.3: How do I make it easier to use gnuplot with LaTeX?
-
- There is a set of LaTeX macros and shell scripts that are meant to make
- your life easier when using gnuplot with LaTeX. This package can be
- found on ftp.dartmouth.edu [129.170.16.54] in pub/gnuplot/latex.shar, by
- David Kotz. For example, the program "plotskel" can turn a
- gnuplot-output file plot.tex into a skeleton file skel.tex, that has the
- same size as the original plot but contains no graph. With the right
- macros, the skeleton can be used for preliminary LaTeX passes, reserving
- the full graph for later passes, saving tremendous amounts of time.
-
- Q6.4: How do I save and restore my settings?
-
- Use the "save" and "load" commands for this; see "help save" and
- "help load" for details.
-
- Q6.5: How do I plot lines (not grids) using splot?
-
- If the data in a data file for splot is arranged in such a way that each
- one has the same number of data points (using blank lines as delimiters,
- as usual), splot will plot the data with a grid. If you want to plot
- just lines, use a different number of data entries (you can do this by
- doubling the last data point, for example). Don't forget to set
- parametric mode, of course.
-
-
- Q6.6: How do I plot a function f(x,y) which is bounded by other
- functions in the x-y plain?
-
- An example:
-
- f(x,y) = x**2 + y **2
- x(u) = 3*u
- yu(x) = x**2
- yl(x) = -x**2
- set parametric
- set cont
- splot [0:1] [0:1] u,yl(x(u))+(yu(x(u)) - yl(x(u)))*v,\
- f(x(u), (yu(x(u)) - yl(x(u)))*v)
-
- Section 7: Known problems
-
- Q7.1: Gnuplot is not plotting any points under X11! How come?
-
- Very probably, you still are using an old version of gnuplot_x11.
- Remove that, then do a full installation.
-
- Q7.2: My isoline data generated by a Fortran program is not handled
- correctly. What can I do?
-
- One known cause for this is the use of list - directed output (as in
- WRITE (10,*) for generating blank lines. Fortran uses ASA carriage
- control characters, and for list - directed output this results
- in a space being output before the newline. Gnuplot does not like
- this.
-
- The solution is to generate blank lines using formatted output, as in
- WRITE (10,'()').
-
- If you use carriage return files in VMS Fortran, you may have to open
- the file with OPEN(...,CARRIAGECONTROL='LIST') or convert it using
- the DECUS utility ATTRIB.EXE:
-
- VMS> ATTRIB/RATTRIB=IMPLIED FOR010.DAT
-
- Q7.3: Why does gnuplot ignore my very small numbers?
-
- Gnuplot treats all numbers less than 1e-08 as zero, by default. Thus,
- if you are trying to plot a collection of very small numbers, they may
- be plotted as zero. Worse, if you're plotting on a log scale, they will
- be off scale. Or, if the whole set of numbers is "zero", your range may
- be considered empty:
-
- gnuplot> plot 'test1'
- Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1]
- gnuplot> set yrange [4e-19:3e-11]
- gnuplot> plot 'test1'
- ^
- y range is less than `zero`
-
- The solution is to change gnuplot's idea of "zero":
-
- gnuplot> set zero 1e-20
-
- For more information,
-
- gnuplot> help set zero
-
- Q7.4: Gnuplot is plotting nothing when run via gnuplot <filename>!
- What can I do?
-
- Put a
-
- pause -1
-
- after the plot command in the file.
-
- Q7.5: My formulas are giving me nonsense results! What's going on?
-
- Gnuplot does integer, and not floating point, arithmetic on integer
- expressions. For example, the expression 1/3 evaluates to zero. If you
- want floating point expressions, supply trailing dots for your floating
- point numbers.
-
- Example:
-
- gnuplot> print 1/3
- 0
- gnuplot> print 1./3.
- 0.333333
-
- This way of evaluating integer expressions is shared by both C and
- Fortran.
-
- Section 8: Credits
-
- This list was initially compiled by John Fletcher with contributions
- from Russell Lang, John Campbell, David Kotz, Rob Cunningham,
- Daniel Lewart and Alex Woo. Reworked by Thomas Koenig from a draft by
- Alex Woo, with corrections and additions from Alex Woo, John Campbell,
- Russell Lang, David Kotz and many corrections from Daniel Lewart.
- --
- Thomas Koenig, ig25@rz.uni-karlsruhe.de, ig25@dkauni2.bitnet
- The joy of engineering is to find a straight line on a double
- logarithmic diagram.
-