[BACK]Return to 0FAQ CVS log [TXT][DIR] Up to [local] / OpenXM_contrib / gnuplot

Annotation of OpenXM_contrib/gnuplot/0FAQ, Revision 1.1.1.3

1.1.1.3 ! ohara       1:                                   Gnuplot FAQ
        !             2:
1.1       maekawa     3:
1.1.1.2   maekawa     4: Contents
1.1       maekawa     5:
1.1.1.3 ! ohara       6:   * 0 Meta - Questions
        !             7:       + 0.1 Where do I get this document?
        !             8:       + 0.2 Where do I send comments about this document?
        !             9:
        !            10:   * 1 General Information
        !            11:       + 1.1 What is gnuplot?
        !            12:       + 1.2 How did it come about and why is it called gnuplot?
        !            13:       + 1.3 Does gnuplot have anything to do with the FSF and the GNU project?
        !            14:       + 1.4 What does gnuplot offer?
        !            15:       + 1.5 Is gnuplot suitable for batch processing?
        !            16:       + 1.6 Can I run gnuplot on my computer?
        !            17:       + 1.7 Legalize it!
        !            18:       + 1.8 Is gnuplot Y2K compliant?
        !            19:       + 1.9 Where do I get further information?
        !            20:
        !            21:   * 2 Setting it up
        !            22:       + 2.1 What is the current version of gnuplot?
        !            23:       + 2.2 Where can I get gnuplot?
        !            24:       + 2.3 How do I get gnuplot to compile on my system?
        !            25:       + 2.4 What documentation is there, and how do I get it?
        !            26:
        !            27:   * 3 Working with it.
        !            28:       + 3.1 How do I get help?
        !            29:       + 3.2 How do I print out my graphs?
        !            30:       + 3.3 How do I include my graphs in <word processor>?
        !            31:       + 3.4 How do I post-process a gnuplot graph?
        !            32:       + 3.5 How do I change symbol size, line thickness and the like?
        !            33:       + 3.6 How do I generate plots in the GIF format?
        !            34:       + 3.7 Can I animate my graphs?
        !            35:       + 3.8 How do I plot implicit defined graphs?
        !            36:
        !            37:   * 4 Wanted features
        !            38:       + 4.1 What's new in gnuplot 3.7?
        !            39:       + 4.2 Does gnuplot have hidden line removal?
        !            40:       + 4.3 Does gnuplot support bar-charts/histograms/boxes?
        !            41:       + 4.4 Does gnuplot support pie charts?
        !            42:       + 4.5 Does gnuplot quarterly time charts?
        !            43:       + 4.6 Does gnuplot support multiple y-axes on a single plot?
        !            44:       + 4.7 Can I put multiple pages on one page?
        !            45:       + 4.8 Can I put both data files and commands into a single file?
        !            46:       + 4.9 Can I put Greek letters and super/subscripts into my labels?
        !            47:       + 4.10 Can I do 1:1 scaling of axes?
        !            48:       + 4.11 Can I put tic marks for x and y axes into 3d plots?
        !            49:       + 4.12 Does gnuplot support a driver for <graphics format>?
        !            50:       + 4.13 Can I put different text sizes into my plots?
        !            51:       + 4.14 How do I modify gnuplot, and apply 'patches'?
        !            52:       + 4.15 How do I skip data points?
        !            53:       + 4.16 How do I plot every nth point?
        !            54:       + 4.17 How do I plot a vertical line?
        !            55:       + 4.18 How do I plot data files
        !            56:       + 4.19 How do I include accentuated characters in Postscript output?
        !            57:
        !            58:   * 5 Miscellaneous
        !            59:       + 5.1 I've found a bug, what do I do?
        !            60:       + 5.2 Can I use gnuplot routines for my own programs?
        !            61:       + 5.3 What extensions have people made to gnuplot? Where can I get them?
        !            62:       + 5.4 I need an integration, fft, iir-filter,....!
        !            63:       + 5.5 Can I do heavy-duty data processing with gnuplot? or What is beyond
        !            64:         gnuplot?
        !            65:       + 5.6 I have ported gnuplot to another system, or patched it. What do I
        !            66:         do?
        !            67:       + 5.7 I want to help in developing the next version of gnuplot. What can
        !            68:         I do?
        !            69:       + 5.8 Open questions for inclusion into the FAQ?
        !            70:
        !            71:   * 6 Making life easier
        !            72:       + 6.1 How do I plot two functions in non-overlapping regions?
        !            73:       + 6.2 How do I run my data through a filter before plotting?
        !            74:       + 6.3 How do I make it easier to use gnuplot with LATEX?
        !            75:       + 6.4 How do I save and restore my settings?
        !            76:       + 6.5 How do I plot lines (not grids) using splot?
        !            77:       + 6.6 How do I plot a function f(x,y) which is bounded by other functions
        !            78:         in the x-y plain?
        !            79:       + 6.7 How do I get rid of <feature> in a plot?
        !            80:       + 6.8 How do I call gnuplot from my own programs?
        !            81:       + 6.9 What if I need h-bar (Planck's constant)?
        !            82:
        !            83:   * 7 Known Problems
        !            84:       + 7.1 Gnuplot is not plotting any points under X11! How come?
        !            85:       + 7.2 My isoline data generated by a Fortran program is not handled
        !            86:         correctly. What can I do?
        !            87:       + 7.3 Why does gnuplot ignore my very small numbers?
        !            88:       + 7.4 Gnuplot is plotting nothing when run via gnuplot <filename>! What
        !            89:         can I do?
        !            90:       + 7.5 My formulas are giving me nonsense results! What's going on?
        !            91:       + 7.6 Set output 'filename' isn't outputting everything it should!
        !            92:       + 7.7 When using the LATEX-terminal, there is an error during the
        !            93:         LATEX-run!
        !            94:       + 7.8 The exit command does not work as documented!
        !            95:       + 7.9 I can't find the demos and example files at the URLs in the
        !            96:         documentation!
        !            97:       + 7.10 Calling gnuplot in a pipe or with a gnuplot-script doesn't produce
        !            98:         a plot!
        !            99:
        !           100:   * 8 Credits
1.1.1.2   maekawa   101:
1.1.1.3 ! ohara     102: 0 Meta - Questions
1.1.1.2   maekawa   103:
                    104: 0.1 Where do I get this document?
                    105:
1.1.1.3 ! ohara     106: This document is posted about once every two weeks to the newsgroups  ~
        !           107: comp.graphics.apps.gnuplot. Its newest (plaintext) version is available via
        !           108: anonymous ftp from ftp.gnuplot.info in /pub/gnuplot/faq/gnuplot-faq.txt.
1.1.1.2   maekawa   109:
1.1.1.3 ! ohara     110: If you have access to the WWW, you can get the newest version of this document
        !           111: from http://www.ucc.ie/gnuplot/gnuplot-faq.html.
1.1.1.2   maekawa   112:
1.1.1.3 ! ohara     113: Today's version is version $Revision: 1.3.2.8 $, dated $Date: 2002/12/07 18:33:
        !           114: 30 $
1.1.1.2   maekawa   115:
                    116: 0.2 Where do I send comments about this document?
                    117:
1.1.1.3 ! ohara     118: Send comments, suggestions etc via email to the developer mailing list
        !           119: info-gnuplot-beta@Dartmouth.EDU.
1.1.1.2   maekawa   120:
1.1.1.3 ! ohara     121: 1 General Information
1.1.1.2   maekawa   122:
                    123: 1.1 What is gnuplot?
                    124:
                    125: gnuplot is a command-driven interactive function plotting program. It can be
1.1.1.3 ! ohara     126: used to plot functions and data points in both two- and three-dimensional plots
        !           127: in many different formats, and will accommodate many of the needs of today's
        !           128: scientists for graphic data representation. gnuplot is copyrighted, but freely
        !           129: distributable; you don't have to pay for it.
1.1.1.2   maekawa   130:
                    131: This document deals with gnuplot Version 3.7 which is the latest official
1.1.1.3 ! ohara     132: release as of December 10, 2002. References to bug-fix versions or (recent)
1.1.1.2   maekawa   133: beta versions are explicitly marked.
                    134:
                    135: 1.2 How did it come about and why is it called gnuplot?
                    136:
1.1.1.3 ! ohara     137: The authors of gnuplot are: Thomas Williams, Colin Kelley, Russell Lang, Dave
        !           138: Kotz, John Campbell, Gershon Elber, Alexander Woo and many others.
1.1.1.2   maekawa   139:
                    140: The following quote comes from Thomas Williams:
1.1       maekawa   141:
1.1.1.3 ! ohara     142:     I was taking a differential equation class and Colin was taking
        !           143:     Electromagnetics, we both thought it'd be helpful to visualize the
        !           144:     mathematics behind them. We were both working as sys admin for an EE VLSI
        !           145:     lab, so we had the graphics terminals and the time to do some coding. The
        !           146:     posting was better received than we expected, and prompted us to add some,
        !           147:     albeit lame, support for file data.
        !           148:
        !           149:     Any reference to GNUplot is incorrect. The real name of the program is
        !           150:     "gnuplot". You see people use "gnuplot" quite a bit because many of us have
        !           151:     an aversion to starting a sentence with a lower case letter, even in the
        !           152:     case of proper nouns and titles. gnuplot is not related to the GNU project
        !           153:     or the FSF in any but the most peripheral sense. Our software was designed
        !           154:     completely independently and the name "gnuplot" was actually a compromise.
        !           155:     I wanted to call it "llamaplot" and Colin wanted to call it "nplot." We
        !           156:     agreed that "newplot" was acceptable but, we then discovered that there was
        !           157:     an absolutely ghastly pascal program of that name that the Computer Science
        !           158:     Dept. occasionally used. I decided that "gnuplot" would make a nice pun and
        !           159:     after a fashion Colin agreed.
1.1       maekawa   160:
1.1.1.2   maekawa   161: 1.3 Does gnuplot have anything to do with the FSF and the GNU project?
                    162:
1.1.1.3 ! ohara     163: Gnuplot is neither written nor maintained by the FSF. It is not covered by the
        !           164: General Public License, either. It used to be distributed by the FSF, however,
        !           165: due to licensing issues it is no longer.
        !           166:
        !           167: Gnuplot is freeware in the sense that you don't have to pay for it. However it
        !           168: is not freeware in the sense that you would be allowed to distribute a modified
        !           169: version of your gnuplot freely. Please read and accept the Copyright file in
        !           170: your distribution.
1.1.1.2   maekawa   171:
                    172: 1.4 What does gnuplot offer?
                    173:
1.1.1.3 ! ohara     174:   * Plotting of two-dimensional functions and data points in many different
        !           175:     styles (points, lines, error bars)
        !           176:   * computations in integer, float and complex arithmetic
        !           177:   * plotting of three-dimensional data points and surfaces in many different
        !           178:     styles (contour plot, mesh).
        !           179:   * support for complex arithmetic
        !           180:   * self - defined functions
        !           181:   * support for a large number of operating systems, graphics file formats and
        !           182:     devices
        !           183:   * extensive on-line help
        !           184:   * labels for title, axes, data points
        !           185:   * command line editing and history on most platforms
1.1.1.2   maekawa   186:
                    187: 1.5 Is gnuplot suitable for batch processing?
                    188:
                    189: Yes. You can read in files from the command line, or you can redirect your
                    190: standard input to read from a file. Both data and command files can be
                    191: generated automatically, from data acquisition programs or whatever else you
                    192: use.
                    193:
                    194: 1.6 Can I run gnuplot on my computer?
                    195:
                    196: Gnuplot is available for a number of platforms. These are: Unix (X11 and
1.1.1.3 ! ohara     197: NeXTSTEP), VAX/VMS, OS/2, MS-DOS, Amiga, MS-Windows, OS-9/68k, Atari ST, BeOS,
        !           198: and the Macintosh.
1.1.1.2   maekawa   199:
                    200: Please notify the FAQ-maintainer of any further ports you might be aware of.
                    201:
1.1.1.3 ! ohara     202: You should be able to compile the gnuplot source more or less out of the box on
        !           203: any reasonable standard (ANSI/ISO C, POSIX) environment.
1.1.1.2   maekawa   204:
                    205: 1.7 Legalize it!
                    206:
1.1.1.3 ! ohara     207: Gnuplot is freeware authored by a collection of volunteers, who cannot make any
        !           208: legal statement about the compliance or non-compliance of gnuplot or its uses.
        !           209: There is also no warranty whatsoever. Use at your own risk.
1.1.1.2   maekawa   210:
                    211: Citing from the README of a mathematical subroutine package by R. Freund:
                    212:
1.1.1.3 ! ohara     213:     For all intent and purpose, any description of what the codes are doing
        !           214:     should be construed as being a note of what we thought the codes did on our
        !           215:     machine on a particular Tuesday of last year. If you're really lucky, they
        !           216:     might do the same for you someday. Then again, do you really feel *that*
        !           217:     lucky?
1.1.1.2   maekawa   218:
                    219: 1.8 Is gnuplot Y2K compliant?
                    220:
                    221: Gnuplot's compliance depends in part on the compliance of the underlying
1.1.1.3 ! ohara     222: operating system and hardware. The only use gnuplot makes of a system- supplied
        !           223: date is in the "set timestamp" command, which simply echos the date on the
        !           224: plot. If the underlying OS cannot produce an accurate time string, then the
        !           225: "set timestamp" command may fail to print the correct date on plots.
1.1.1.2   maekawa   226:
                    227: In gnuplot 3.5, if the user chooses to use %y in a timestamp format, rather
1.1.1.3 ! ohara     228: than %Y, it will print 2-digit rather than 4-digit years. The effects depend on
        !           229: the importance you place on the timestamps printed on plots.
1.1.1.2   maekawa   230:
1.1.1.3 ! ohara     231: Gnuplot 3.7 also allows the use of time/date data as variables, but the user
        !           232: has complete control over the input format of the data and the output format of
        !           233: the tic labels - the same 2-digit "%y" (interpreted as 1900+) and 4-digit "%Y"
        !           234: formats are both available. But again, these are user-specifiable, so if there
        !           235: is a Y2K problem here, it is the responsibility of the user.
1.1.1.2   maekawa   236:
                    237: Of course, gnuplot is built by executing a makefile, which may well be
                    238: date-dependent. So if the operating system has a Y2K problem, the process of
                    239: building a new executable of gnuplot may be affected. But that wouldn't be a
                    240: problem with gnuplot per se.
                    241:
                    242: IMPORTANT NOTICE
                    243:
                    244: As of gnuplot beta version 3.7.0.9, the interpretation of the "%y" two digit
1.1.1.3 ! ohara     245: year specifier was changed in accordance with the recommendations of The Open
        !           246: Group and all major Unix vendors. When a century is not otherwise specified,
        !           247: values in the range 69-99 refer to the twentieth century and values in the
        !           248: range 00-68 refer to the twenty-first century. Be very careful when
        !           249: interpreting 2-digit year expressions.
1.1.1.2   maekawa   250:
                    251: 1.9 Where do I get further information?
                    252:
                    253: The following sites have more information about gnuplot.
                    254:
1.1.1.3 ! ohara     255:   * http://www.comnets.rwth-aachen.de/doc/gnu/gnuplot37/gnuplot.html an online
        !           256:     documentation in html-format
        !           257:   * http://www.usf.uni-osnabrueck.de/ breiter/tools/gnuplot/index.en.html has
        !           258:     many links to many features and add-ons for gnuplot
        !           259:   * http://web.cs.uni.edu/Help/gnuplot/ contains an online tutorial
        !           260:   * http://brian.me.tufts.edu/GnuplotInLaTeX/ contains infos abount gnuplot and
        !           261:     LATEX
        !           262:   * http://ndevilla.free.fr/gnuplot/ explains the use of a gnuplot API in ANSI
        !           263:     C (commonly known as gnuplot_pipes
        !           264:   * http://ricardo.ecn.wfu.edu/ cottrell/qplot/ on how to plot quarterly time
        !           265:     data
        !           266:   * http://monsoon.harvard.edu/ mhagger/download a Python interface for gnuplot
        !           267:   * ftp.thewrittenword.com in /free/by-package/ contains Solaris, IRIX, HP-UX
        !           268:     and Digital Unix binaries
        !           269:   * http://www.sci.muni.cz/ mikulik/gnuplot.html has Petr's famous OS/2 mouse
        !           270:     support and the pm3d terminal for colour 3d surfaces. Furthermore some more
        !           271:     links to other sites
        !           272:
        !           273: Some documentation is available in other languages than English. Those include:
        !           274:
        !           275:   * http://www.multimania.com/ gersoo/gnuplt/index.html contient des
        !           276:     informations dans la langue de Molière: les 1ers pas avec gnuplot,
        !           277:     malheureusement seulement version 3.5. Vous trouverez un cours directement
        !           278:     en ligne appelleé "1ers pas avec gnuplot". Le cours est aussi disponible en
        !           279:     Postscript.
        !           280:   * http://www.al.lu/euler/gnuplot.shtml encore des informations en langue
        !           281:     française avec possibilité de téléchargement des versions binaires
        !           282:
        !           283: Here are some more sites, however these are somewhat outdated in carrying still
        !           284: references to beta versions. If you download software from there you should be
        !           285: aware that beta versions are not officially endorsed.
        !           286:
        !           287:   * http://www.cs.dartmouth.edu/gnuplot_info.html slightly outdated site for
        !           288:     the 3.6 beta version, but also a web-gateway to the users' newsgroup
        !           289:   * http://members.theglobe.com/gnuplot/ basically same as above.
        !           290:   * http://homepage.mac.com/gnuplot/ is the new site for a Macintosh port of
        !           291:     gnuplot
        !           292:
        !           293: The following sites were said to exist, however they seem to be down right now.
        !           294:
        !           295:   * http://www.geocities.com/SiliconValley/Foothills/6647/ the copyright
        !           296:     statement and some binaries contains ads
        !           297:   * http://www.delorie.com/gnu/docs/gnuplot/gplot_toc.html doesn't work
        !           298:   * picard.tamu.edu in /pub/gnuplot gives a tutorial
        !           299:   * http://feff.phys.washington.edu/ ravel/gnuplot has a new mode for the users
        !           300:     of (X)Emacs
1.1.1.2   maekawa   301:
1.1.1.3 ! ohara     302: 2 Setting it up
1.1.1.2   maekawa   303:
                    304: 2.1 What is the current version of gnuplot?
                    305:
                    306: The current version of gnuplot is 3.7, which has many improvements over 3.5.
                    307: 3.6 was never released to avoid confusions with the beta versions.
                    308:
                    309:
                    310: 2.2 Where can I get gnuplot?
                    311:
1.1.1.3 ! ohara     312: The best place is definitly http://www.gnuplot.info. From there you find
        !           313: various pointers to other sites.
        !           314:
        !           315: The source distribution ("gnuplot-3.7.tar.gz" or a similar name) is available
        !           316: from the official distribution site and its mirrors.
1.1.1.2   maekawa   317:
1.1.1.3 ! ohara     318: The main server is ftp.gnuplot.info in /pub/gnuplot/. This server is mirrored
        !           319: by several others, among those are
1.1.1.2   maekawa   320:
1.1.1.3 ! ohara     321:   * mirror.aarnet.edu.au in /pub/gnuplot/
        !           322:   * ftp.dartmouth.edu in /pub/gnuplot/
        !           323:   * ftp.irisa.fr in /pub/gnuplot/
        !           324:   * ftp.gnuplot.vt.edu in /pub/gnuplot/
        !           325:
        !           326: You can also have a look at the following WWW-pages which provide a source to
        !           327: obtain gnuplot:
        !           328:
        !           329:   * http://members.theglobe.com/gnuplot/
        !           330:   * http://www.geocities.com/SiliconValley/Foothills/6647/
        !           331:   * http://mirror.aarnet.edu.au/pub/gnuplot/
1.1.1.2   maekawa   332:
                    333: The current version for the Macintosh is 2.04b, based on gnuplot 3.5
                    334: pre3.6beta338, and is available from
                    335:
1.1.1.3 ! ohara     336:   * http://users.ece.gatech.edu/ schooley/.
1.1.1.2   maekawa   337:
                    338: Unfortunately, this version does not seem to be maintained anymore.
                    339:
1.1.1.3 ! ohara     340: Source and binary distributions for the Amiga are available on Aminet
1.1.1.2   maekawa   341: ftp.wustl.edu in  aminet/ and its mirrors, for example ftp.uni-kl.de,
                    342: oes.orst.edu or ftp.luth.se.
                    343:
                    344: MS-DOS and MS-Windows binaries are available from the above servers and are
                    345: called gp37dos.zip, gp37dj.zip, gp37w16.zip, gp37mgw.zip, gnuplot3.7cyg.zip.
                    346:
                    347: OS/2 binaries are called gp37os2.zip.
                    348:
1.1.1.3 ! ohara     349: An X11 Window System front-end is available at http://www.flash.net/ dmishee/
        !           350: xgfe/xgfe.html.
1.1.1.2   maekawa   351:
1.1.1.3 ! ohara     352: The NeXTSTEP front end can be found at next-ftp.peak.org in /pub/next/binaries/
        !           353: plotting/Gnuplot1.2_bin.tar.Z.
1.1.1.2   maekawa   354:
1.1.1.3 ! ohara     355: A version for OS-9/68K can be found at cabrales.cs.wisc.edu in /pub/OSK/
        !           356: GRAPHICS/gnuplot32x.tar.Z; it includes both an X-Window Systems and a non -
        !           357: X-Window Systems version.
        !           358:
        !           359: Versions for the Atari ST and TT, which include some GEM windowing support, are
        !           360: available from ftp.uni-kl.de in /pub/atari/graphics/, as gplt35st.zip and
        !           361: gplt35tt.zip. They work best under MiNT.
1.1.1.2   maekawa   362:
1.1.1.3 ! ohara     363: Executable files, plus documentation in Japanese, exist for the X680x0 on
        !           364: ftp.csis.oita-u.ac.jp in /pub/x68k/fj.binaries.x68000/vol2.
1.1.1.2   maekawa   365:
                    366: It is a good idea to look for a nearby ftp site when downloading things. You
                    367: can use archie for this. See if an archie client is installed at your system
1.1.1.3 ! ohara     368: (by simply typing archie at the command prompt), or send mail to
        !           369: archie@sura.net with the word 'help' in both the subject line and the body of
        !           370: the mail. However, be aware that the version you find at a near ftp site may
        !           371: well be out of date; check the last modification date and the number of bytes
        !           372: against the newest release at one of the official servers.
        !           373:
        !           374: If you can't locate a working archie server, you can use other web-based search
        !           375: engines for searching for gnuplot. One of these would be Lycos at http://
        !           376: ftpsearch.lycos.com/.
1.1.1.2   maekawa   377:
1.1.1.3 ! ohara     378: As of June 1999, the gnuplot distribution is also mirrored at the Comprehensive
        !           379: TeX Archive Network (CTAN) in the graphics/gnuplot directory. See
        !           380:
        !           381:   * http://www.ctan.org/.
1.1.1.2   maekawa   382:
                    383: Bug fixes can also be found at gnuplot distribution sites in the patches
                    384: directory.
                    385:
                    386: 2.3 How do I get gnuplot to compile on my system?
                    387:
                    388: As you would any other installation. Read the files README.1ST and README.
                    389:
1.1.1.3 ! ohara     390: For Unix, use configure and make. For DOS, if you are using bash and DJGPP, you
        !           391: can just run djconfig.sh. For other platforms, copy the relevant makefile from
        !           392: config/ to src, change to src and run make.
1.1.1.2   maekawa   393:
                    394: 2.4 What documentation is there, and how do I get it?
                    395:
                    396: The documentation is included in the source distribution. Look at the docs
                    397: subdirectory, where you'll find
                    398:
1.1.1.3 ! ohara     399:   * a Unix man page, which says how to start gnuplot
        !           400:   * a help file, which also can be printed as a manual
        !           401:   * a tutorial on using gnuplot with LATEX
        !           402:   * a quick reference summary sheet for TEXonly
1.1.1.2   maekawa   403:
1.1.1.3 ! ohara     404: PostScript copies of the documentation can be ftp'd from ftp.dartmouth.edu in /
        !           405: pub/gnuplot, as manual.ps.Z and tutorial.ps.Z
1.1.1.2   maekawa   406:
1.1.1.3 ! ohara     407: The documentation is built during the installation if you have LATEX installed
        !           408: on your system, look in the directories docs and tutorial.
1.1.1.2   maekawa   409:
                    410: Documentation about gnuplot is available in the most common formats at the
                    411: gnuplot distribution sites in the files gpdoc.zip and gpdoc2.zip.
                    412:
1.1.1.3 ! ohara     413: 3 Working with it.
1.1.1.2   maekawa   414:
                    415: 3.1 How do I get help?
                    416:
                    417: Read this document.
                    418:
1.1.1.3 ! ohara     419: Give the 'help' command at the initial prompt. After that, keep looking through
        !           420: the keywords. Good starting points are 'plot' and 'set'.
1.1.1.2   maekawa   421:
                    422: Read the manual, if you have it.
                    423:
                    424: Look through the demo subdirectory; it should give you some ideas.
                    425:
1.1.1.3 ! ohara     426: Ask your colleagues, the system administrator or the person who set up gnuplot.
1.1.1.2   maekawa   427:
1.1.1.3 ! ohara     428: If all these fail, please upgrade to the newest version of gnuplot or urge your
        !           429: system-administrator to do so. Then post a question to ~
        !           430: comp.graphics.apps.gnuplot or send mail to the gatewayed mailing list
        !           431: info-gnuplot@dartmouth.edu. Do not forget to cite the version number and the
        !           432: operating system. If you want to subscribe to the mailing list, send a mail to
        !           433: majordomo@dartmouth.edu with the body of the message being 'subscribe
        !           434: info-gnuplot'. Please don't do this if you can get  ~comp.graphics.apps.gnuplot
        !           435: directly. If you post a question there, it is considered good form to solicit
        !           436: e-mail replies and post a summary.
1.1.1.2   maekawa   437:
                    438: 3.2 How do I print out my graphs?
                    439:
                    440: The kind of output produced is determined by the 'set terminal' command; for
1.1.1.3 ! ohara     441: example, 'set terminal postscript' will produce the graph in PostScript format.
        !           442: Output can be redirected using the 'set output' command.
1.1.1.2   maekawa   443:
                    444: As an example, the following prints out a graph of sin(x) on a Unix machine
                    445: running the X-Window System.
                    446:
                    447: gnuplot> plot [-6:6] sin(x)
                    448: gnuplot> set terminal postscript
                    449: Terminal type set to 'postscript'
                    450: Options are 'landscape monochrome "Courier" 14'
                    451: gnuplot> set output "sin.ps"
                    452: gnuplot> replot
                    453: gnuplot> set output              # set output back to default
                    454: gnuplot> set terminal x11        # ditto for terminal type
                    455: gnuplot> ! lp -ops sin.ps        # print PS File (site dependent)
                    456: request id is lprint-3433 (standard input)
                    457: lp: printed file sin.ps on fg20.rz.uni-karlsruhe.de (5068 Byte)
                    458: !
                    459: gnuplot>
                    460:
1.1.1.3 ! ohara     461: In Microschrott Windows you click in the upper left corner of the graph window
        !           462: and print directly from there.
1.1.1.2   maekawa   463:
                    464: 3.3 How do I include my graphs in <word processor>?
                    465:
                    466: Basically, you save your plot to a file in a format your word processor can
1.1.1.3 ! ohara     467: understand (using "set term" and "set output", see above), and then you read in
        !           468: the plot from your word processor. Vector formats should be preferred, as you
        !           469: can scale your graph later to the right size.
1.1.1.2   maekawa   470:
1.1.1.3 ! ohara     471: Details depend on the kind of word processor you use; use "set term" to get a
        !           472: list of available file formats.
1.1.1.2   maekawa   473:
                    474: Many word processors can use Encapsulated PostScript for graphs. This can be
                    475: generated by the "set terminal postscript eps" command. Most MS-DOS word
                    476: processors understand HPGL (terminal type hpgl).
                    477:
1.1.1.3 ! ohara     478: With TeX, it depends on what you use to print your dvi files. If you use dvips
        !           479: or dvi2ps, you can use Encapsulated PostScript. For emTeX (popular for MS-DOSns
        !           480: OS/2), you can use emTeX, otherwise use the LATEX terminal type, which
        !           481: generates a picture environment.
        !           482:
        !           483: If nothing else helps, try using the pgm or ppm format and converting it to a
        !           484: bitmap format your favourite word processor can understand. An invaluable tool
        !           485: for this is Jef Poskanzer's PBMPLUS package.
        !           486:
        !           487: The PBMPLUS package is available in the contrib distribution for the X-Window
        !           488: System. The original site for this is ftp.x.org in /contrib/. There are many
        !           489: mirrors, e.g. ftp.tu-darmstadt.de in /pub/X11/contrib/ or . sunsite.unc.edu in
        !           490: /pub/X11/contrib/.
1.1.1.2   maekawa   491:
1.1.1.3 ! ohara     492: The most recent release of pbm by the author is dated December 91 and is called
        !           493: pbmplus10dec91.tar.Z.
1.1.1.2   maekawa   494:
                    495: There is new version including lots of patches from the net that is not
                    496: maintained by the author called netpbm, with the newest version called
                    497: netpbm-1mar1994.tar.gz.
                    498:
1.1.1.3 ! ohara     499: Check archie (see Q[*] ) for an archive site near you.
1.1.1.2   maekawa   500:
1.1.1.3 ! ohara     501: For Microso$t Windows and MacOS you can use the clip board to copy your graph
        !           502: and paste it into your favourite Windows or MacOS word processor.
1.1.1.2   maekawa   503:
                    504: 3.4 How do I post-process a gnuplot graph?
                    505:
                    506: This depends on the terminal type you use.
                    507:
1.1.1.3 ! ohara     508: You can use the terminal type fig (you may need to recompile gnuplot to enable
        !           509: this terminal type, by putting #define FIG into <term.h>), and use the xfig
        !           510: drawing program to edit the plot afterwards. You can obtain the xfig program
        !           511: from its web site http://www.xfig.org/. More information about the text-format
        !           512: used for fig can be found in the fig-package.
        !           513:
        !           514: You may use the tgif terminal, which creates output suitable for reading within
        !           515: tgif (http://bourbon.cs.umd.edu:8001/tgif/), an interactive 2-D drawing tool
        !           516: under X11.
1.1.1.2   maekawa   517:
1.1.1.3 ! ohara     518: Both tgif and xfig can also be obtained from the X Window contrib distribution
        !           519: (see Q3.3).
1.1.1.2   maekawa   520:
                    521: Pstoedit can convert Postscript into a wide variety of formats. Pstoedit is
1.1.1.3 ! ohara     522: available a http://www.geocities.com/SiliconValley/Nework/1958/pstoedit/.
1.1.1.2   maekawa   523:
                    524: Gimp may be able to post-process pixel graphics generated with gnuplot.
                    525:
                    526: In general, you should use a vector graphics program to post-process vector
                    527: graphic formats, and pixel based programs for pixel graphics.
                    528:
                    529: 3.5 How do I change symbol size, line thickness and the like?
                    530:
                    531: Again, this depends on the terminal type. For PostScript, you can edit the
                    532: generated PostScript file. An overview of what means what in the PostScript
                    533: files gnuplot generates can be found at picard.tamu.edu in /pub/gnuplot/ as
1.1.1.3 ! ohara     534: gs-ps.doc. A general introduction to PostScript can be found at
1.1.1.2   maekawa   535: unix.hensa.ac.uk in /pub/misc/ukc.reports/comp.sci/reports/ as 11-92.ps.Z.
                    536:
                    537: 3.6 How do I generate plots in the GIF format?
1.1       maekawa   538:
1.1.1.3 ! ohara     539: If gnuplot was compiled with the external GD library, there is a gif terminal.
1.1       maekawa   540:
1.1.1.3 ! ohara     541: As of version 1.6, gd library dropped support for gif in favour of the superior
        !           542: png format. For those who absolutely need gif support in gnuplot, we are
        !           543: providing older versions of gd library at the gnuplot distribution sites which
        !           544: are free of Unisys patented code. Please read also the file README a the
        !           545: ftp-sites.
1.1       maekawa   546:
1.1.1.2   maekawa   547: 3.7 Can I animate my graphs?
1.1       maekawa   548:
1.1.1.3 ! ohara     549: First have a look at animate.dem in the demo directory of gnuplot. Basically,
        !           550: animated graphs are a sequence of plots in a suitable format.
1.1       maekawa   551:
1.1.1.3 ! ohara     552: Then have a look at the tool whirlgif 3.04, available at http://www.danbbs.dk/
        !           553:  dino/whirlgif. It reads run-length encoded gifs and packs them into a minimal
        !           554: animation. On the web-pages you will find a manual and an example.
1.1.1.2   maekawa   555:
                    556: You can also write a small script to get gnuplot to output a family of GIF
1.1.1.3 ! ohara     557: files, then have it execute some animator such as gifsicle: http://http://
        !           558: www.lcdf.org/ eddietwo/gifsicle or gifmerge http://http://the-labs.com/GIFMerge
1.1.1.2   maekawa   559:
                    560: mpeg_encode will encode a sequence of images into the mpeg-format.
                    561:
                    562: 3.8 How do I plot implicit defined graphs?
                    563:
1.1.1.3 ! ohara     564: Implicit graphs or curves cannot be plotted directly in gnuplot. However there
        !           565: is a workaround.
1.1.1.2   maekawa   566: gnuplot> # as example. Place your definition in the following line
                    567: gnuplot> f(x,y) = y - x**2 / tan(y)
                    568: gnuplot> set contour base
                    569: gnuplot> set cntrparam levels discrete 0.0
                    570: gnuplot> set nosurface
                    571: gnuplot> set term table
                    572: gnuplot> set out 'curve.dat'
                    573: gnuplot> splot f(x,y)
                    574: gnuplot> set out
                    575: gnuplot> set term {your usual terminal for interactive work}
                    576: gnuplot> plot 'curve.dat' w l
1.1.1.3 ! ohara     577: The trick is to draw the single contour line z=0 of the surface z=f(x,y), and
        !           578: store the resulting contour curve to a gnuplot datafile.
1.1.1.2   maekawa   579:
1.1.1.3 ! ohara     580: 4 Wanted features
1.1.1.2   maekawa   581:
                    582: 4.1 What's new in gnuplot 3.7?
                    583:
1.1.1.3 ! ohara     584: Too many things to be named here. Please refer to the NEWS file in the source
        !           585: distribution.
1.1.1.2   maekawa   586:
                    587: 4.2 Does gnuplot have hidden line removal?
                    588:
1.1.1.3 ! ohara     589: Version 3.7 supports hidden line removal on all platforms; use the command set
        !           590: hidden3d.
1.1.1.2   maekawa   591:
1.1.1.3 ! ohara     592: The 16-bit binaries of gnuplot support the hidden line removal only partially
        !           593: as the hidden-line algorithm may hit the 640k memory limit.
1.1.1.2   maekawa   594:
                    595: 4.3 Does gnuplot support bar-charts/histograms/boxes?
                    596:
1.1.1.3 ! ohara     597: Use the style "with boxes" for bar charts. To get filled boxes, you can try a
        !           598: modification by Steve Cumming and jturk, available via ftp from the contrib
        !           599: directory ftp.ucc.ie in /pub/gnuplot/contrib/gpl37fboxpatch.tar.gz.
1.1.1.2   maekawa   600:
                    601: Bernhard Reiter wrote an AWK script to post-process the fig-terminal output.
1.1.1.3 ! ohara     602: Please have a look at http://www.usf.uni-osnabrueck.de/ breiter/tools/gnuplot/
        !           603: barcharts.en.html.
1.1.1.2   maekawa   604:
                    605: 4.4 Does gnuplot support pie charts?
                    606:
1.1.1.3 ! ohara     607: It's not possible in gnuplot, but have a look at http://
        !           608: www.usf.uni-osnabrueck.de/ breiter/tools/piechart/piecharts.en.html
1.1.1.2   maekawa   609:
                    610: 4.5 Does gnuplot quarterly time charts?
                    611:
1.1.1.3 ! ohara     612: It's not possible in gnuplot, but have a look at http://ricardo.ecn.wfu.edu/
        !           613:  cottrell/qplot. The corresponding file qplot.zip can be obtained from the
        !           614: contrib directory on any gnuplot server.
1.1.1.2   maekawa   615:
                    616: 4.6 Does gnuplot support multiple y-axes on a single plot?
                    617:
                    618: Yes. You can have 2 x- and 2 y-axes per plot. See "plot".
                    619:
                    620: 4.7 Can I put multiple pages on one page?
                    621:
                    622: Yes. "set multiplot"
                    623:
1.1.1.3 ! ohara     624: If you use the postscript terminal and plot one graph per page you can use the
        !           625: program mpage (http://www.mesa.nl/pub/mpage) to print multiple logical pages
        !           626: per physical page. A similar program is the psnup program in the psutils
        !           627: package. This package is available at any CTAN mirror.
1.1.1.2   maekawa   628:
                    629: 4.8 Can I put both data files and commands into a single file?
                    630:
1.1.1.3 ! ohara     631: This is possible by the new plot "-" possibility. The plot "-" command allows
        !           632: to read the data to be plot from standard input or the current batch job.
        !           633:
        !           634: gnuplot> plot "-"
        !           635: 1 1
        !           636: 2 4
        !           637: 3 9
        !           638: <CTRL-D>
1.1.1.2   maekawa   639:
                    640: 4.9 Can I put Greek letters and super/subscripts into my labels?
                    641:
1.1.1.3 ! ohara     642: You might try using the LATEX terminal type and putting text like "\\alpha_{3}"
        !           643: or '\alpha_{3}' into it.
1.1.1.2   maekawa   644:
                    645: The enhanced option in the postscript terminal is also able to use sub- and
1.1.1.3 ! ohara     646: superscripts. It also allows to use Greek letters and symbols via symbol fonts.
1.1.1.2   maekawa   647:
                    648: If you include your gnuplot-graphs into a LATEX document you can use the
                    649: LATEX-package psfrag to typeset any characters into your graphs.
                    650:
1.1.1.3 ! ohara     651: One more possibility is to use the MetaPost terminal. It supports TEX syntax
        !           652: and is converted onto encapsulated PostScript by mpost.
        !           653:
1.1.1.2   maekawa   654: 4.10 Can I do 1:1 scaling of axes?
                    655:
                    656: Use "set size square".
                    657:
                    658: 4.11 Can I put tic marks for x and y axes into 3d plots?
                    659:
                    660: Use the "with boxes" option.
                    661:
                    662: 4.12 Does gnuplot support a driver for <graphics format>?
                    663:
                    664: To see a list of the available graphic drivers for your installation of
                    665: gnuplot, type "set term".
                    666:
                    667: Some graphics drivers are included in the normal distribution, but are
1.1.1.3 ! ohara     668: uncommented by default. If you want to use them, you'll have to change gnuplot/
        !           669: term.h, and recompile.
1.1.1.2   maekawa   670:
                    671: 4.13 Can I put different text sizes into my plots?
                    672:
                    673: Some terminals, like the postscript terminal can, others can't. Look at the
                    674: help for the different terminals.
                    675:
                    676: 4.14 How do I modify gnuplot, and apply 'patches'?
                    677:
                    678: For this, you will need to recompile gnuplot.
                    679:
1.1.1.3 ! ohara     680: Modifications people make are either done by replacing files, such as terminal
        !           681: drivers, or by 'patching'. If a file is a replacement, it will probably tell
        !           682: you in its README or in the lines at the beginning.
        !           683:
        !           684: To patch a file, you need Larry Wall's patch utility. On many UNIX systems, it
        !           685: is already installed; do a man patch to check. If it isn't, you'll have to get
        !           686: it; it can be found wherever GNU software is archived.
1.1.1.2   maekawa   687:
                    688: 4.15 How do I skip data points?
                    689:
                    690: By specifying ? as a data value, as in
1.1       maekawa   691:         1 2
                    692:         2 3
                    693:         3 ?
                    694:         4 5
                    695:
1.1.1.2   maekawa   696: 4.16 How do I plot every nth point?
1.1       maekawa   697:
1.1.1.2   maekawa   698: This can be specified with the various options for the command "plot".
1.1       maekawa   699:
1.1.1.2   maekawa   700: 4.17 How do I plot a vertical line?
1.1       maekawa   701:
1.1.1.2   maekawa   702: Depending on context, the main methods are:
                    703:
1.1.1.3 ! ohara     704:   * set arrow .... .... nohead where you have to compute explicitly the start
        !           705:     and the end of the arrow.
        !           706:   * generate (inlined) datapoints and plot them
        !           707:   * switch to parametric mode
1.1.1.2   maekawa   708:
1.1.1.3 ! ohara     709: 4.18 How do I plot data files
        !           710:
        !           711: 4.19 How do I include accentuated characters in Postscript output?
        !           712:
        !           713: To obtain accentuated characters like ü or n into postscript plots you should
        !           714: use the postscript character codes together with the appropriate encoding
        !           715: option. See the following example:
        !           716:
        !           717: gnuplot> set encoding iso_8859_1
        !           718: gnuplot> set title "M\374nchner Bierverbrauch \374ber die Jahre"
        !           719: gnuplot> plot "bier.dat" u 1:2
        !           720:
        !           721: 5 Miscellaneous
1.1.1.2   maekawa   722:
                    723: 5.1 I've found a bug, what do I do?
                    724:
                    725: First, try to see whether it actually is a bug, or whether it is a feature
                    726: which may be turned off by some obscure set-command.
                    727:
                    728: Next, see whether you have an old version of gnuplot; if you do, chances are
                    729: the bug has been fixed in a newer release.
                    730:
                    731: Fixes for bugs reported since the release of the current version are held in
1.1.1.3 ! ohara     732: the patches directory at gnuplot distribution sites. Before submitting a bug
1.1.1.2   maekawa   733: report, please check whether the bug in question has already been fixed.
                    734:
1.1.1.3 ! ohara     735: If, after checking these things, you still are convinced that there is a bug,
        !           736: proceed as follows. If you have a fairly general sort of bug report, posting
        !           737: to ~comp.graphics.apps.gnuplot is probably the way to go. If you have
        !           738: investigated a problem in detail, especially if you have a context or unified
        !           739: diff that fixes the problem, please e-email a report to
        !           740: bug-gnuplot@dartmouth.edu.
        !           741:
        !           742: The bug-gnuplot list is for reporting and collecting bug fixes, the  ~
        !           743: comp.graphics.apps.gnuplot newsgroup will be more help for finding work arounds
        !           744: or actually solving gnuplot related problems. If you do send in a bug report,
        !           745: be sure and include the version of gnuplot (including patchlevel) as shown by
        !           746: the command "show version long", terminal driver, operating system, an exact
        !           747: description of the bug and input which can reproduce the bug. Failure to
        !           748: indicate these details can render a solution to your problem almost impossible.
        !           749: Also, any context diffs should be referenced against the latest official
        !           750: version of gnuplot if at all possible.
1.1.1.2   maekawa   751:
1.1.1.3 ! ohara     752: 5.2 Can I use gnuplot routines for my own programs?
1.1.1.2   maekawa   753:
                    754: Yes. John Campbell jdc@nauvax.ucc.nau.edu has written gplotlib, a version of
1.1.1.3 ! ohara     755: gnuplot as C subroutines callable from a C program. This is available as
        !           756: gplotlib.tar.gz at ftp.nau.edu in /pub/gplotlib.tar.gz. This library has been
1.1.1.2   maekawa   757: updated to be compatible with version 3.5.
                    758:
1.1.1.3 ! ohara     759: On systems supporting the pipes, you can pipe commands to gnuplot from other
1.1.1.2   maekawa   760: programs.
                    761:
                    762: 5.3 What extensions have people made to gnuplot? Where can I get them?
                    763:
                    764: Extensions are available from ftp.ucc.ie in /pub/gnuplot/contrib/
1.1       maekawa   765:
1.1.1.2   maekawa   766: Some extensions available:
1.1       maekawa   767:
1.1.1.3 ! ohara     768:   * barchart_via_fig: awk scripts to produce barcharts with filled boxes.
        !           769:   * date-errorbar: allows dates in the hi/lo fields for errorbars.
        !           770:   * gp37os2-mouse: OS/2 binaries with mouse support (feature included in
        !           771:     current beta versions).
        !           772:   * perltk: A perl/tk canvas widget.
        !           773:   * polyg.patch: Implements a polygon plotting style.
        !           774:   * xgfe: graphical front end using the Qt widgets available at http://
        !           775:     lnc.usc.edu/docs/xgfe/xgfe.html.
        !           776:   * Gnuplot.py: A python package to create graphs from within python. More
        !           777:     information at http://monsoon.harvard.edu/ mhagger/Gnuplot/Gnuplot.html.
        !           778:
        !           779: 5.4 I need an integration, fft, iir-filter,....!
        !           780:
        !           781: Gnuplot has been and is a plotting program, no data processing or mathematical
        !           782: program suite. Therefore gnuplot can't do that. Look into the demo
        !           783: "bivariat.dem" for a basic implementation of an integration.
1.1       maekawa   784:
1.1.1.3 ! ohara     785: For more sophisticated data-processing read the next section.
1.1.1.2   maekawa   786:
1.1.1.3 ! ohara     787: 5.5 Can I do heavy-duty data processing with gnuplot? or What is beyond
        !           788: gnuplot?
        !           789:
        !           790: gnuplot alone is not suited very well for this. One thing you might try is
1.1.1.2   maekawa   791: fudgit, an interactive multi-purpose fitting program written by Martin-D.
1.1.1.3 ! ohara     792: Lacasse (isaac@frodo.physics.mcgill.ca). It can use gnuplot as its graphics
        !           793: back end and is available from ftp.physics.mcgill.ca in /pub/Fudgit/
        !           794: fudgit_2.33.tar.Z and from the main Linux server, tsx-11.mit.edu and its
        !           795: numerous mirrors around the world as /pub/linux/sources/usr.bin/
        !           796: fudgit-2.33.tar.z. Versions are available for AIX, Data General, HP-UX, IRIX 4,
        !           797: Linux, NeXT, Sun3, Sun4, Ultrix, OS/2 and MS-DOS. The MS-DOS version is
        !           798: available on simtel20 mirrors (simtel20 itself has closed down) in the "math"
        !           799: subdirectory as fudg_231.zip.
1.1.1.2   maekawa   800:
                    801: Carsten Grammes has written a fitting program which has been merged into
1.1.1.3 ! ohara     802: gnuplot 3.7.
1.1.1.2   maekawa   803:
                    804: Michael Courtney has written a program called lsqrft, which uses the
1.1.1.3 ! ohara     805: Levenberg-Marquardt - Algorithm for fitting data to a function. It is available
        !           806: from hobbes.nmsu.edu in /pub/os2/apps/analysis/lsqrft15.zip; sources, which
        !           807: should compile on Unix, and executables for MS-DOS and OS/2 are available.
        !           808: There is an interface to the OS/2 presentation manager.
        !           809:
        !           810: You might also want to look at the applications developed by the Software Tools
        !           811: Group (STG) at the National Center for Supercomputing Applications. Ftp to
        !           812: ftp.ncsa.uiuc.edu and get the file README.BROCHURE for more information.
1.1.1.2   maekawa   813:
                    814: You can also try pgperl, an integration of the PGPLOT plotting package with
1.1.1.3 ! ohara     815: Perl 5. Information can be found at http://www.ast.cam.ac.uk/AAO/local/www/kgb/
        !           816: pgperl, the source is available from ftp.ast.cam.ac.uk in /pub/kgb/pgperl/ or
        !           817: linux.nrao.edu in /pub/packages/pgperl/.
        !           818:
        !           819: Another possibility is Octave. To quote from its README: Octave is a high-level
        !           820: language, primarily intended for numerical computations. It provides a
        !           821: convenient command line interface for solving linear and nonlinear problems
        !           822: numerically. The latest released version of Octave is always available from
        !           823: http://www.che.wisc.edu/octave/ and via anonymous ftp from bevo.che.wisc.edu in
        !           824: /pub/octave. Octave is licensed under GPL (see http://www.gnu.org/copyleft/
        !           825: gpl.html). By the way, octave uses gnuplot as its plotting engine, so you get a
        !           826: data-processing program on top of gnuplot.
        !           827:
        !           828: Finally, there is scilab at http://www-rocq.inria.fr/scilab/ doing about the
        !           829: same as matlab. It is free but copyrighted software.
1.1.1.2   maekawa   830:
1.1.1.3 ! ohara     831: 5.6 I have ported gnuplot to another system, or patched it. What do I do?
1.1.1.2   maekawa   832:
1.1.1.3 ! ohara     833: If your patch is small, mail it to info-gnuplot-beta@dartmouth.edu, with a
1.1.1.2   maekawa   834: thorough description of what the patch is supposed to do, which version of
1.1.1.3 ! ohara     835: gnuplot it is relative to, etc. Also, you can send notification of the patch to
        !           836: the FAQ maintainer, if you want a mention. Please don't send the patch itself
        !           837: to me.
        !           838:
        !           839: If your modifications are extensive (such as a port to another system), place
        !           840: them on a web/ftp site for download. There is currently no possibility to
        !           841: upload patches. Send a note to info-gnuplot-beta@dartmouth.edu on where to find
        !           842: the patch, what it is supposed to do, which version of gnuplot it is to be
        !           843: applied against. For the time being (summer 1999) you can also send the patch
        !           844: to gnuplot@ftp.ucc.ie.
1.1.1.2   maekawa   845:
1.1.1.3 ! ohara     846: 5.7 I want to help in developing the next version of gnuplot. What can I do?
        !           847:
        !           848: Join the gnuplot beta test mailing list by sending a mail containing the line
        !           849: subscribe info-gnuplot-beta in the body (not the subject) of the mail to
        !           850: Majordomo@Dartmouth.EDU.
        !           851:
        !           852: Also check with http://sourceforge.net/projects/gnuplot about latest source for
        !           853: beta releases for development.
        !           854:
        !           855: 5.8 Open questions for inclusion into the FAQ?
        !           856:
        !           857: info-gnuplot-beta@Dartmouth.EDU.
        !           858:
        !           859: Please submit your questions (along with the answer) to
        !           860: info-gnuplot-beta@Dartmouth.EDU.
        !           861:
        !           862: 6 Making life easier
1.1.1.2   maekawa   863:
                    864: 6.1 How do I plot two functions in non-overlapping regions?
                    865:
                    866: Use a parametric plot. An example:
                    867: gnuplot> set parametric
                    868: gnuplot> a=1
                    869: gnuplot> b=3
                    870: gnuplot> c=2
                    871: gnuplot> d=4
                    872: gnuplot> x1(t) = a+(b-a)*t
                    873: gnuplot> x2(t) = c+(d-c)*t
                    874: gnuplot> f1(x) = sin(x)
                    875: gnuplot> f2(x) = x**2/8
                    876: gnuplot> plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2"
                    877:
                    878: You can also use gnuplot's ability to ignore mathematically undefined
1.1.1.3 ! ohara     879: expressions: the expression 1/0 is silently ignored, thus a construction like
1.1.1.2   maekawa   880: gnuplot> set xran [-10:10]
                    881: gnuplot> plot (abs(x)>0.5?1/0: x**2)
                    882: plots a quadratic function only for |x| < 0.5.
                    883:
                    884: 6.2 How do I run my data through a filter before plotting?
                    885:
1.1.1.3 ! ohara     886: If your system supports the popen() function, as Unix does, you should be able
        !           887: to run the output through another process, for example a short awk program,
        !           888: such as
1.1.1.2   maekawa   889:
                    890: gnuplot> plot "< awk ' { print $1, $3/$2 } ' file.in"
                    891:
                    892: The plot command is very powerful and is able to do some arithmetic on
                    893: datafiles. See "help plot".
                    894:
                    895: 6.3 How do I make it easier to use gnuplot with LATEX?
                    896:
                    897: There is a set of LATEX macros and shell scripts that are meant to make your
1.1.1.3 ! ohara     898: life easier when using gnuplot with LATEX. This package can be found on
        !           899: ftp.dartmouth.edu in pub/gnuplot/latex.shar, by David Kotz. For example, the
        !           900: program "plotskel" can turn a gnuplot-output file plot.tex into a skeleton file
        !           901: skel.tex, that has the same size as the original plot but contains no graph.
        !           902: With the right macros, the skeleton can be used for preliminary LATEX passes,
        !           903: reserving the full graph for later passes, saving tremendous amounts of time.
1.1.1.2   maekawa   904:
                    905: 6.4 How do I save and restore my settings?
                    906:
                    907: Use the "save" and "load" commands for this; see "help save" and "help load"
                    908: for details.
                    909:
                    910: 6.5 How do I plot lines (not grids) using splot?
                    911:
                    912: If the data in a data file for splot is arranged in such a way that each one
1.1.1.3 ! ohara     913: has the same number of data points (using blank lines as delimiters, as usual),
        !           914: splot will plot the data with a grid. If you want to plot just lines, use a
        !           915: different number of data entries (you can do this by doubling the last data
        !           916: point, for example). Don't forget to set parametric mode, of course.
1.1.1.2   maekawa   917:
1.1.1.3 ! ohara     918: 6.6 How do I plot a function f(x,y) which is bounded by other functions in the
        !           919: x-y plain?
1.1.1.2   maekawa   920:
                    921: An example:
                    922: gnuplot> f(x,y) = x**2 + y **2
                    923: gnuplot> x(u) = 3*u
                    924: gnuplot> yu(x) = x**2
                    925: gnuplot> yl(x) = -x**2
                    926: gnuplot> set parametric
                    927: gnuplot> set cont
                    928: gnuplot> splot [0:1] [0:1] u,yl(x(u))+(yu(x(u)) - yl(x(u)))*v,\
                    929: > f(x(u), (yu(x(u)) - yl(x(u)))*v)
                    930:
1.1.1.3 ! ohara     931: 6.7 How do I get rid of <feature> in a plot?
1.1.1.2   maekawa   932:
1.1.1.3 ! ohara     933: Usually, there is a set command to do this; do a gnuplot> ?set no for a short
        !           934: overview.
1.1.1.2   maekawa   935:
                    936: 6.8 How do I call gnuplot from my own programs?
                    937:
1.1.1.3 ! ohara     938: There's a code which works for a UNIX system, using (efficient) named pipes. On
        !           939: M$ Windows platforms, due to the lacking standard input of GUI programs, you
        !           940: need to use the C-code pgnuplot written by Hans-Bernhard Broeker
        !           941: broeker@physik.rwth-aachen.de. You can obtain this file on a ftp-server
1.1.1.2   maekawa   942: carrying the source for gnuplot.
                    943:
                    944: 6.9 What if I need h-bar (Planck's constant)?
                    945:
                    946: There is no predefined variable like pi. However to put h-bar as a character
1.1.1.3 ! ohara     947: into the label, you must use the PostScript terminal. You can play around with
        !           948: constructs like @{/=56 -} {/=24 h} or {/=8 @{/Symbol=24 -} _{/=14 h}} In the
        !           949: latter, the "-" (a long one in /Symbol) is non-spacing and 24-pt. The 14-pt "h"
        !           950: is offset by an 8-pt space (which is the space preceding the "_") but smaller,
        !           951: since it's written as a subscript. But these don't look too much like the hbar
        !           952: we're used to, since the bar is horizontal instead of sloped. I don't see a way
        !           953: to get that. I tried using an accent (
        !           954: 264 in isoLatin encoding), but I haven't found a way to scale and position the
        !           955: pieces correctly.
1.1.1.2   maekawa   956:
                    957: One more possibility would be {/=14 @^{/Symbol=10 -}{/=14 h}}.
                    958:
                    959: (This is a hint by Richard Crawford).
                    960:
1.1.1.3 ! ohara     961: 7 Known Problems
1.1.1.2   maekawa   962:
                    963: 7.1 Gnuplot is not plotting any points under X11! How come?
                    964:
                    965: On VMS, you need to make several symbols:
1.1       maekawa   966:
                    967:         $ gnuplot_x11 :== $disk:[directory]gnuplot_x11
                    968:         $ gnuplot :== $disk:[directory]gnuplot.exe
                    969:         $ def/job GNUPLOT$HELP disk:[directory]gnuplot.hlb
                    970:
1.1.1.2   maekawa   971: Then run gnuplot from your command line, and use "set term x11".
1.1       maekawa   972:
1.1.1.3 ! ohara     973: If you run gnuplot on Unix systems, be sure that the newest gnuplot_x11 is the
        !           974: first in your search path.
        !           975:
1.1.1.2   maekawa   976: 7.2 My isoline data generated by a Fortran program is not handled correctly.
                    977: What can I do?
1.1       maekawa   978:
1.1.1.3 ! ohara     979: Update to the newest gnuplot. Gnuplot 3.7 is able to read Fortran-style files
        !           980: where a blank line can contain more than a linefeed.
1.1       maekawa   981:
1.1.1.2   maekawa   982: 7.3 Why does gnuplot ignore my very small numbers?
1.1       maekawa   983:
1.1.1.2   maekawa   984: Gnuplot treats all numbers less than 1e-08 as zero, by default. Thus, if you
1.1.1.3 ! ohara     985: are trying to plot a collection of very small numbers, they may be plotted as
        !           986: zero. Worse, if you're plotting on a log scale, they will be off scale. Or, if
        !           987: the whole set of numbers is "zero", your range may be considered empty:
1.1       maekawa   988:
1.1.1.2   maekawa   989: gnuplot> plot 'test1'
                    990: Warning: empty y range [4.047e-19:3e-11], adjusting to [-1:1]
                    991: gnuplot> set yrange [4e-19:3e-11]
                    992: gnuplot> plot 'test1'
                    993:               ^
                    994: y range is less than `zero`
1.1       maekawa   995:
1.1.1.2   maekawa   996: The solution is to change gnuplot's idea of "zero":
                    997: gnuplot> set zero 1e-20
1.1       maekawa   998:
1.1.1.2   maekawa   999: For more information, "help set zero"
1.1       maekawa  1000:
1.1.1.3 ! ohara    1001: 7.4 Gnuplot is plotting nothing when run via gnuplot <filename>! What can I do?
1.1       maekawa  1002:
1.1.1.2   maekawa  1003: Put a pause -1 after the plot command in the file. On an X-Window System
                   1004: system, you can also use the -persist option, the X11 window is then not
                   1005: closed. Close the X11 window by typing "q" when the focus is on it.
1.1       maekawa  1006:
1.1.1.2   maekawa  1007: 7.5 My formulas are giving me nonsense results! What's going on?
1.1       maekawa  1008:
1.1.1.2   maekawa  1009: Gnuplot does integer, and not floating point, arithmetic on integer
                   1010: expressions. For example, the expression 1/3 evaluates to zero. If you want
                   1011: floating point expressions, supply trailing dots for your floating point
                   1012: numbers. Example:
1.1       maekawa  1013:
1.1.1.2   maekawa  1014: gnuplot> print 1/3
1.1       maekawa  1015:                 0
1.1.1.2   maekawa  1016: gnuplot> print 1./3.
1.1       maekawa  1017:                 0.333333
                   1018:
1.1.1.2   maekawa  1019: This way of evaluating integer expressions is shared by both C and Fortran.
                   1020:
                   1021: 7.6 Set output 'filename' isn't outputting everything it should!
                   1022:
                   1023: You need to flush the output with a closing 'set output'.
                   1024:
                   1025: 7.7 When using the LATEX-terminal, there is an error during the LATEX-run!
                   1026:
1.1.1.3 ! ohara    1027: Please upgrade to gnuplot 3.7. Some versions of its beta-release had a problem
        !          1028: in the LATEX-terminal.
        !          1029:
        !          1030: The LATEX2$\epsilon$ -core does no longer include the commands "
        !          1031: Diamond" and "
        !          1032: Box"; they are included in the latexsym package, which is part of the base
        !          1033: distribution and thus part of any LaTeX implementation. Please do not forget to
        !          1034: use this package.
1.1.1.2   maekawa  1035:
                   1036: 7.8 The exit command does not work as documented!
                   1037:
1.1.1.3 ! ohara    1038: This is a known bug and is fixed in the latest release. If you need the feature
        !          1039: please upgrade to the latest release.
1.1.1.2   maekawa  1040:
1.1.1.3 ! ohara    1041: 7.9 I can't find the demos and example files at the URLs in the documentation!
1.1.1.2   maekawa  1042:
1.1.1.3 ! ohara    1043: The examples have been removed from the NASA site. You can find the examples
        !          1044: now at http://www.gnuplot.vt.edu/gnuplot/gpdocs. There you will find both PNG
        !          1045: and GIF versions of the demo plots. There are some licensing problems with GIF
        !          1046: images, so you should probably prefer the PNG ones. They also have the
        !          1047: advantage to be much smaller in size.
1.1.1.2   maekawa  1048:
1.1.1.3 ! ohara    1049: 7.10 Calling gnuplot in a pipe or with a gnuplot-script doesn't produce a plot!
1.1.1.2   maekawa  1050:
                   1051: You can call gnuplot by using a short Perl-script like the following:
1.1.1.3 ! ohara    1052: #!/usr/local/bin/perl -w
        !          1053: open (GP, "|/usr/local/bin/gnuplot -persist") or die "no gnuplot";
        !          1054: # force buffer to flush after each write
        !          1055: use FileHandle;
        !          1056: GP->autoflush(1);
        !          1057: print GP,"set term x11;plot '/tmp/data.dat' with lines\n";
1.1.1.2   maekawa  1058: close GP
                   1059:
1.1.1.3 ! ohara    1060: Gnuplot closes its plot window on exit. The close GP command is executed, and
        !          1061: the plot window is closed even before you have a chance to look at it.
1.1.1.2   maekawa  1062:
1.1.1.3 ! ohara    1063: There are three solutions to this: first, use the pause -1 command in gnuplot
        !          1064: before closing the pipe. Second, close the pipe only if you are sure that you
        !          1065: don't need gnuplot and its plot window anymore. Last, you can use the command
        !          1066: line option -persist: this option leaves the X-Window System plot window open.
1.1.1.2   maekawa  1067:
1.1.1.3 ! ohara    1068: 8 Credits
1.1       maekawa  1069:
1.1.1.2   maekawa  1070: Gnuplot 3.7's main contributors are (in alphabetical order) Hans-Bernhard
1.1.1.3 ! ohara    1071: Broeker, John Campbell, Robert Cunningham, David Denholm, Gershon Elber, Roger
        !          1072: Fearick, Carsten Grammes, Lucas Hart, Lars Hecking, Thomas Koenig, David Kotz,
        !          1073: Ed Kubaitis, Russell Lang, Alexander Lehmann, Alexander Mai, Carsten Steger,
        !          1074: Tom Tkacik, Jos Van der Woude, James R. Van Zandt, and Alex Woo.
1.1       maekawa  1075:
1.1.1.2   maekawa  1076: This list was initially compiled by John Fletcher with contributions from
1.1.1.3 ! ohara    1077: Russell Lang, John Campbell, David Kotz, Rob Cunningham, Daniel Lewart and Alex
        !          1078: Woo. Reworked by Thomas Koenig from a draft by Alex Woo, with corrections and
        !          1079: additions from Alex Woo, John Campbell, Russell Lang, David Kotz and many
        !          1080: corrections from Daniel Lewart. Again reworked for gnuplot 3.7 by Alexander Mai
        !          1081: and Juergen v.Hagen with corrections by Lars Hecking, Hans-Bernhard Broecker
        !          1082: and other people.
1.1       maekawa  1083:
1.1.1.2   maekawa  1084: About this document ...
1.1       maekawa  1085:
1.1.1.2   maekawa  1086: Gnuplot FAQ
1.1       maekawa  1087:
1.1.1.3 ! ohara    1088: This document was generated using the LaTeX2HTML translator Version 2002-2-1
        !          1089: (1.70)
1.1       maekawa  1090:
1.1.1.3 ! ohara    1091: Copyright © 1993, 1994, 1995, 1996, Nikos Drakos, Computer Based Learning Unit,
        !          1092: University of Leeds.
        !          1093: Copyright © 1997, 1998, 1999, Ross Moore, Mathematics Department, Macquarie
        !          1094: University, Sydney.
1.1       maekawa  1095:
1.1.1.2   maekawa  1096: The command line arguments were:
1.1.1.3 ! ohara    1097: latex2html -split 0 -show_section_numbers -html_version 4.0 -nonavigation
        !          1098: faq.tex
        !          1099:
        !          1100: The translation was initiated by Lars Hecking on 2002-12-10
        !          1101: -------------------------------------------------------------------------------
1.1       maekawa  1102:
1.1.1.3 ! ohara    1103: Lars Hecking 2002-12-10

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