diff -urN gnuplot-3.7/0FAQ gnuplot-3.7.1/0FAQ --- gnuplot-3.7/0FAQ Wed Jan 6 15:50:48 1999 +++ gnuplot-3.7.1/0FAQ Wed Oct 20 17:35:42 1999 @@ -1,171 +1,133 @@ -* Please note that this is not the current official FAQ since -* I have upgraded the info in answer 4.0 - dd -* Made more changes - lh - -Archive-name: graphics/gnuplot-faq -Version: Mon Sep 23 04:23:01 CES 1996 -Posting-frequency: every 14 days -URL: http://www.uni-karlsruhe.de/~ig25/gnuplot-faq/ - - comp.graphics.apps.gnuplot - - comp.graphics.apps.gnuplot FAQ (Frequent Answered Questions) - - This is the FAQ (Frequently Answered Questions) list of the - comp.graphics.apps.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.apps.gnuplot; quotations are believed to be in the - public domain. - - If you are reading this via WWW, and you can't access the individual - pages, please select here, then try again. - - 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. Sections in this FAQ are - * 0. Meta-Questions - * 1. General Information - * 2. Setting it up - * 3. Working with it - * 4. Wanted features - * 5. Miscellaneous - * 6. Making life easier - * 7. Known problems - * 8. Credits - - -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 ? - * Q3.4: How do I post-process a gnuplot graph? - * Q3.5: How do I change symbol size, line thickness and the - like? - * Q3.6: How do I generate plots in GIF format? - - Section 4: Wanted features - - * Q4.0: What's new in gnuplot 3.7? - * 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? - * Q4.9: Does gnuplot support a driver for ? - * Q4.10: Can I put different text sizes into my plots? - * Q4.11: How do I modify gnuplot? - * Q4.12: How do I skip data points? - - 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? - * Q5.6: I want to help in developing gnuplot 3.7. What can 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? - * Q6.7: How do I get rid of ? - * Q6.8: How do I call gnuplot from my own programs ? - - 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 - ! What can I do? - * Q7.5: My formulas are giving me nonsense results! What's going - on? - * Q7.6: My Linux gnuplot complains about a missing gnuplot_x11. - What is wrong? - * Q7.7: set output 'filename' isn't outputting everything it - should! - - Section 8: Credits - - 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.apps.gnuplot, comp.answers and - news.answers. Like many other FAQ's, its newest (plaintext) - version is available via anonymous ftp from - ftp://rtfm.mit.edu/pub/usenet/news.answers/graphics/gnuplot - -faq. - - If you have access to the WWW, you can get the newest version - of this document from - http://www.uni-karlsruhe.de/~ig25/gnuplot-faq/ - - Q0.2: Where do I send comments about this document? - Send comments, suggestions etc. via e-mail to Thomas - Koenig, Thomas.Koenig@ciw.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. +[next] [up] [previous] - Q1.2: How did it come about and why is it called gnuplot? - The authors of gnuplot are: + Gnuplot FAQ - Thomas Williams, Colin Kelley, Russell Lang, Dave Kotz, John - Campbell, Gershon Elber, Alexander Woo and many others. +Contents - The following quote comes from Thomas Williams: + * Contents + * Meta - Questions + o 0.1 Where do I get this document? + o 0.2 Where do I send comments about this document? + * 1. General Information + o 1.1 What is gnuplot? + o 1.2 How did it come about and why is it called gnuplot? + o 1.3 Does gnuplot have anything to do with the FSF and the GNU + project? + o 1.4 What does gnuplot offer? + o 1.5 Is gnuplot suitable for batch processing? + o 1.6 Can I run gnuplot on my computer? + o 1.7 Legalize it! + o 1.8 Is gnuplot Y2K compliant? + o 1.9 Where do I get further information? + * 2. Setting it up + o 2.1 What is the current version of gnuplot? + o 2.2 Where can I get gnuplot? + o 2.3 How do I get gnuplot to compile on my system? + o 2.4 What documentation is there, and how do I get it? + * 3. Working with it. + o 3.1 How do I get help? + o 3.2 How do I print out my graphs? + o 3.3 How do I include my graphs in ? + o 3.4 How do I post-process a gnuplot graph? + o 3.5 How do I change symbol size, line thickness and the like? + o 3.6 How do I generate plots in the GIF format? + o 3.7 Can I animate my graphs? + o 3.8 How do I plot implicit defined graphs? + * 4. Wanted features + o 4.1 What's new in gnuplot 3.7? + o 4.2 Does gnuplot have hidden line removal? + o 4.3 Does gnuplot support bar-charts/histograms/boxes? + o 4.4 Does gnuplot support pie charts? + o 4.5 Does gnuplot quarterly time charts? + o 4.6 Does gnuplot support multiple y-axes on a single plot? + o 4.7 Can I put multiple pages on one page? + o 4.8 Can I put both data files and commands into a single file? + o 4.9 Can I put Greek letters and super/subscripts into my labels? + o 4.10 Can I do 1:1 scaling of axes? + o 4.11 Can I put tic marks for x and y axes into 3d plots? + o 4.12 Does gnuplot support a driver for ? + o 4.13 Can I put different text sizes into my plots? + o 4.14 How do I modify gnuplot, and apply 'patches'? + o 4.15 How do I skip data points? + o 4.16 How do I plot every nth point? + o 4.17 How do I plot a vertical line? + * 5. Miscellaneous + o 5.1 I've found a bug, what do I do? + o 5.2 Can I use gnuplotroutines for my own programs? + o 5.3 What extensions have people made to gnuplot? Where can I get + them? + o 5.4 Can I do heavy-duty data processing with gnuplot? + o 5.5 I have ported gnuplotto another system, or patched it. What do + I do? + o 5.6 I want to help in developing the next version of gnuplot. What + can I do? + * 6. Making life easier + o 6.1 How do I plot two functions in non-overlapping regions? + o 6.2 How do I run my data through a filter before plotting? + o 6.3 How do I make it easier to use gnuplot with LATEX? + o 6.4 How do I save and restore my settings? + o 6.5 How do I plot lines (not grids) using splot? + o 6.6 How do I plot a function f(x,y) which is bounded by other + functions in the x-y plain? + o 6.7 How do I get rid of ? + o 6.8 How do I call gnuplot from my own programs? + o 6.9 What if I need h-bar (Planck's constant)? + * 7. Known Problems + o 7.1 Gnuplot is not plotting any points under X11! How come? + o 7.2 My isoline data generated by a Fortran program is not handled + correctly. What can I do? + o 7.3 Why does gnuplot ignore my very small numbers? + o 7.4 Gnuplot is plotting nothing when run via gnuplot ! + What can I do? + o 7.5 My formulas are giving me nonsense results! What's going on? + o 7.6 Set output 'filename' isn't outputting everything it should! + o 7.7 When using the LATEX-terminal, there is an error during the + LATEX-run! + o 7.8 The exit command does not work as documented! + o 7.9 I can't find the demos and example files at the URLs in the + documentation! + o 7.10 Calling gnuplot in a pipe or with a gnuplot-script doesn't + produce aplot! + * 8. Credits + +Meta - Questions + +0.1 Where do I get this document? + +This document is posted about once every two weeks to the newsgroups +comp.graphics.apps.gnuplot . Its newest (plaintext) version is available via +anonymous ftp from ftp.ucc.ie in /pub/gnuplot/faq/gnuplot-faq.txt . + +If you have access to the WWW, you can get the newest version of this +document from ~http://www.ucc.ie/gnuplot/gnuplot-faq.html . + +Today's version is version Revision: 1.4, dated Date: 99/10/07 09:37:56 + +0.2 Where do I send comments about this document? + +Send comments, suggestions etc via email to the developer newsgroup +info-gnuplot-beta@Dartmouth.EDU and additionally to j.vonhagen@web.de . + +1. General Information + +1.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. + +This document deals with gnuplot Version 3.7 which is the latest official +release as of October 20, 1999. References to bug-fix versions or (recent) +beta versions are explicitly marked. + +1.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 @@ -174,12 +136,12 @@ 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 + 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 @@ -187,994 +149,910 @@ 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. +1.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. It used to be distributed by the FSF, +however, due to licensing issues it is no longer. + +Gnuplot is freeware in the sense that you don't have to pay for it. However +it is not freeware in the sense that you would be allowed to distribute a +modified version of your gnuplot freely. Please read and accept the +Copyright file in your distribution. + +1.4 What does gnuplot offer? + + * Plotting of two-dimensional functions and data points in many different + styles (points, lines, error bars) + * computations in integer, float and complex arithmetic + * 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 + +1.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. + +1.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, +BeOS, and the Macintosh. + +Please notify the FAQ-maintainer of any further ports you might be aware of. + +You should be able to compile the gnuplot source more or less out of the box +on any reasonable standard (ANSI/ISO C, POSIX) environment. + +1.7 Legalize it! + +Gnuplot is freeware authored by a collection of volunteers, who cannot make +any legal statement about the compliance or non-compliance of gnuplot or its +uses. There is also no warranty whatsoever. Use at your own risk. + +Citing from the README of a mathematical subroutine package by R. Freund: + + For all intent and purpose, any description of what the codes are + doing should be construed as being a note of what we thought the + codes did on our machine on a particular Tuesday of last year. If + you're really lucky, they might do the same for you someday. Then + again, do you really feel *that* lucky? + +1.8 Is gnuplot Y2K compliant? + +Gnuplot's compliance depends in part on the compliance of the underlying +operating system and hardware. The only use gnuplot makes of a system- +supplied date is in the "set timestamp" command, which simply echos the date +on the plot. If the underlying OS cannot produce an accurate time string, +then the "set timestamp" command may fail to print the correct date on +plots. + +In gnuplot 3.5, if the user chooses to use %y in a timestamp format, rather +than %Y, it will print 2-digit rather than 4-digit years. The effects depend +on the importance you place on the timestamps printed on plots. + +Gnuplot3.7 also allows the use of time/date data as variables, but the user +has complete control over the input format of the data and the output format +of the tic labels - the same 2-digit "%y" (interpreted as 1900+) and 4-digit +"%Y" formats are both available. But again, these are user-specifiable, so +if there is a Y2K problem here, it is the responsibility of the user. + +Of course, gnuplot is built by executing a makefile, which may well be +date-dependent. So if the operating system has a Y2K problem, the process of +building a new executable of gnuplot may be affected. But that wouldn't be a +problem with gnuplot per se. + +IMPORTANT NOTICE + +As of gnuplot beta version 3.7.0.9, the interpretation of the "%y" two digit +year specifier was changed in accordance with the recommendations of The +Open Group and all major Unix vendors. When a century is not otherwise +specified, values in the range 69-99 refer to the twentieth century and +values in the range 00-68 refer to the twenty-first century. Be very careful +when interpreting 2-digit year expressions. + +1.9 Where do I get further information? + +The following sites have more information about gnuplot. + + * ~http://www.comnets.rwth-aachen.de/doc/gnu/gnuplot37/gnuplot.html an + online documentation in html-format + * ~http://www.usf.uni-osnabrueck.de/ breiter/tools/gnuplot/index.en.html + has many links to many features and add-ons for gnuplot + * ~http://web.math-cs.uni.edu/cs/Help/gnuplot/TOC.html contains an online + tutorial + * ~http://brian.me.tufts.edu/GnuplotInLaTeX/ contrains infos abount + gnuplot and LATEX + * ~http://www.eso.org/ ndevilla/gnuplot/ explains the use of a gnuplot + API in ANSI C (commonly known as gnuplot_(pipes) + * ~http://ricardo.ecn.wfu.edu/ cottrell/qplot/ on how to plot quarterly + time data + * ~http://monsoon.harvard.edu/ mhagger/download a Python interface for + gnuplot + * ftp.thewrittenword.com in /free/by-package/ contains Solaris, IRIX, + HP-UX and Digital Unix binaries + * ~http://www.sci.muni.cz/ mikulik/gnuplot.html has Petr's famous OS/2 + mouse support and the pm3d terminal for colour 3d surfaces. Furthermore + some more links to other sites + +Some documentation is available in other languages than English. Those +include: + + * ~http://mucha.obspm.fr/ grouss/gnuplt/gnuplot.html contient des + informations dans la langue de Molière: les 1ers pas avec gnuplot, + malheureusement seulement version 3.5 + * ~http://www.al.lu/euler/gnuplot.shtml encore des informations en langue + française avec possibilité de téléchargement des versions binaires + +Here are some more sites, however these are somewhat outdated in carrying +still references to beta versions. If you download software from there you +should be aware that beta versions are not officially endorsed. + + * ~http://www.cs.dartmouth.edu/gnuplot_info.html slightly outdated site + for the 3.6 beta version, but also a web-gateway to the users' + newsgroup + * ~http://members.theglobe.com/gnuplot/ basically same as above. + * ~http://users.ece.gatech.edu/ schooley/gnuplot.html contains a + Macintosh version based on 3.6 beta 322 + +The following sites were said to exist, howevere they seem to be down right +now. + + * ~http://www.geocities.com/SiliconValley/Foothills/6647/ the copyright + statement and some binaries contains ads + * ~http://www.delorie.com/gnu/docs/gnuplot/gplot_toc.html doesn't work + * picard.tamu.edu in /pub/gnuplot gives a tutorial + * ~http://feff.phys.washington.edu/ ravel/gnuplot has a new mode for the + users of (X)Emacs + +2. Setting it up + +2.1 What is the current version of gnuplot? + +The current version of gnuplot is 3.7, which has many improvements over 3.5. +3.6 was never released to avoid confusions with the beta versions. + + +2.2 Where can I get gnuplot? + +The source distribution ("gnuplot-3.7.tar.gz" or a similar name) is +available from the official distribution site and its mirrors. + +The main server is ftp.ucc.ie in /pub/gnuplot/ . This server is mirrored by +several others, among those are + + * mirror.aarnet.edu.au in /pub/gnuplot/ + * ftp.dartmouth.edu in /pub/gnuplot/ + * ftp.irisa.fr in /pub/gnuplot/ + * ftp.gnuplot.vt.edu in /pub/gnuplot/ + +You can also have a look at the following WWW-pages which provide a source +to obtain gnuplot: + + * ~http://members.theglobe.com/gnuplot/ + * ~http://www.geocities.com/SiliconValley/Foothills/6647/ + * ~http://mirror.aarnet.edu.au/pub/gnuplot/ + +The current version for the Macintosh is 2.04b, based on gnuplot 3.5 +pre3.6beta338, and is available from + + * ~http://users.ece.gatech.edu/ schooley/ . + +Unfortunately, this version does not seem to be maintained anymore. + +Source and binary distributions for the Amiga are available on Aminet +ftp.wustl.edu in aminet/ and its mirrors, for example ftp.uni-kl.de, +oes.orst.edu or ftp.luth.se. + +MS-DOS and MS-Windows binaries are available from the above servers and are +called gp37dos.zip, gp37dj.zip, gp37w16.zip, gp37mgw.zip, gnuplot3.7cyg.zip. + +OS/2 binaries are called gp37os2.zip. + +An X11 Window System front-end is available at +~http://www.flash.net/ dmishee/xgfe/xgfe.html . + +The NeXTSTEP front end can be found at next-ftp.peak.org in +/pub/next/binaries/plotting/Gnuplot1.2_bin.tar.Z . + +A version for OS-9/68K can be found at cabrales.cs.wisc.edu in +/pub/OSK/GRAPHICS/gnuplot32x.tar.Z ; it includes both an X-Window Systems +and a non - X-Window Systems version. + +Versions for the Atari ST and TT, which include some GEM windowing support, +are available from ftp.uni-kl.de in /pub/atari/graphics/ , as gplt35st.zip +and gplt35tt.zip. They work best under MiNT. + +Executable files, plus documentation in Japanese, exist for the X680x0 on +ftp.csis.oita-u.ac.jp in /pub/x68k/fj.binaries.x68000/vol2 . + +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. + +If you can't locate a working archie server, you can use other web-based +search engines for searching for gnuplot. One of these would be Lycos at +~http://ftpsearch.lycos.com/ . + +As of June 1999, the gnuplot distribution is also mirrored at the +Comprehensive TeX Archive Network (CTAN) in the graphics/gnuplot directory. +See + + * ~http://www.ctan.org/ . + +Bug fixes can also be found at gnuplot distribution sites in the patches +directory. + +2.3 How do I get gnuplot to compile on my system? + +As you would any other installation. Read the files README.1ST and README. + +For Unix, use configure and make. For DOS, if you are using bash and DJGPP, +you can just run djconfig.sh. For other platforms, copy the relevant +makefile from config/ to src, change to src and run make. + +2.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 TEXonly + +PostScript copies of the documentation can be ftp'd from ftp.dartmouth.edu +in /pub/gnuplot , as manual.ps.Z and tutorial.ps.Z + +The documentation is built during the installation if you have LATEX +installed on your system, look in the directories docs and tutorial. + +Documentation about gnuplot is available in the most common formats at the +gnuplot distribution sites in the files gpdoc.zip and gpdoc2.zip. + +3. Working with it. + +3.1 How do I get help? + +Read this document. + +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. + +If all these fail, please upgrade to the newest version of gnuplot or urge +your system-administrator to do so. Then post a question to +comp.graphics.apps.gnuplot or send mail to the gatewayed mailing list +info-gnuplot@dartmouth.edu . Do not forget to cite the version number and +the operating system. If you want to subscribe to the mailing list, send a +mail to majordomo@dartmouth.edu with the body of the message being +'subscribe info-gnuplot'. Please don't do this if you can get +comp.graphics.apps.gnuplot directly. If you post a question there, it is +considered good form to solicit e-mail replies and post a summary. + +3.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 the X-Window System. + +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> + +In Microschrott Windows you click in the upper left corner of the graph +window and print directly from there. + +3.3 How do I include my graphs in ? + +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. Vector formats should be prefered, as +you can scale your graph later to the right size. + +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-DOSns OS/2), you can use emTeX, otherwise use the LATEXterminal 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. + +The PBMPLUS package is available in the contrib distribution for the +X-Window System. The original site for this is ftp.x.org in /contrib/ . +There are many mirrors, e.g. ftp.tu-darmstadt.de in /pub/X11/contrib/ or . +sunsite.unc.edu in /pub/X11/contrib/ . + +The most recent release of pbm by the author is dated December 91 and is +called pbmplus10dec91.tar.Z. + +There is new version including lots of patches from the net that is not +maintained by the author called netpbm, with the newest version called +netpbm-1mar1994.tar.gz. + +Check archie (see Q2.2) for an archive site near you. + +For Microso$t Windows and MacOS you can use the clip board to copy your +graph and paste it into your favourite Windows or MacOS word processor. + +3.4 How do I post-process a gnuplot graph? + +This depends on the terminal type you use. + +You can use the terminal type fig (you may need to recompile gnuplot to +enable this terminal type, by putting #define FIG into ), and use +the xfig drawing program to edit the plot afterwards. You can obtain the +xfig program from its web site ~http://www.xfig.org/ . More information +about the text-format used for fig can be found in the fig-package. + +You may use the tgif terminal, which creates output suitable for reading +within tgif (~http://bourbon.cs.umd.edu:8001/tgif/ ), an interactive 2-D +drawing tool under X11. + +Both tgif and xfig can also be obtained from the X Window contrib +distribution (see Q3.3). + +Pstoedit can convert Postscript into a wide variety of formats. Pstoedit is +available a ~http://www.geocities.com/SiliconValley/Nework/1958/pstoedit/ . + +Gimp may be able to post-process pixel graphics generated with gnuplot. + +In general, you should use a vector graphics program to post-process vector +graphic formats, and pixel based programs for pixel graphics. + +3.5 How do I change symbol size, line thickness and the like? + +Again, this depends on the terminal type. For PostScript, you can edit the +generated PostScript file. An overview of what means what in the PostScript +files gnuplot generates can be found at picard.tamu.edu in /pub/gnuplot/ as +gs-ps.doc. A general introduction to PostScript can be found at +unix.hensa.ac.uk in /pub/misc/ukc.reports/comp.sci/reports/ as 11-92.ps.Z. + +3.6 How do I generate plots in the GIF format? - However, the FSF has decided to distribute gnuplot as part of - the GNU system, because it is useful, redistributable software. +If gnuplot was compiled with the external GD library, there is a gif +terminal. - Q1.4: What does gnuplot offer? +As of version 1.6, gd library dropped support for gif in favour of the +superior png format. For those who absolutely need gif support in gnuplot, +we are providing older versions of gd library at the gnuplot distribution +sites which are free of Unisys patented code. Please read also the file +README a the ftp-sites. - + 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.7, which has many - improvements over 3.5 - - Q2.2: Where can I get gnuplot? - 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, soon to be 129.170.8.11], - the file is called /pub/gnuplot/gnuplot-3.7.tar.Z. Official - mirrors of that distribution are (for Australia) - ftp.monash.edu.au [130.194.11.18] and (for Europe) - ftp.irisa.fr [131.254.254.10]. 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 - /Simtel/msdos/plot/gpt35*.zip, - + garbo.uwasa.fi (Europe) [193.166.120.5] 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. - - There is a special MS-DOS version for 386 or better processors; - it is available from the official gnuplot sites as DOS34.zip. - - OS/2 2.x binaries are at ftp-os2.nmsu.edu [128.123.35.151], - in /os2/2.x/unix/gnuplt35.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 - ftp://next-ftp.peak.org/pub/next/binaries/plotting/ as - Gnuplot1.2_bin.tar.Z. - - 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. - - There is a version for the Macintosh at - ftp://ftp.ee.gatech.edu/pub/mac/gnuplot/ which includes - binaries for 68000-based Macs with and without FPU and native - support for PowerMacs. - - Versions for the Atari ST and TT, which include some GEM - windowing support, are available from - ftp://ftp.uni-kl.de/pub/atari/graphics/, as gplt35st.zip - and gplt35tt.zip. They work best under MiNT. - - Executable files, plus documentation in Japanese, exist for the - X680x0 on - ftp://ftp.csis.oita-u.ac.jp/pub/x68k/fj.binaries.x68000/vol - 2. - - 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 - - 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 - DTBS= line and run again. If you are making X11 on a sun, type - 'make x11_sun'. - - For compiling gnuplot under Irix 5.2 and Irix 5.3, there is a - patch in the file lvs.zip in the contrib directory at - ftp.dartmouth.edu. - - 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 - - Andy Liaw and Dick Crawford have written a 16-page user's - guide. It is available from - ftp://picard.tamu.edu/pub/gnuplot/ as gptug.tex (also get - example.tex from the same directory), gptug.dvi or gptug.ps. - - At the same site, there's a two- page instruction sheet for the - enhpost PostScript driver (see Q4.6 ) as enhpost.guide.ps - and a short guide to gnuplot PostScript files, as gp-ps.doc. - - A Chinese translation of the gnuplot manual can be found on - ftp://servers.nctu.edu.tw/misc/environment/NCTU_EV/classnot - e/gnuplot.ps.gz . - - There is a WWW hompepage for gnuplot at - http://www.cs.dartmouth.edu/gnuplot_info.html, which - includes the reference manual and a demo. - - There are two more Chinese documents about gnuplot: a 72 - page - User's guide - ftp://phi.sinica.edu.tw/pub/aspac/doc/94/94002.ps.gz and a - 28 - page Touring Guide - ftp://phi.sinica.edu.tw/pub/aspac/doc/95/95006.ps.gz. Both - documents are in PostScript format and gzipped. - - - 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.apps.gnuplot or send mail - to the gatewayed mailing list info-gnuplot@dartmouth.edu. If - you want to subscribe to the mailing list, send a mail to - majordomo@dartmouth.edu with the body of the message being - 'subscribe info-gnuplot'. Please don't do this if you can get - comp.graphics.apps.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 the X Window system. - - - 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 ? - 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. - - The PBMPLUS package is available in the contrib distribution - for the X Window System. The original site for this is - ftp://ftp.x.org/contrib/. There are many mirrors, e.g. - ftp://ftp.th-darmstadt.de/pub/X11/contrib/ or . - ftp://sunsite.unc.edu/pub/X11/contrib/. - - The most recent release of pbm by the author is dated December - 91 and is called pbmplus10dec91.tar.Z - - There is new version including lots of patches from the net - that is not maintained by the author called netpbm, with the - newest version called netpbm-7dec1993.tar.gz. - - Check archie (see Q2.2 ) for an archive site near you. - - Q3.4: How do I post-process a gnuplot graph? - This depends on the terminal type you use. - - You can use the terminal type fig (you may need to recompile - gnuplot to enable this terminal type, by putting #define FIG - into ), and use the xfig drawing program to edit the - plot afterwards. - - For PostScript output, you may be able to use the pstotgif - script (which calls GhostScript) to convert PostScript into the - format of the tgif drawing program. Tgif is also able to save - in PostScript format. - - Both tgif and xfig can be obtained from the X Window contrib - distribution (see Q3.3). - - Another possibility for modifying PostScript output appears to - be IslandDraw, a commercial drawing program for UNIX - workstations. - - For Windows, there is another alternative, PageDraw. It can - post-process AI (Adobe Illustrator) files, and has a converter - from PostScript to AI. It can be downloaded from - http://www.wix.com/PageDraw/. - - Q3.5: How do I change symbol size, line thickness and the like? - Again, this depends on the terminal type. For PostScript, you - can edit the generated PostScript file. An overview of what - means what in the PostScript files gnuplot generates can be - found at ftp://picard.tamu.edu/pub/gnuplot/ as gs-ps.doc. - A general introduction to PostScript can be found at - ftp://unix.hensa.ac.uk/pub/misc/ukc.reports/comp.sci/repor - ts/ as 11-92.ps.Z. - - Q3.6: How do I generate plots in GIF format? - In gnuplot version 3.5, use the pbm terminal and use the - PBMPLUS package or other utilities to convert the resulting - bitmap (see Q 3.3 for how to get the PBMPLUS package). - - From 3.7 on, there is a gif terminal. - - - Section 4: Wanted features - - Q4.0: What's new in gnuplot 3.7? - Please refer to the NEWS file in the source distribution. - - 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; use the style "with boxes" for bar - charts. To get filled boxes, you can try a modification by - Steve Cumming, available via ftp from - ftp://grebe.geog.ubc.ca/pub/gnuplot as box.tar. - - Q4.3: Does gnuplot support multiple y-axes on a single plot? - Yes, with two unofficial mods, multiplot.shar and borders.shar. - They can be obtained from - ftp://ftp.dartmouth.edu/pub/gnuplot/contrib/multi_woo.zip - or ftp://ftp.cygnus.edu/incoming/gpx38.zip. - - Also, 3.7 supports this capability. - - Q4.4: Can I put multiple plots on a single page? - Yes, with the multiplot.shar mod, or if you are running gnuplot - 3.7. 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? - This feature is in gnuplot 3.7. - - 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. - - 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 [152.78.192.42] and get enhpost.trm, - written by David Denholm and Matt Heffron. To install it, - follow the instructions at the top of the file, then recompile. - enhpost is also included in gnuplot 3.7. - - Q4.7: Can I do 1:1 scaling of axes? - Not easily in 3.5; in 3.7, you can use "set size square". - - Q4.8: Can I put tic marks for x and y axes into 3d plots? - In version 3.5, you can; use the "with boxes" option. - - Q4.9: Does gnuplot support a driver for ? - To see a list of the available graphic drivers for your - installation of gnuplot, type "set term". - - Some graphics drivers are included in the normal distribution, - but are uncommented by default. If you want to use them, you'll - have to change ~gnuplot/term.h, and recompile. - - Q4.10: Can I put different text sizes into my plots? - If you use PostScript output, you can use Dave Denholm's and - Matt Heffron's updated PostScript driver, - /sotona.phys.soton.ac.uk:/enhpost.trm (see also Q4.6 ). - Else, use 3.7. - - Q4.11 How do I modify gnuplot, and apply 'patches'? - For this, you will need to recompile gnuplot. - - Modifications people make are either done by replacing files, - such as terminal drivers, or by 'patching'. If a file is a - replacement, it will probably tell you in its README or in the - lines at the beginning. - - To patch a file, you need Larry Wall's patch utility. On many - UNIX systems, it is already installed; do a man patch to check. - If it isn't, you'll have to get it; it can be found wherever - GNU software is archived. +3.7 Can I animate my graphs? - Q4.12 How do I skip data points? - By specifying ? as a data value, as in +First have a look at animate.dem in the demo directory of gnuplot. +Basically, animated graphs are a sequence of plots in a suitable format. +Then have a look at the tool whirlgif 3.04, available at +~http://www.danbbs.dk/ dineo/whirlgif . It reads run-length encoded gifs and +packs them into a minimal animation. On the web-pages you will find a manual +and an example. + +You can also write a small script to get gnuplot to output a family of GIF +files, then have it execute some animator such as gifsicle: +~http://http://www.lcdf.org/ eddietwo/gifsicle or gifmerge +~http://http://the-labs.com/GIFMerge + +mpeg_encode will encode a sequence of images into the mpeg-format. + +3.8 How do I plot implicit defined graphs? + +Implicit graphs or curves cannot be plotted directly in gnuplot. However +there is a workaround. + +gnuplot> # as example. Place your definition in the following line +gnuplot> f(x,y) = y - x**2 / tan(y) +gnuplot> set contour base +gnuplot> set cntrparam levels discrete 0.0 +gnuplot> set nosurface +gnuplot> set term table +gnuplot> set out 'curve.dat' +gnuplot> splot f(x,y) +gnuplot> set out +gnuplot> set term {your usual terminal for interactive work} +gnuplot> plot 'curve.dat' w l + +The trick is to draw the single contour line z=0 of the surface z=f(x,y), +and store the resulting contour curve to a gnuplot datafile. + +4. Wanted features + +4.1 What's new in gnuplot 3.7? + +Too many things to be named here. Please refer to the NEWS file in the +source distribution. + +4.2 Does gnuplot have hidden line removal? + +Version 3.7 supports hidden line removal on all platforms; use the command +set hidden3d. + +The 16-bit binaries of gnuplot support the hidden line removal only +partially as the hidden-line algorithm may hit the 640k memory limit. + +4.3 Does gnuplot support bar-charts/histograms/boxes? + +Use the style "with boxes" for bar charts. To get filled boxes, you can try +a modification by Steve Cumming and jturk, available via ftp from the +contrib directory ftp.ucc.ie in /pub/gnuplot/contrib/gpl37fboxpatch.tar.gz . + +Bernhard Reiter wrote an AWK script to post-process the fig-terminal output. +Please have a look at +~http://www.usf.uni-osnabrueck.de/ breiter/tools/gnuplot/barcharts.en.html . + +4.4 Does gnuplot support pie charts? + +It's not possible in gnuplot, but have a look at +~http://www.usf.uni-osnabrueck.de/ breiter/tools/piechart/piecharts.en.html + +4.5 Does gnuplot quarterly time charts? + +It's not possible in gnuplot, but have a look at +~http://ricardo.ecn.wfu.edu/ cottrell/qplot . The corresponding file +qplot.zip can be obtained from the contrib directory on any gnuplot server. + +4.6 Does gnuplot support multiple y-axes on a single plot? + +Yes. You can have 2 x- and 2 y-axes per plot. See "plot". + +4.7 Can I put multiple pages on one page? + +Yes. "set multiplot" + +If you use the postscript terminal and plot one graph per page you can use +the program mpage (~http://www.mesa.nl/pub/mpage ) to print multiple logical +pages per physical page. A similar program is the psnup program in the +psutils package. This package is available at any CTAN mirror. + +4.8 Can I put both data files and commands into a single file? + +This feature is in gnuplot 3.7 when using the set multiplot command. + +4.9 Can I put Greek letters and super/subscripts into my labels? + +You might try using the LATEXterminal type and putting text like +"\alpha_{3}" into it. + +The enhanced option in the postscript terminal is also able to use sub- and +superscripts. + +If you include your gnuplot-graphs into a LATEX document you can use the +LATEX-package psfrag to typeset any characters into your graphs. + +4.10 Can I do 1:1 scaling of axes? + +Use "set size square". + +4.11 Can I put tic marks for x and y axes into 3d plots? + +Use the "with boxes" option. + +4.12 Does gnuplot support a driver for ? + +To see a list of the available graphic drivers for your installation of +gnuplot, type "set term". + +Some graphics drivers are included in the normal distribution, but are +uncommented by default. If you want to use them, you'll have to change + gnuplot/term.h, and recompile. + +4.13 Can I put different text sizes into my plots? + +Some terminals, like the postscript terminal can, others can't. Look at the +help for the different terminals. + +4.14 How do I modify gnuplot, and apply 'patches'? + +For this, you will need to recompile gnuplot. + +Modifications people make are either done by replacing files, such as +terminal drivers, or by 'patching'. If a file is a replacement, it will +probably tell you in its README or in the lines at the beginning. + +To patch a file, you need Larry Wall's patch utility. On many UNIX systems, +it is already installed; do a man patch to check. If it isn't, you'll have +to get it; it can be found wherever GNU software is archived. + +4.15 How do I skip data points? + +By specifying ? as a data value, as in 1 2 2 3 3 ? 4 5 - Q4.13 How do I plot every nth point? - You can apply the patch point_skip from the contrib section - (see Q5.3 or, assuming you have awk installed on your - system, you can use the following line: - - - gnuplot> plot "< awk '{if(NR%5==0)print}' file.dat" - - plots every 5th line, and - - gnuplot> plot "< awk '$0 !~ /^#/ {if(NR%40==0)print $1, $4}' file.dat" - - plots every 40th line while skipping commented lines. - - - 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.apps.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.apps.gnuplot newsgroup 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 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. This library - has been updated to be compatible with version 3.5. +4.16 How do I plot every nth point? - Q5.3: What extensions have people made to gnuplot? Where can I get - them? - __Extensions are available from - ftp://ftp.dartmouth.edu/pub/gnuplot/contrib/ . It contains - the following files: - - Point Skips - - + _Data Filtering_ Instead of just having two params - following the style param, there are now 4: - o 1: line_type - o 2: point_type - o 3: point_skip - gives the number of data samples per - plotted point - o 4: point_offs - gives the sample number on which to plot - the first point - Thus points are plotted only for the samples n satisfying n = - point_skip*i + point_offs for some non-negative integer i. - From: - pixar!sun!prony.Colorado.EDU!clarkmp@ucbvax.berkeley.edu - (Michael Clark) - + _Point Skip with Awk_ With UNIX, - -gnuplot> plot "< awk '{if(NR%5==0)print$0}' file.dat" - From: James Darrell McCauley, mccauley@ecn.purdue.edu - + _New Xlib mods._ From: gregg hanna - (gregor@kafka.saic.com) - - Vectors and Arrows - + _Program to convert lines to vectors_ This program turns - line segments into line segments with a half-arrow at the - head: by uncommenting two lines below, the arrowhead will be - a triangle. optional arguments: size angle where size is a - fraction of each vector's magnitude and angle is in degrees - all data taken from standard input, and output to standard - output. typical invocation: - -arrow 0.2 15 vector.heads - From: andrew@jarthur.claremont.edu (Andrew M. Ross) - + _Vect2gp_, an awk script to make gnuplot command script - to draw a vector field map. From: hiro@ice3.ori.u-tokyo.ac.jp - (Yasu-Hiro YAMAZAKI) - + _GNUPLOT to SIPP_ This is a "far from perfect" converter - that takes gnuplot table output and splits it in polygons. - Then it calls sipp to render it. You get sipp from - isy.liu.se:/pub/sipp or ask archie. From: - chammer@POST.uni-bielefeld.de (Carsten Hammer) - - Histograms and Pie Charts - + _Histogram C program_ The short C program below is a - filter that calculates a histogram from a sequence of numbers - and prints the output in such a format that Gnuplot can plot - the histogram by the command sequence - - !histogram < datain > tmp; - plot "tmp" with impulses - From: mustafa@seas.smu.edu (Mustafa Kocaturk) - + _HG_ is an automatic histogram generator. it reads a - column of data from an input file and emits a [log] histogram - ks does ks or chi^2 tests on a set of input arrays. you need - the "numerical recipes in C" library somewhere on your system - to link this one. I can not undertake to fix bugs or add - features, but I might do it if asked. From: Steve Cumming - stevec@geog.ubc.ca - + _Piechart C program_ The short C program below formats - data for display as a piechart. From: mccauley@ecn.purdue.edu - (James Darrell McCauley) - - Interprocess Communications - + _Notes of Windows Hooks_ From: Maurice - Castro,maurice@bruce.cs.monash.edu.au - + _Named Pipes Example _From: - dtaber@deathstar.risc.rockwell.com (Don Taber) - + _PipeLib_ What the library does is set up to 20 programs - going (like gnuplot), then allows you to send to them as if - the program were typing on the command line. I've included a - brief set of docs after the source code, in latex format. - There is no facility to watch the output of a program. From: - ssclift@neumann.uwaterloo.ca (Simon Clift) - + _Popen example from lsqrfit_ The following function - sends a command to gnuplot. Gnuplot will execute the command - just as if you typed it at the gnuplot command line. This - example is adapted from my least squares fitting program - which is located at ftp.cdrom.com in - pub/os2/2_x/unix/lsqrft14.zip. Complete source is included. - From: michael@krypton.mit.edu (Michael Courtney) - - Multiple logical plots on a single page - + _Gawk script for multiple encapsulated postscript on a - page_ It's slightly more flexible than mpage, because it - changes the aspect ratio of the plots; mpage according to the - documentation only allows 1, 2, 4, or 8 plots on a page. This - script works for unix with encapsulated postscript (eps) - output. It should work with gawk or nawk, although I've only - tested it with gawk. (Gawk is GNU's version of awk and is - available from prep.ai.mit.edu.) You just specify how many - rows and columns of plots you want and it does the rest. For - example, gnuplot_eps rows=3 cols=2 *.eps | lpr will print all - eps files in your current directory with 6 on a page. Also, - see the comments in the file. From: - holt@goethe.cns.caltech.edu (Gary Holt) - + _Sed script for multiple encapsulated postscript on a - page_ You have MULTIPLE postscript files each containing a - single plot. From: wgchoe@scoupe.postech.ac.kr (Choe Won Gyu) - + _Massive patch_ with add multiplotcapability to all - devices and a lot more. The reason it is offered in this form - is because the original multiplot.pat did not patch correctly - into gnuplot version 3.5. This mod also add borders options, - financial plots, multiple line titles and other asundry - items. Use at your own risk. Look at the top of makefile.r - for a more complete list of changes. - From: Alex Woo, woo@playfair.stanford.edu - - lvs.zip - This contains miscellaneous, modifications, which include: - + Label positioning using either plot or device-relative - coodinates - + Portability to Irix-5.2 and Irix-5.3 - + The "thru" keyword has been extended to include "thrux" for - the X - Coordinate - + Capability to read a ordinary Fortran-style unformatted file - + A Perl script for better handling of eps - + Modifications to docs/doc2info to generate "next", "prev", - and "up" data for each node. - + Changes in the documentation to reflect the above. - - Miscellaneous Mods - + _Congp3d3_ is a preprocessor to draw contour plots on - irregular regions. From: mrb2@nrc.gov (Margaret Rose Byrne) - + _Sockpipe_ is a socket based pipe needed for the - Stardent OS. From: Mike Hallesy, Stardent Computer Product - Support, hal@stardent.com - + _Time Series_ is a patch to add multiline titles and - labels, time series x and y data and tic marks, and automatic - resizing of plots and much more. From: Hans Olav Eggestad, - olav@jordforsk.nlh.no - - Other Operationing Systems - + _MacIntosh Port of Version 3.2_ From: Noboru Yamamoto, - sun!kekvax.kek.jp!YAMAMOTO@pixar.com - + _MacIntosh Port of Version 3.5_ From: - laval@londres.cma.fr (Philippe LAVAL) - + _OS-9 Port of Version 3.2_ - - - 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 the official gnuplot sites, as the files gnufit12.info, - gnufit12.tar.gz (source) and gft12dos.zip (MS-DOS). It has been - merged into gnuplot 3.7. - - 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. - - You can also try pgperl, an integration of the PGPLOT plotting - package with Perl 5. Information can be found at - http://www.ast.cam.ac.uk/~kgb/pgperl.html, the source is - available from ftp://ftp.ast.cam.ac.uk/pub/kgb/pgperl/ or - ftp://linux.nrao.edu/pub/packages/pgperl/. - - Another possibility is Octave. To quote from its README: Octave - is a high-level language, primarily intended for numerical - computations. It provides a convenient command line interface - for solving linear and nonlinear problems numerically. - - The latest released version of Octave is always available via - anonymous ftp from bevo.che.wisc.edu in the directory - /pub/octave. +This can be specified with the various options for the command "plot". - 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. Also, you - can send notification of the patch to the FAQ maintainer, if - you want a mention. Please don't send the patch itself to me - :-) - - If your modifications are extensive (such as a port to another - system), upload your modifications to - ftp://ftp.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. - - Q5.6: I want to help in developing gnuplot 3.7. What can I do? - Join the gnuplot beta test mailing list by sending a mail - containing the line - - -subscribe info-gnuplot-beta - - in the body (not the subject) of the mail to Majordomo@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, for - example a short awk program, such as - - - gnuplot> plot "< awk ' { print $1, $3/$2 } ' file.in" - - 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. - - You can also get divhack.patch from - sotona.phys.soton.ac.uk[152.78.192.42] via anonymous ftp. It - allows expressions of the kind - - - gnuplot> plot "datafile" using A:B:C - - where A,B,C,... are now either a column number, as usual, or an - arbitrary expression enclosed in ()'s, and using $1,$2,etc to - access the data columns. - - 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, soon - to be 129.170.8.11] 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. +4.17 How do I plot a vertical line? - Q6.6: How do I plot a function f(x,y) which is bounded by other - functions in the x-y plain? - An example: +Depending on context, the main methods are: + + * set arrow .... .... nohead where you have to compute explicitly the + start and the end of the arrow. + * generate (inlined) datapoints and plot them + * switch to parametric mode + +5. Miscellaneous + +5.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 whether you have an old version of gnuplot; if you do, chances are +the bug has been fixed in a newer release. + +Fixes for bugs reported since the release of the current version are held in +the patches directory at gnuplotdistribution sites. Before submitting a bug +report, please check whether the bug in question has already been fixed. + +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.apps.gnuplot is probably the way to go. If you have +investigated a problem in detail, especially if you have a context or +unified 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.apps.gnuplot newsgroup will be more help for finding work +arounds or actually solving gnuplotrelated problems. If you do send in a bug +report, be sure and include the version of gnuplot (including patchlevel) as +shown by the command "show version long", terminal driver, operating system, +an exact description of the bug and input which can reproduce the bug. +Failure to indicate these details can render a solution to your problem +almost impossible. Also, any context diffs should be referenced against the +latest official version of gnuplotif at all possible. + +5.2 Can I use gnuplotroutines for my own programs? + +Yes. John Campbell jdc@nauvax.ucc.nau.edu has written gplotlib, a version of +gnuplotas C subroutines callable from a C program. This is available as +gplotlib.tar.Z at ftp.nau.edu in /pub/gplotlib.tar.Z . This library has been +updated to be compatible with version 3.5. + +On systems supporting the pipes, you can pipe commands to gnuplotfrom other +programs. + +5.3 What extensions have people made to gnuplot? Where can I get them? + +Extensions are available from ftp.ucc.ie in /pub/gnuplot/contrib/ +Some extensions available: - 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) - - Q6.7: How do I get rid of ? - Usually, there is a set command to do this; do a - - - gnuplot> ?set no - - for a short overview. - - Q6.8: How do I call gnuplot from my own programs? - Here's code which works for a UNIX system, using (efficient) - named pipes. - - -#include -#include -#include -#include -#include -#include - -#define PANIC(a) do { \ - perror(a); \ - if (temp_name) unlink(temp_name);\ - exit(1);\ - } while(0) - -int main() { - FILE *command,*data; - char *temp_name = NULL; - double a,b; - int i; - - if ((temp_name = tmpnam((char *) 0)) == 0) PANIC("tmpnam failed"); - if(mkfifo(temp_name, S_IRUSR | S_IWUSR) != 0) PANIC("mkfifo failed"); - command = popen("gnuplot","w"); - fprintf(command,"plot \"%s\" with lines\n",temp_name); fflush(command); - data = fopen(temp_name,"w"); - for (i=0; i<20; i++) { - a = i/10.0; - b = sin(a); - fprintf(data,"%f %f\n",a,b); - } - fclose(data); - fprintf(stderr,"press enter to continue..."); fflush(stderr); - getchar(); - - fprintf(command,"plot \"%s\" with lines\n",temp_name); fflush(command); - data = fopen(temp_name,"w"); - for (i=0; i<20; i++) { - a = i/10.0; - b = cos(a); - fprintf(data,"%f %f\n",a,b); - } - fclose(data); - fprintf(stderr,"press enter to continue..."); fflush(stderr); - getchar(); - pclose(command); - unlink(temp_name); - return 0; -} - - Here's code for OS/2, again using named pipes; I'm unable to check - this out myself. This code is care of fearick@physci.uct.ac.za - (Roger Fearick). - - -#include -#define INCL_DOS -#define INCL_DOSPROCESS -#define INCL_DOSNMPIPES -#include - -main() - { - HPIPE hpipe ; - FILE *hfile, *hgnu ; - /* create a named pipe. Use NP_WAIT so that DosConnect... - blocks until client (gnuplot) opens, and client reads - are blocked until data is available */ - DosCreateNPipe( "\\pipe\\gtemp", - &hpipe, - NP_ACCESS_OUTBOUND, - NP_WAIT|NP_TYPE_BYTE|1, - 256, - 256, - -1 ) ; - /* use stream i/o */ - hfile = fdopen( hpipe, "w" ) ; - - /* start gnuplot; use unbuffered writes so we don't need to - flush buffer after a command */ - hgnu = popen( "gnuplot", "w" ) ; - setvbuf( hgnu, NULL, _IONBF, 0 ) ; - - /* plot a set of data */ - - fprintf( hgnu, "plot '/pipe/gtemp'\n" ) ; /* issue plot command */ - DosConnectNPipe( hpipe ) ; /* wait until 'file' opened */ - fprintf( hfile, "1 1\n" ) ; /* write data to 'file' */ - fprintf( hfile, "2 2\n" ) ; - fprintf( hfile, "3 3\n" ) ; - fprintf( hfile, "4 4\n" ) ; - fflush( hfile ) ; /* flush buffer forces read */ - DosSleep( 500 ) ; /* allow gnuplot to catch up */ - DosDisConnectNPipe( hpipe ) ; /* disconnect this session */ - fprintf( hgnu, "pause -1\n" ) ; /* admire plot */ - - /* plot another set of data */ - - fprintf( hgnu, "plot '/pipe/gtemp'\n" ) ; - DosConnectNPipe( hpipe ) ; - fprintf( hfile, "1 4\n" ) ; - fprintf( hfile, "2 3\n" ) ; - fprintf( hfile, "3 2\n" ) ; - fprintf( hfile, "4 1\n" ) ; - fflush( hfile ) ; - DosSleep( 500 ) ; - DosDisConnectNPipe( hpipe ) ; - fprintf( hgnu, "pause -1\n" ) ; - - DosClose( hpipe ) ; - pclose( hgnu ) ; - } - - ; The above code works for gnuplot 3.5. In gnuplot 3.7, this can be - greatly simplified, since data can be fed 'inline, as in - - -plot '-' w l -1 1 -2 3 -3 4 -e - - - 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. + * barchart_via_fig: awk scripts to produce barcharts with filled boxes. + * date-errorbar: allows dates in the hi/lo fields for errorbars. + * gp37os2-mouse: OS/2 binaries with mouse support (feature included in + current beta versions). + * perltk: A perl/tk canvas widget. + * polyg.patch: Implements a polygon plotting style. + * xgfe: graphical front end using the Qt widgets available at + ~http://lnc.usc.edu/docs/xgfe/xgfe.html . - On VMS, you need to make several symbols: +5.4 Can I do heavy-duty data processing with gnuplot? + +gnuplotalone 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 gnuplotas its graphics +back end and is available from ftp.physics.mcgill.ca in +/pub/Fudgit/fudgit_2.33.tar.Z and from the main Linux server, tsx-11.mit.edu +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 has been merged into +gnuplot3.7. + +Michael Courtney has written a program called lsqrft, which uses the +Levenberg-Marquardt - Algorithm for fitting data to a function. It is +available from hobbes.nmsu.edu in /pub/os2/apps/analysis/lsqrft15.zip ; +sources, which should compile on Unix, and executables for MS-DOS and OS/2 +are available. 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 and get the file README.BROCHURE for more +information. + +You can also try pgperl, an integration of the PGPLOT plotting package with +Perl 5. Information can be found at +~http://www.ast.cam.ac.uk/AAO/local/www/kgb/pgperl , the source is available +from ftp.ast.cam.ac.uk in /pub/kgb/pgperl/ or linux.nrao.edu in +/pub/packages/pgperl/ . + +Another possibility is Octave. To quote from its README: Octave is a +high-level language, primarily intended for numerical computations. It +provides a convenient command line interface for solving linear and +nonlinear problems numerically. The latest released version of Octave is +always available from ~http://www.che.wisc.edu/octave/ and via anonymous ftp +from bevo.che.wisc.edu in /pub/octave . + +5.5 I have ported gnuplotto another system, or patched it. What do I do? + +If your patch is small, mail it to info-gnuplot-beta@dartmouth.edu , with a +thorough description of what the patch is supposed to do, which version of +gnuplotit is relative to, etc. Also, you can send notification of the patch +to the FAQ maintainer, if you want a mention. Please don't send the patch +itself to me. + +If your modifications are extensive (such as a port to another system), +place them on a web/ftp site for download. There is currently no possibility +to upload patches. Send a note to info-gnuplot-beta@dartmouth.edu on where +to find the patch, what it is supposed to do, which version of gnuplotit is +to be applied against. For the time being (summer 1999) you can also send +the patch to gnuplot@ftp.ucc.ie . + +5.6 I want to help in developing the next version of gnuplot. What can I do? + +Join the gnuplotbeta test mailing list by sending a mail containing the line +subscribe info-gnuplot-beta in the body (not the subject) of the mail to +Majordomo@Dartmouth.EDU . + +6. Making life easier + +6.1 How do I plot two functions in non-overlapping regions? + +Use a parametric plot. An example: + +gnuplot> set parametric +gnuplot> a=1 +gnuplot> b=3 +gnuplot> c=2 +gnuplot> d=4 +gnuplot> x1(t) = a+(b-a)*t +gnuplot> x2(t) = c+(d-c)*t +gnuplot> f1(x) = sin(x) +gnuplot> f2(x) = x**2/8 +gnuplot> plot [t=0:1] x1(t),f1(x1(t)) title "f1", x2(t), f2(x2(t)) title "f2" + +You can also use gnuplot's ability to ignore mathematically undefined +expressions: the expression 1/0 is silently ignored, thus a construction +like + +gnuplot> set xran [-10:10] +gnuplot> plot (abs(x)>0.5?1/0: x**2) + +plots a quadratic function only for |x| < 0.5. + +6.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, for example a short awk +program, such as + +gnuplot> plot "< awk ' { print $1, $3/$2 } ' file.in" + +The plot command is very powerful and is able to do some arithmetic on +datafiles. See "help plot". + +6.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 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. + +6.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. + +6.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. + +6.6 How do I plot a function f(x,y) which is bounded by other functions in +the x-y plain? + +An example: + +gnuplot> f(x,y) = x**2 + y **2 +gnuplot> x(u) = 3*u +gnuplot> yu(x) = x**2 +gnuplot> yl(x) = -x**2 +gnuplot> set parametric +gnuplot> set cont +gnuplot> 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) + +6.7 How do I get rid of ? + +Usually, there is a set command to do this; do a gnuplot> ?set no for a +short overview. + +6.8 How do I call gnuplot from my own programs? + +There's a code which works for a UNIX system, using (efficient) named pipes. +On M$ Windows platforms, due to the lacking standard input of GUI programs, +you need to use the C-code pgnuplot written by Hans-Bernhard Broeker +broeker@physik.rwth-aachen.de . You can obtain this file on a ftp-server +carrying the source for gnuplot. + +6.9 What if I need h-bar (Planck's constant)? + +There is no predefined variable like pi. However to put h-bar as a character +into the label, you must use the PostScript terminal. You can play around +with constructs like @{/=56 -} {/=24 h} or {/=8 @{/Symbol=24 -} _{/=14 h}} +In the latter, the "-" (a long one in /Symbol) is non-spacing and 24-pt. The +14-pt "h" is offset by an 8-pt space (which is the space preceding the "_") +but smaller, since it's written as a subscript. But these don't look too +much like the hbar we're used to, since the bar is horizontal instead of +sloped. I don't see a way to get that. I tried using an accent ( +264 in isoLatin encoding), but I haven't found a way to scale and position +the pieces correctly. + +One more possibility would be {/=14 @^{/Symbol=10 -}{/=14 h}}. + +(This is a hint by Richard Crawford). + +7. Known Problems + +7.1 Gnuplot is not plotting any points under X11! How come? + +On VMS, you need to make several symbols: $ gnuplot_x11 :== $disk:[directory]gnuplot_x11 $ gnuplot :== $disk:[directory]gnuplot.exe $ def/job GNUPLOT$HELP disk:[directory]gnuplot.hlb - Then run gnuplot from your command line, and use - - gnuplot> set term x11 - - 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='DTST') or convert it using - the DECUS utility ATTRIB.EXE: +Then run gnuplot from your command line, and use "set term x11". +7.2 My isoline data generated by a Fortran program is not handled correctly. +What can I do? - VMS> ATTRIB/RATTRIB=IMPDTED FOR010.DAT +Update to the newest gnuplot. Gnuplot 3.7 is able to read Fortran-style +files where a blanc line can contain more than a linefeed. - 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: +7.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` +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": +The solution is to change gnuplot's idea of "zero": - gnuplot> set zero 1e-20 +gnuplot> set zero 1e-20 - For more information, +For more information, "help set zero" - gnuplot> help set zero +7.4 Gnuplot is plotting nothing when run via gnuplot ! What can I +do? - Q7.4: Gnuplot is plotting nothing when run via gnuplot ! - What can I do? - Put a pause -1 after the plot command in the file. +Put a pause -1 after the plot command in the file. On an X-Window System +system, you can also use the -persist option, the X11 window is then not +closed. Close the X11 window by typing "q" when the focus is on it. - 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: +7.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 +gnuplot> print 1/3 0 - gnuplot> print 1./3. +gnuplot> print 1./3. 0.333333 - This way of evaluating integer expressions is shared by both C and - Fortran. +This way of evaluating integer expressions is shared by both C and Fortran. + +7.6 Set output 'filename' isn't outputting everything it should! + +You need to flush the output with a closing 'set output'. + +7.7 When using the LATEX-terminal, there is an error during the LATEX-run! + +Please upgrade to gnuplot 3.7. Some versions of its beta-release had a +problem in the LATEX-terminal. + +7.8 The exit command does not work as documented! + +This is a known bug and is fixed in the latest release. If you need the +feature please upgrade to the latest release. + +7.9 I can't find the demos and example files at the URLs in the +documentation! + +The examples have been removec from the NASA site. You can find the examples +now at ~http://www.gnuplot.vt.edu/gnuplot/gpdocs . There you will find both +PNG and GIF versions of the demo plots. There are some licensing problems +with GIF images, so you should probably prefer the PNG ones. They also have +the advantage to be much smaller in size. + +7.10 Calling gnuplot in a pipe or with a gnuplot-script doesn't produce +aplot! + +You can call gnuplot by using a short Perl-script like the following: + +#!/usr/bin/perl +open GP, "/usr/local/bin/gnuplot"; +print GP,"plot '/tmp/data.dat' with lines\n"; +close GP + +Gnuplot closes its plot window on exit. The close GP command is executed, +and the plot window is closed even before you have a chance to look at it. + +There are thre solutions to this: first, use the pause -1 command in gnuplot +before closing the pipe. Second, close the pipe only if you are sure that +you don't need gnuplot and its plot window anymore. Last, you can use the +command line option -persist: this option leaves the X-Window System plot +window open. + +8. Credits - Q7.6: My Linux gnuplot complains about a missing gnuplot_x11. What is - wrong? - The binary gnuplot distribution from sunsite.unc.edu and its - mirrors in Linux/apps/math/gplotbin.tgz is missing one - executable that is necessary to access the x11 terminal. Please - install gnuplot from another Linux distribution, e.g. - Slackware. +Gnuplot 3.7's main contributors are (in alphabetical order) Hans-Bernhard +Broeker, John Campbell, Robert Cunningham, David Denholm, Gershon Elber, +Roger Fearick, Carsten Grammes, Lucas Hart, Lars Hecking, Thomas Koenig, +David Kotz, Ed Kubaitis, Russell Lang, Alexander Lehmann, Alexander Mai, +Carsten Steger, Tom Tkacik, Jos Van der Woude, James R. Van Zandt, and Alex +Woo. - Q7.7: set output 'filename' isn't outputting everything it should! - You need to flush the output with a closing 'set output'. +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. Again reworked for gnuplot 3.7 +by Alexander Mai and Jürgen v.Hagen with corrections by , Lars Hecking, +Hans-Bernhard Broecker and other people. - Section 8: Credits +About this document ... - 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; Axel Eble and Jutta Zimmermann helped with the - conversion to HTML. +Gnuplot FAQ +This document was generated using the LaTeX2HTML translator Version 98.1p1 +release (March 2nd, 1998) +Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based +Learning Unit, University of Leeds. - Thomas Koenig, ig25@rz.uni-karlsruhe.de, 1994-03-28 +The command line arguments were: +latex2html -split 0 -show_section_numbers -html_version 3.2 gnuplot-faq.tex. +The translation was initiated by Juergen von Hagen on 1999-10-20 + ------------------------------------------------------------------------ +[next] [up] [previous] +Juergen von Hagen +1999-10-20 diff -urN gnuplot-3.7/0INSTALL gnuplot-3.7.1/0INSTALL --- gnuplot-3.7/0INSTALL Wed Jan 13 21:48:06 1999 +++ gnuplot-3.7.1/0INSTALL Wed Oct 20 22:19:22 1999 @@ -52,13 +52,16 @@ o with configure's --prefix= option, eg. ./configure --prefix=/gnuplot - Attention: This affects the location of *all* installed files! + gnuplot will look for the online help file, gnuplot.gih, in /gnuplot/share. + Attention: This option affects the location of *all* installed files! o with configure's --datadir= option, eg. ./configure --datadir='/gnuplot/docs' + gnuplot will look for the online help file, gnuplot.gih, in /gnuplot/docs. o at make time, eg. make HELPFILE='/gnuplot/docs/gnuplot.gih' + gnuplot will look for the online help file /gnuplot/docs/gnupot.gih. o at execution time by specifying the helpfile with the environment variable GNUHELP (see "Environment Variables" below). @@ -68,13 +71,16 @@ o with configure's --prefix= option, eg. ./configure --prefix=/gnuplot + gnuplot will be installed as /gnuplot/bin/gnuplot. Attention: This affects the location of *all* installed files! o with configure's --bindir= option, eg. ./configure --bindir='/gnuplot/bin' + gnuplot will be installed as /gnuplot/bin/gnuplot. o at make time, eg. - make GNUPLOT_BINDIR='/gnuplot/bin' + make BINDIR='/gnuplot/bin' + gnuplot will be installed as /gnuplot/bin/gnuplot. If the executables are not installed in the default location, files written by the `save' command cannot be used as scripts on Un*x platforms. @@ -121,12 +127,10 @@ --libdir=DIR object code libraries in DIR [EPREFIX/lib] --includedir=DIR C header files in DIR [PREFIX/include] --mandir=DIR Man documentation in DIR [PREFIX/man] - --without-readline Do not use the included readline function - --with-gnu-readline Use the GNU readline version If you don't use this, - you won't have file name completion. - --with-gnu-readline=PATH Specify the location of libreadline. - Use this form if your libreadline is not installed - where your linker can find it. + --with-readline (*) use the builtin minimal readline function + --without-readline do not use the builtin readline function + --with-readline=gnu use the GNU readline library + --with-readline=PATH Specify the location of GNU readline --with-plot use the Unix plot library --with-plot=PATH Specify the location of GNU libplot --with-gd (*) Enable gif terminal with Tom Boutell's gd library @@ -135,13 +139,11 @@ --with-png (*) Enable png terminal (requires libpng and libz) --with-png=PATH Specify the location of libpng - --with-cwdrc Check current directory for .gnuplotrc file, - normally disabled for security reasons. However, - the home directory is always checked for a - .gnuplotrc file. - --with-lasergnu Install lasergnu printer script - --without-linux-vga (*) Do not use the Linux console driver - (requires Linux SVGAlib /usr/lib/libvga) + --with-cwdrc check current directory for .gnuplot file, + normally disabled for security reasons + --with-lasergnu install lasergnu printer script + --with-linux-vga use the Linux SVGA console driver + (requires /usr/lib/libvga) --enable-apollo Apollo Graphics Primitive Resource --enable-gpr Apollo Graphics Primitive Resource (fixed-size window) --enable-cgi enable CGI terminal (SCO only) @@ -184,22 +186,36 @@ VMS --- - On VMS, invoke MAKE_VMS.COM (or BUILDVMS.COM if you have MMS or MMK -but don't want to use the supplied DESCRIP.MMS). You may get warnings -or more serious errors depending on the versions of the C compiler, the -C run-time libraries, and {Open}VMS on your system. - - - To compile using DEC MMS or MMK (PD clone), - invoke MMS or MMK with the supplied descrip.mms - Or if you have a unix-like make utility - copy makefile.vms makefile - make + On VMS, you can use MMS, MMK, or another make utility, or you can +use BUILDVMS.COM. The supplied files work with Alpha/VMS V6.2 and +DECC V5.7; you may get warnings or more serious errors depending on +the versions of the C compiler, the C run-time libraries, and VMS on +your system. + + To compile using MMK: + MMK/DESCRIPTION=MAKEFILE.VMS + To compile using MMS on VAX: + MMS/DESCRIPTION=MAKEFILE.VMS + To compile using MMS on Alpha: + MMS/DESCRIPTION=MAKEFILE.VMS/MACRO=__ALPHA__=1 + + Alternatively, you can use MAKE_VMS.COM. This command file will run +MMK or MMS to build gnuplot. If you don't have either one installed, it +will use the command file. The first parameter on the command line is +the compiler you want to use (default DECC). + + It may sometimes be useful to add `/IGNORE=WARNING' to the `MMS' call. + + To compile using GNUC or VAXC: + add /MACRO=GNUC or /MACRO=VAXC to the above command + To compile with another make utility: + check the documentation of your utility to specify the description + file and any necessary macros (__ALPHA__, GNUC, or VAXC) Or if you don't have a suitable make: - @buildvms + @BUILDVMS To tell gnuplot where to find the help library: - $ define gnuplot$help disk:[directory]gnuplot.hlb - Alternatively (and preferably) put the help in the main system help library. + $ define gnuplot$help disk:[directory]gnuplot.hlb + Alternatively, put the help in the main system help library. AmigaOS ------- @@ -208,6 +224,18 @@ make -f makefile.ami Using SAS/C 6.1 or later versions smake -f makefile.amg + You can also copy makefile.amg to smakefile and just type `smake'. + + At the beginning of makefile.amg you will find a configuration + section where you have to adjust all settings which control the build + process. Most important is probably to select the terminal devices + which should be supported. You can create a version offering + png graphics as well as gif support. Use the appropriate settings + for CPU and MATH to compile for a specific machine type. + Be sure to enable only those devices for which you have the + necessary software already installed. Also ensure that the + libraries and the sources are all compiled using the same + settings for CPU and MATH. Using gcc: see Unix Atari/TOS @@ -238,6 +266,12 @@ Put wgnuplot.exe, wgnuplot.dll, wgnuplot.hlp and wgnuplot.mnu in the windows directory. +Using Visual C++ and compiling for Windows NT/95/98 + nmake -f makefile.nt + or + copy makefile.nt makefile + nmake + Using the MinGW32 port of egcs: you need the Micrsoft SDK for the moment. copy makefile.mgw makefile @@ -335,10 +369,12 @@ to the CGI agents, and the CGIDISP and/or CGIPRNT environment variables to set the output devices. - If using dynamically linked executables with the X11 Window System, it -may be necessary to define LD_LIBRARY_PATH - see man ld for details. -It is, however, prefered to use the appropriate linker options, eg. --R under Solaris, or -rpath under DEC Unix and Irix. + If creating dynamically linked executables for the X11 Window System, it +may be necessary to add flags to the LIBS variable in Makefile +to make sure gnuplot finds all required libraries at runtime. Systems like +SunOS and Solaris use -R to specify the runtime library search path, whereas +OSF/Dec Unix, Irix and Linux use -rpath. If this is not possible, the +LD_LIBRARY_PATH environment variable should be set. About --with-PACKAGE[=PATH] *************************** @@ -570,7 +606,7 @@ G N U P L O T Unix version 3.7 - patchlevel 0 + patchlevel 1 last modified Tue Jan 12 13:48:06 BST 1999 Copyright(C) 1986 - 1993, 1998 diff -urN gnuplot-3.7/0README gnuplot-3.7.1/0README --- gnuplot-3.7/0README Wed Jan 13 21:48:26 1999 +++ gnuplot-3.7.1/0README Wed Oct 20 22:19:23 1999 @@ -184,11 +184,12 @@ Date: Fri Aug 27 05:21:33 GMT 1993 -Version: 3.7 +Version: 3.7.1 -In general, GNUPLOT 3.7 is available as the file gnuplot-3.7.tar.gz. +In general, GNUPLOT 3.7.1 is available as the file gnuplot-3.7.1.tar.gz. Because of the numerous changes since version 3.5, no patch files -will be available to bring 3.5 to 3.7. +will be available to bring 3.5 to 3.7. But there is a patch relative +to version 3.7. (Version 3.6 was skipped because of possible confusion with the numerous BETA releases.) It will be made available at web and ftp sites listed below, along with DOS, MS-Windows 3.1, @@ -205,17 +206,17 @@ NORTH AMERICA: Anonymous ftp to ftp.gnuplot.vt.edu: - ftp://ftp.gnuplot.vt.edu/pub/gnuplot/gnuplot-3.7.tar.gz + ftp://ftp.gnuplot.vt.edu/pub/gnuplot/gnuplot-3.7.1.tar.gz Alternatively, you can use your web browser to get gnuplot from the gnuplot web pages at - http://members.theglobe.com/gnuplot/gp37tar.gz - http://www.geocities.com/SiliconValley/Foothills/6647/gp37tar.gz + http://members.theglobe.com/gnuplot/gp371tar.gz + http://www.geocities.com/SiliconValley/Foothills/6647/gp371tar.gz Anonymous ftp to ftp.dartmouth.edu. Please try the other sites first! - ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot-3.7.tar.gz + ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot-3.7.1.tar.gz [ At time of release, we are not sure whether this service is still available. -lh @@ -227,7 +228,7 @@ open cd pub/gnuplot mode binary - get gnuplot-3.7.tar.Z + get gnuplot-3.7.1.tar.Z quit If you have some problem, you might need to stick @@ -239,18 +240,24 @@ AUSTRALIA: + From the AARNet Mirror Project: + ftp://mirror.aarnet.edu.au/pub/gnuplot/ + http://mirror.aarnet.edu.au/pub/gnuplot/ + Anonymous ftp to ftp.cc.monash.edu.au: - ftp://ftp.cc.monash.edu.au/pub/gnuplot/gnuplot-3.7.tar.gz + ftp://ftp.cc.monash.edu.au/pub/gnuplot/gnuplot-3.7.1.tar.gz EUROPE: Anonymous ftp to ftp.irisa.fr: - ftp://ftp.irisa.fr/pub/gnuplot/gnuplot-3.7.tar.gz + ftp://ftp.irisa.fr/pub/gnuplot/gnuplot-3.7.1.tar.gz + + Anonymous ftp to ftp.ucc.ie: + ftp://ftp.ucc.ie/pub/gnuplot/gnuplot-3.7.1.tar.gz + ---- -Thomas Williams- - -Alex Woo- - -David Denholm- -Lars Hecking- diff -urN gnuplot-3.7/ChangeLog gnuplot-3.7.1/ChangeLog --- gnuplot-3.7/ChangeLog Thu Jan 14 19:33:43 1999 +++ gnuplot-3.7.1/ChangeLog Thu Oct 21 15:15:07 1999 @@ -1,3 +1,371 @@ +1999-10-21 Lars Hecking + + * configure.in: Fix compile/link on NeXT without side effects ... + +1999-10-20 Lars Hecking + + * 0INSTALL, 0README, NEWS: Updated for 3.7.1. + + * configure.in: Fix for linking gnuplot_x11 on LynxOS 3.0.1. + +1999-10-20 John Hasstedt + + * buildvms.com, makefile.vms: Updated. Create binary data files in + the right directory. + +1999-10-19 Lars Hecking + + * term/png.trm: Back out Eric and HBB's changes (back to 16 colours, + no transparency). + + * term/tkcanvas.trm: More fixes by Thomas Sefzick and Matt Willis. + +1999-10-19 Hans-Bernhard Broeker + + * graph3d.c(boundary3d): Fix division by zero problem. + + * makefile.win, plot.h: Changes for compilation with newer Borland + Win32 compilers. + + * win/pgnuplot.c: Changes to enable compilation with more compilers. + + * win/wgnuplot.def: Reduce stacksize by 500 bytes to fix + 'DGROUP exceeds 64K' problem. + +1999-10-16 Lars Hecking + + * syscfg.h: cc on NetBSD doesn't define unix anymore. + +1999-10-15 Lars Hecking + + * Makefile.in: Add m4/select.m4 to ETC. + + * configure.in: AC_FUNC_SELECT replaces AC_FUNC_SELECT_ARGTYPES. + + * gplt_x11.c, stdfn.h: Updated for new select argtype macro. + + * m4/select.m4: New macro for select argtypes. + +1999-10-11 Lars Hecking + + * help.c: Change subtopic help entry formatting to skip next column + if very long entries are encountered. + +1999-10-11 Thomas Sefzick + + * term/tkcanvas.trm: Bug fix, some comments added. + +1999-10-11 Lars Hecking + + * help.c: Change help index formatting to start in column 4 + (instead 6) and use column length of 18 (instead 15). + +1999-10-11 "Eric S. Raymond" + + * demo/airfoil.dem, demo/animate.dem, demo/binary.dem, + demo/controls.dem, demo/electron.dem, demo/fit.dem, demo/hidden.dem, + demo/mgr.dem, demo/param.dem, demo/polar.dem, demo/prob.dem, + demo/prob2.dem, demo/scatter.dem, demo/simple.dem, demo/spline.dem, + demo/steps.dem, demo/surface1.dem, demo/surface2.dem, demo/timedat.dem, + demo/using.dem: Demo directory cleanup patch. Box a bunch of legends + and use reset instead of ad-hoc set statements. + +1999-10-11 Hans-Bernhard Broeker + + * bitmap.c, term/png.trm: Fix some shortcomings of ESR's png patches. + + * plot2d.c: Bugfix for logscale plots with unused y2 axis. + +1999-10-01 Lars Hecking + + * fit.c, docs/Makefile.in: Fix typos. + + * term/pslatex.trm(PSLATEX_graphics): Fix segfault when `auxfile' + option is not used. + +1999-10-01 John Hasstedt + + * 0INSTALL, make_vms.com: Make VMS builds easier and add note + about make_vms.com. + +1999-10-01 Lars Hecking + + * fit.c: Backported some fixes from -current, including the time + series fit code by Remko Scharroo. + + * protos.h, term.c: Add new tewrm_count() function. + + * syscfg.h: Update FAQ location. + +1999-09-29 Hans-Bernhard Broeker + + * misc.c, show.c: In the SAVE/SHOW_NUM_OR_TIME macro, add a '#' + to the format specifier in the fprintf() call. This adds a decimal + point to the saved 'set ?range' commands to prevent integer + overflow on 16 bit platforms when the saved commands are loaded. + +1999-09-29 Lars Hecking + + * bitmap.c, bitmap.h: RGB colour table moved from term/gif.trm. + + * docs/Makefile.in: Add rules to generate gnuplot.pdf. Requires + pdflatex. + + * term/driver.h: Fix typo. + + * term/gif.trm, term/png.trm: Remove unused vars. + +1999-09-29 "Eric S. Raymond" + + * term/png.trm: Add transparency support for color images. Update + for pnglib-1.0.3. + + * term/gif.trm, term/png.trm: Remove RGB colour table from gif.trm, + let both drivers share the table in bitmap.c. + +1999-09-28 Lars Hecking + + * term/gif.trm: Backport from -current. New "tiny" and "giant" + font size options. + +1999-09-27 Lars Hecking + + * term/tkcanvas.trm: Backport from -current, integrated perltk and + extended interactive Tk/Tcl capabilities. + +1999-09-24 Hans-Bernhard Broeker + + * plot2d.c(get_data): Check for minimum number of required data + columns. + +1999-09-23 Lars Hecking + + * 0FAQ: Updated. + + * gplt_x11.c(record): read_input() takes no arguments. + + * plot.c: Remove nested comment. + +1999-09-21 Lars Hecking + + * Makefile.in, configure.in, m4/next.m4: Remove references to NEXTOBJS. + + * aclocal.m4, configure: Regenerated. + + * win/wgnuplib.h, win/wgnuplot.def, win/winmain.c, win/wtext.c: + Update from gnuplot-current. + +1999-09-16 "Daniel H. Luecking" + + * term/metapost.trm: Minor updates. + +1999-09-15 Lars Hecking + + * graph3d.c, graphics.c: write_multiline() is not modifying its + char *text argument anymore, so that no temporary strings must + be allocated before calling write_multiline(). Backported from + gnuplot-current. + +1999-09-14 Lars Hecking + + * FAQ: Updated. + + * term.c(test_term): Fix bug where test pattern is drawn before + line properties are fully specified. Combined effort by + "Jürgen v.Hagen" and + Dick Crawford . + + * util.c: Fix quoting bug, minor changes (backported from -current). + +1999-09-14 Hans-Bernhard Broeker + + * graph3d.c: Fix old bug which caused 'xzeroaxis' and 'yzeroaxis' to + mean the opposite of each other in splots. + +1999-08-25 Lars Hecking + + * Makefile.in, makefile.all: Updated. + +1999-08-25 John Hasstedt + + * 0INSTALL: VMS section updated. + + * descrip.mms: Removed. + + * buildvms.com, gnuplot.opt, makefile.vms: Updated. + + * gplt_x11.c: Use strnicmp() instead of strncasecmp(). + + * x11.opt: New file. + + * term/x11.trm: Fix order of arguments in os_error() in VMS part. + +1999-08-25 Lars Hecking + + * term.h: Updated from current development version. + + * term/metapost.trm: There is no gp_strdup() in this version. + Replaced with gp_alloc() and strcpy(). + +1999-08-24 Lars Hecking + + * makefile.cyg: Updated version from W. Kirby. + +1999-08-21 Lars Hecking + + * docs/latextut/header.tex: Modified for LaTeX2e. + + * term/fig.trm, term/object.h: Change O_TEXT to OBJ_TEXT. The former + is declared in system header files on DOS/Windows platforms. + +1999-08-20 Lars Hecking + + * docs/Makefile.in: Fix INCLUDES line. + + * Makefile.in, docs/Makefile.in, makefile.all: Add metapost.trm and + openstep.trm to CORETERM. + + * term/be.trm, term/metapost.trm, term/openstep.trm: New drivers, + imported from current dev tree. + +1999-08-19 Lars Hecking + + * command.c, makefile.os2, makefile.unx, plot.c, protos.h, readline.c, + show.c: GNU_READLINE symbol replaced with HAVE_LIBREADLINE. + + * configure.in: Update errno check. Remove readline header checks. + + * configure: Regenerated. + + * docs/Makefile.in: Fix dependencies. + +1999-08-17 Lars Hecking + + * Prepare for 3.7.1 release: create branch-pre-3-7-1. + + * 0FAQ: Update to current version. + + * 0INSTALL, Makefile.in, NEWS: Updated. + + * acconfig.h: Remove unnecessary defines, now generated by + autoheader from configure.in. + + * aclocal.m4, config.hin, configure: Regenerated. + + * ansichek.h: Fix inconsistency with ANSI_C definition. + + * configure.in, docs/Makefile.in, docs/doc2info.c, gplt_x11.c: + Mostly backported from current development source. + + * command.c, time.c: Y2K fixes. + + * datafile.c: Various bugfixes. + + * demo/contours.dem, demo/singulr.dem, demo/surface2.dem, + demo/world.dem: Demos fixed for the 'set view ' problem. + + * docs/gnuplot.doc: Update for postscript driver linewidth fix. + + * docs/gnuplot.doc: Add argument list to function names. Add + better documentation for margins and tics. + + * docs/doc2info.c: Add info menu entry. + + * fit.c: Value of last parameter is not stored in its + variable as it should. + + * gplt_x11.c: Buffering bug fixed. + + * graph3d.c: Fix 'set view ' problem, fix crash with + empty key and 'set nosurface'. + + * graphics.c: Fix negative aspect ratio. Fix for '"set lmargin" + fails when the specified margin is too small'. Fix multiline xlabel. + Fix bug in multiplot with eps output. + + * hidden3d.c: Fix bug with surface plots and negative ticslevel. + + * interpol.c: Rewrite 'bezier' interpolation routine, to prevent + numerical overflow and other undesirable things happening for + large data files. + + * m4/*.m4: Updated from current development sources. + + * makefile.amg: Improved makefile for Amiga SAS/C. + + * misc.c, src/show.c: Fix bug in 'save format'. + + * misc.c: In batch mode, gnuplot does not exit when either the + 'exit' or 'quit' command is encountered. Work around bug in + egcs on LinuxPPC. + + * plot.c: Let gnuplot pass the correct exit status back to the + calling environment. Add better handling of root privilege. + + * plot2d.c: Fix bug in x2/y2 logscale/autoscale. + + * set.c: Fix 'set noautoscale' for x2/y2/z axis. + + * show.c: Fix 'show autoscale' for x2/y2/z axis. + + * syscfg.h: Fix incomplete version string on HP-UX. + + * term/cgm.trm: Numerous bugfixes in the cgm driver: + (1) The parameter list length of the CGM record is including padding + length (must NOT include the padding length). + (2) The format of 'color table' (class 5 id 34) is wrong. The first + element is the starting index (usually 0), NOT the number of colors. + (3) The format of 'font table' (class 1 id 13) is wrong. This is the + list of 'String Fixed Data'. Do NOT include the total length. + (4) Transparency (class 3 id 4) is set to 'off' but I think it is + better to set 'on' because sometimes character cells are overlapped. + + Allow < 1.0 values for linewidth. + + * term/gif.trm: Fix off-by-one yscale problem. + + * term/gnugraph.trm: Add GNU plotutils 2.2+ support. + + * term/latex.trm: Add prototypes for EEPIC functions. Embedding + document font is now default font. + + * term/linux.trm: Code added to handle root privilege properly. + + * term/next.trm: Fix typo. + + * term/png.trm: Reorder case statements, add default cases. + + * term/post.trm: Fix to allow "set border ... lw ..." and + "set grid ... lw ..." to work correctly. + + * term/pslatex.trm: Fix off-by-one error and creation of ps auxfile + name. + + * term/pstricks.trm: Fix off-by-one error. + + * term/x11.trm: Rewrite option handling. Use execvp() instead of + execl(). + + * term.c: Fix for NeXT driver initialisation. + + * term.h: Add missing define. + + * version.c: Updated. + + * win/pgnuplot.c: Add new file to allow use of stdin under Windows. + + * win/wgnuplib.h, win/wgraph.c: Someone had complained that modifying + the width of linestyle 1 in Windows gnuplot (via the context menu of + the graph window) caused all the point symbols to be drawn with wide + lines of linetype 1, as well. This turned out to be a rather, well, + silly decision regarding the effect of line style changes on the + drawing of point symbols, having been unchanged ever since gnuplot + 3.5 was ported to Windoze: the point symbols would be drawn in + another color than the corresponding sample lines, in the 'test' + page, if any linestyle was changed to 'dotted'. I now use the same + color as the corresponding line for all plot symbols, but without + the dashing/dotting or widening. + 1999-01-14 Lars Hecking * Makefile.in, makefile.all: Add PGPKEYS to ETC. diff -urN gnuplot-3.7/CodeStyle gnuplot-3.7.1/CodeStyle --- gnuplot-3.7/CodeStyle Fri Nov 20 22:20:20 1998 +++ gnuplot-3.7.1/CodeStyle Fri Nov 20 22:20:20 1998 @@ -1,4 +1,4 @@ -$Id: CodeStyle,v 1.9 1996/12/19 19:12:28 drd Exp $ +$Id: CodeStyle,v 1.5 1998/11/20 22:20:20 lhecking Exp $ The following things have be observed when writing new code for gnuplot: (this file is currently under construction) Some of the following is diff -urN gnuplot-3.7/Makefile.in gnuplot-3.7.1/Makefile.in --- gnuplot-3.7/Makefile.in Thu Jan 14 19:34:08 1999 +++ gnuplot-3.7.1/Makefile.in Wed Oct 27 12:15:10 1999 @@ -1,6 +1,6 @@ ############################################################ # -# $Id: Makefile.in,v 1.50 1998/06/18 14:55:00 ddenholm Exp $ +# $Id: Makefile.in,v 1.42.2.7 1999/10/27 11:15:10 lhecking Exp $ # # GNUPLOT Makefile.in for autoconf (Unix X11 support) # Adapted from makefile.unx by djm@gnu.ai.mit.edu @@ -151,7 +151,7 @@ D=$(srcdir)/docs/ L=$(srcdir)/docs/latextut/ Q=$(srcdir)/docs/old/ -S=$(srcdir)/docs/ps/ +S=$(srcdir)/docs/psdoc/ M=$(srcdir)/demo/ N=$(srcdir)/NeXT/ P=$(srcdir)/os2/ @@ -165,7 +165,7 @@ #<<>> ######################################################## # -# $Id: Makefile.in,v 1.50 1998/06/18 14:55:00 ddenholm Exp $ +# $Id: Makefile.in,v 1.42.2.7 1999/10/27 11:15:10 lhecking Exp $ # ######################################################## # @@ -191,7 +191,7 @@ # D as the prefix for docs (eg docs/) # L as the prefix for latex tutorial (eg docs/latextut/ or [.docs.latextut]) # Q as the prefix for old doc files (eg docs/old) -# S as the prefix for postscript docs (eg docs/ps) +# S as the prefix for postscript docs (eg docs/psdoc) # M as the prefix for demos (eg demo/) # N as the prefix for NeXT (eg NeXT/) # P as the prefix for OS/2 (eg os2/) @@ -220,19 +220,19 @@ matrix.h national.h plot.h protos.h setshow.h stdfn.h syscfg.h term.h CORETERM = $(T)aed.trm $(T)ai.trm $(T)amiga.trm $(T)apollo.trm \ - $(T)atariaes.trm $(T)atarivdi.trm $(T)cgi.trm $(T)cgm.trm \ - $(T)compact.c $(T)corel.trm $(T)debug.trm $(T)djsvga.trm \ - $(T)driver.h $(T)dumb.trm $(T)dxf.trm $(T)dxy.trm $(T)eepic.trm \ - $(T)emxvga.trm $(T)epson.trm $(T)excl.trm $(T)fg.trm $(T)fig.trm \ - $(T)gif.trm $(T)gnugraph.trm $(T)gpic.trm $(T)gpr.trm \ + $(T)atariaes.trm $(T)atarivdi.trm $(T)be.trm $(T)cgi.trm \ + $(T)cgm.trm $(T)compact.c $(T)corel.trm $(T)debug.trm \ + $(T)djsvga.trm $(T)driver.h $(T)dumb.trm $(T)dxf.trm $(T)dxy.trm \ + $(T)eepic.trm $(T)emxvga.trm $(T)epson.trm $(T)excl.trm $(T)fg.trm \ + $(T)fig.trm $(T)gif.trm $(T)gnugraph.trm $(T)gpic.trm $(T)gpr.trm \ $(T)grass.trm $(T)hp26.trm $(T)hp2648.trm $(T)hp500c.trm \ $(T)hpgl.trm $(T)hpljii.trm $(T)hppj.trm $(T)imagen.trm \ $(T)impcodes.h $(T)iris4d.trm $(T)kyo.trm $(T)latex.trm \ - $(T)linux.trm $(T)mac.trm $(T)metafont.trm $(T)mgr.trm \ - $(T)mif.trm $(T)multitos.trm $(T)next.trm $(T)object.h \ - $(T)pbm.trm $(T)pc.trm $(T)pm.trm $(T)png.trm $(T)post.trm \ - $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm $(T)regis.trm \ - $(T)rgip.trm $(T)sun.trm $(T)t410x.trm $(T)table.trm \ + $(T)linux.trm $(T)mac.trm $(T)metafont.trm $(T)metapost.trm \ + $(T)mgr.trm $(T)mif.trm $(T)multitos.trm $(T)next.trm $(T)object.h \ + $(T)openstep.trm $(T)pbm.trm $(T)pc.trm $(T)pm.trm $(T)png.trm \ + $(T)post.trm $(T)pslatex.trm $(T)pstricks.trm $(T)qms.trm \ + $(T)regis.trm $(T)rgip.trm $(T)sun.trm $(T)t410x.trm $(T)table.trm \ $(T)tek.trm $(T)texdraw.trm $(T)tgif.trm $(T)tkcanvas.trm \ $(T)tpic.trm $(T)unixpc.trm $(T)unixplot.trm $(T)v384.trm \ $(T)vws.trm $(T)win.trm $(T)x11.trm $(T)xlib.trm @@ -256,10 +256,10 @@ $(P)gnupmdrv.c $(P)gnupmdrv.def $(P)gnupmdrv.h $(P)gnupmdrv.ipf \ $(P)gnupmdrv.rc $(P)print.c -WINDOWS = $(W)geticon.c $(W)wcommon.h $(W)wgnupl32.def $(W)wgnuplib.c \ - $(W)wgnuplib.def $(W)wgnuplib.h $(W)wgnuplib.rc $(W)wgnuplot.def \ - $(W)wgnuplot.hpj $(W)wgnuplot.mnu $(W)wgnuplot.rc $(W)wgraph.c \ - $(W)winmain.c $(W)wmenu.c $(W)wpause.c $(W)wprinter.c \ +WINDOWS = $(W)pgnuplot.c $(W)geticon.c $(W)wcommon.h $(W)wgnupl32.def \ + $(W)wgnuplib.c $(W)wgnuplib.def $(W)wgnuplib.h $(W)wgnuplib.rc \ + $(W)wgnuplot.def $(W)wgnuplot.hpj $(W)wgnuplot.mnu $(W)wgnuplot.rc \ + $(W)wgraph.c $(W)winmain.c $(W)wmenu.c $(W)wpause.c $(W)wprinter.c \ $(W)wresourc.h $(W)wtext.c $(W)wtext.h # not C code, but still needed @@ -283,7 +283,7 @@ ETC = 0BUGS 0FAQ 0INSTALL 0PORTING 0README ChangeLog CodeStyle Copyright \ INSTALL.gnu Makefile.in NEWS PGPKEYS TODO acconfig.h $(ACLOCAL_M4) \ amiga.c buildvms.com commitvers $(CONFIG_HEADER_IN) configure \ - configure.in corgraph.asm corplot.c ctrl87.c ctrl87.h descrip.mms \ + configure.in corgraph.asm corplot.c ctrl87.c ctrl87.h \ djconfig.sh errorfix.sh genopt.com gnuplot.def gnuplot.el gnuplot.opt \ gnuplot.prj header.mac hrcgraph.asm install-sh intergra.x11 lasergnu \ lineproc.mac linkopt.vms linkopt.ztc make_vms.com makefile.286 \ @@ -292,16 +292,17 @@ makefile.msw makefile.mto makefile.nt makefile.os2 makefile.os9 \ makefile.st makefile.tc makefile.unx makefile.vms makefile.wc \ makefile.win makefile.ztc missing mkinstalldirs os9.c pcgraph.asm \ - rgipgnu stamp-h.in strftime.c vms.c m4/msdos.m4 m4/next.m4 \ - m4/search-hdr.m4 m4/search-lib.m4 $(T)README + rgipgnu stamp-h.in strftime.c vms.c x11.opt m4/msdos.m4 m4/next.m4 \ + m4/path-hdr.m4 m4/path-lib.m4 m4/select.m4 $(T)README # Documentation and help files DOCS1 = $(D)Makefile.in $(D)README $(D)checkdoc.c $(D)doc2gih.c \ $(D)doc2hlp.c $(D)doc2hlp.com $(D)doc2html.c $(D)doc2info.c \ $(D)doc2ipf.c $(D)doc2ms.c $(D)doc2rnh.c $(D)doc2rtf.c $(D)doc2tex.c \ - $(D)doc2texi.pl $(D)doc2x.h $(D)gnuplot.1 $(D)lasergnu.1 \ - $(D)makefile.dst $(D)makefile.ami $(D)termdoc.c $(D)titlepag.ms \ - $(D)titlepag.tex $(D)toc_entr.sty $(D)xref.c $(D)xref.h + $(D)doc2texi.el $(D)doc2texi.pl $(D)doc2x.h $(D)gnuplot.1 \ + $(D)gnuplot.texi $(D)lasergnu.1 $(D)makefile.dst $(D)makefile.ami \ + $(D)termdoc.c $(D)titlepag.ms $(D)titlepag.tex $(D)toc_entr.sty \ + $(D)xref.c $(D)xref.h DOCS2 = $(D)gnuplot.doc $(D)gpcard.tex DOCS3 = $(L)Makefile.in $(L)eg1.plt \ $(L)eg2.plt $(L)eg3.dat $(L)eg3.plt \ @@ -345,7 +346,7 @@ # List of object files except version.o -OBJS = $(COREOBJS) @NEXTOBJS@ +OBJS = $(COREOBJS) ################################################################ @@ -423,8 +424,8 @@ cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status -$(ACLOCAL_M4): configure.in m4/msdos.m4 m4/next.m4 m4/search-hdr.m4 \ - m4/search-lib.m4 +$(ACLOCAL_M4): configure.in m4/msdos.m4 m4/next.m4 m4/path-hdr.m4 \ + m4/path-lib.m4 cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) @@ -456,7 +457,7 @@ SUBDIRS = NeXT NeXT/English.lproj NeXT/English.lproj/GnuTerm.nib \ NeXT/English.lproj/gnuview.nib demo docs docs/latextut docs/old \ - docs/ps m4 os2 term win + docs/psdoc m4 os2 term win clean: rm -f gnuplot gnuplot_x11 bf_test *.o core *~ diff -urN gnuplot-3.7/NEWS gnuplot-3.7.1/NEWS --- gnuplot-3.7/NEWS Mon Dec 7 22:11:39 1998 +++ gnuplot-3.7.1/NEWS Wed Oct 27 11:10:42 1999 @@ -1,3 +1,33 @@ +Changes in release 3.7.1: +* Updated makefiles and autoconf files +* Updated documentation and FAQ +* Added Windows stdin wrapper +* New drivers for Be, metapost, MacOS X Server +* Improved configuration of GNU readline support +* Security: the Linux SVGAlib driver is now disabled by default +* Support for GNU plotutils 2.2 +* Improved tkcanvas driver (extend interactive capabilities, integrated + perltk driver) +* Fixed compiling on IRIX 6.5, LynxOS 3.0.1 +* Bug fix for negative aspect ratio +* Bug fixes in the cgm, eepic, png, and pslatex drivers +* Bug fix in the data fitting code (store value of last parameter) +* Bug fixes for HP-UX, NEXT, and Windows +* Bug fixes for save and set lmargin commands +* Bug fix for 'set view ' (compressed z-axis) problem +* Bug fix for surface plots and negative ticslevel +* Bug fix for multiline labels +* Bug fix for multiplot and eps output +* Improved makefile for Amiga SAS/C +* Bug fixed with exit/quit in batch mode +* Return proper exit status +* Buffering bug in X11 driver fixed +* Added fitting of time series data +* Embedding document font is now default font in latex output +* Y2K: "%y" date format interpretation is now in line with + Open Group recommendations +* Bugfix for logscale with unused y2 axis + What's new in 3.7 ? from 315 to 348 diff -urN gnuplot-3.7/acconfig.h gnuplot-3.7.1/acconfig.h --- gnuplot-3.7/acconfig.h Tue Jan 12 14:03:28 1999 +++ gnuplot-3.7.1/acconfig.h Thu Aug 19 15:42:42 1999 @@ -14,90 +14,6 @@ Leave the following blank line there!! Autoheader needs it. */ -/* Define if you want to use the Apollo Graphics Primitive Resource. */ -#undef APOLLO - -/* Define if you want to use the CGI terminal under SCO. */ -#undef CGI - -/* Define if you want to use libgrx20 with MSDOS/djgpp. */ -#undef DJSVGA - -/* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ -#undef DOS32 - -/* Define if declares errno. */ -#undef EXTERN_ERRNO - -/* Define if you are using the GNU readline library. */ -#undef GNU_READLINE - -/* Define if your libplot.a is from GNU plotutils. */ -#undef GNU_PLOTUTILS - -/* Define if you want to use the GNU version of the Unix plot library. */ -#undef GNUGRAPH - -/* Define if you want to use the Apollo Graphics Primitive Resource (fixed-size window. */ -#undef GPR - -/* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ -#undef GRX21 - -/* Define if you have Thomas Boutell's gd library. */ -#undef HAVE_LIBGD - -/* Define if you have the png library. */ -#undef HAVE_LIBPNG - -/* Define if you want to use the IRIS terminal on IRIS4D series computers. */ -#undef IRIS - -/* Define if this is a Linux system with SuperVGA library. */ -#undef LINUXVGA - -/* Define if you want to use the MGR Window system. */ -#undef MGR - -/* Define if this is an MSDOS system with djgpp. */ -#undef MSDOS - -/* Define if you do not want to read .gnuplot in the current directory. */ -#undef NOCWDRC - -/* Define to the name of the distribution. */ -#undef PACKAGE - -/* Define if you do have the popen and pclose functions. */ -#undef PIPES - -/* Define if you have the function prototypes. */ -#undef PROTOTYPES - -/* Define if you want to use the included readline function. */ -#undef READLINE - -/* Define if you want to use the Redwood Graphics Interface Protocol. */ -#undef RGIP - -/* Define if you want to use the sunview terminal (sun). */ -#undef SUN - -/* Define if you want to use the unixpc terminal (ATT 3b1 or ATT 7300. */ -#undef UNIXPC - -/* Define if you want to use the standard Unix plot library. */ -#undef UNIXPLOT - -/* Define if you want to use the system time routines. */ -#undef USE_SYSTEM_TIME - -/* Define to the version of the distribution. */ -#undef VERSION - -/* Define if you are using the X11 window system. */ -#undef X11 - /* Define to `long' if doesn't define. */ #undef time_t diff -urN gnuplot-3.7/aclocal.m4 gnuplot-3.7.1/aclocal.m4 --- gnuplot-3.7/aclocal.m4 Thu Jan 14 19:43:21 1999 +++ gnuplot-3.7.1/aclocal.m4 Sun Nov 7 15:57:20 1999 @@ -1,6 +1,6 @@ -dnl aclocal.m4 generated automatically by aclocal 1.3d +dnl aclocal.m4 generated automatically by aclocal 1.4a -dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -21,6 +21,8 @@ AC_DEFUN(AM_INIT_AUTOMAKE, [AC_REQUIRE([AC_PROG_INSTALL]) +dnl We require 2.13 because we rely on SHELL being computed by configure. +AC_PREREQ([2.13]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] @@ -41,6 +43,23 @@ AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) +dnl Set install_sh for make dist +install_sh="$missing_dir/install-sh" +test -f "$install_sh" || install_sh="$missing_dir/install.sh" +AC_SUBST(install_sh) +dnl We check for tar when the user configures the end package. +dnl This is sad, since we only need this for "dist". However, +dnl there's no other good way to do it. We prefer GNU tar if +dnl we can find it. If we can't find a tar, it doesn't really matter. +AC_CHECK_PROGS(AMTAR, gnutar gtar tar) +AMTARFLAGS= +if test -n "$AMTAR"; then + if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then + dnl We have GNU tar. + AMTARFLAGS=o + fi +fi +AC_SUBST(AMTARFLAGS) AC_REQUIRE([AC_PROG_MAKE_SET])]) # @@ -160,9 +179,10 @@ # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" AC_TRY_COMPILE( @@ -215,31 +235,38 @@ # serial 1 -AC_DEFUN(gp_MSDOS, +AC_DEFUN(GP_MSDOS, [AC_MSG_CHECKING(for MS-DOS/djgpp/libGRX) AC_EGREP_CPP(yes, [#if __DJGPP__ && __DJGPP__ == 2 yes #endif -], AC_MSG_RESULT(yes) - LIBS="-lpc $LIBS" - AC_DEFINE(MSDOS) - AC_DEFINE(DOS32) - with_linux_vga=no - AC_CHECK_LIB(grx20,GrLine,dnl - LIBS="-lgrx20 $LIBS" - CFLAGS="$CFLAGS -fno-inline-functions" - AC_DEFINE(DJSVGA) - AC_CHECK_LIB(grx20,GrCustomLine,AC_DEFINE(GRX21))),dnl - AC_MSG_RESULT(no) - )dnl +],AC_MSG_RESULT(yes) + LIBS="-lpc $LIBS" + AC_DEFINE(MSDOS, 1, + [ Define if this is an MSDOS system. ]) + AC_DEFINE(DOS32, 1, + [ Define if this system uses a 32-bit DOS extender (djgpp/emx). ]) + with_linux_vga=no + AC_CHECK_LIB(grx20,GrLine,dnl + LIBS="-lgrx20 $LIBS" + CFLAGS="$CFLAGS -fno-inline-functions" + AC_DEFINE(DJSVGA, 1, + [ Define if you want to use libgrx20 with MSDOS/djgpp. ]) + AC_CHECK_LIB(grx20,GrCustomLine,dnl + AC_DEFINE(GRX21, 1, + [ Define if you want to use a newer version of libgrx under MSDOS/djgpp. ])dnl + )dnl + ),dnl + AC_MSG_RESULT(no) + )dnl ]) # serial 1 -AC_DEFUN(gp_NEXT, +AC_DEFUN(GP_NEXT, [AC_MSG_CHECKING(for NeXT) AC_EGREP_CPP(yes, [#if __NeXT__ @@ -247,20 +274,106 @@ #endif ], AC_MSG_RESULT(yes) LIBS="$LIBS -lsys_s -lNeXT_s" - NEXTOBJS=epsviewe.o CFLAGS="$CFLAGS -ObjC",dnl - NEXTOBJS= AC_MSG_RESULT(no)) ]) +dnl testing new version of FUNC_SELECT + +AC_DEFUN(AC_FUNC_SELECT, +[AC_CHECK_FUNCS(select) +if test "$ac_cv_func_select" = yes; then + AC_CHECK_HEADERS(unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h) + AC_MSG_CHECKING([argument types of select()]) + AC_CACHE_VAL(ac_cv_type_fd_set_size_t,dnl + [AC_CACHE_VAL(ac_cv_type_fd_set,dnl + [for ac_cv_type_fd_set in 'fd_set' 'int' 'void'; do + for ac_cv_type_fd_set_size_t in 'int' 'size_t' 'unsigned long' 'unsigned'; do + for ac_type_timeval in 'struct timeval' 'const struct timeval'; do + AC_TRY_COMPILE(dnl +[#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif], +[#ifdef __STDC__ +extern int select ($ac_cv_type_fd_set_size_t, + $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, + $ac_type_timeval *); +#else +extern int select (); + $ac_cv_type_fd_set_size_t s; + $ac_cv_type_fd_set *p; + $ac_type_timeval *t; +#endif], +[ac_found=yes ; break 3],ac_found=no) + done + done + done + ])dnl AC_CACHE_VAL + ])dnl AC_CACHE_VAL + if test "$ac_found" = no; then + AC_MSG_ERROR([can't determine argument types]) + fi + + AC_MSG_RESULT([select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)]) + AC_DEFINE_UNQUOTED(fd_set_size_t, $ac_cv_type_fd_set_size_t, + [ First arg for select(). ]) + ac_cast= + if test "$ac_cv_type_fd_set" != fd_set; then + # Arguments 2-4 are not fd_set. Some weirdo systems use fd_set type for + # FD_SET macros, but insist that you cast the argument to select. I don't + # understand why that might be, but it means we cannot define fd_set. + AC_EGREP_CPP(dnl +changequote(<<,>>)dnl +<<(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]>>dnl +changequote([,]),dnl +[#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif],dnl + # We found fd_set type in a header, need special cast + ac_cast="($ac_cv_type_fd_set *)",dnl + # No fd_set type; it is safe to define it + AC_DEFINE_UNQUOTED(fd_set,$ac_cv_type_fd_set, + [ Define if the type in arguments 2-4 to select() is fd_set. ])) + fi + AC_DEFINE_UNQUOTED(SELECT_FD_SET_CAST,$ac_cast, + [ Define if the type in arguments 2-4 to select() is fd_set. ]) +fi +]) -# serial 1 -AC_DEFUN(gp_CHECK_LIB_QUIET, + +# serial 2 + +dnl AC_CHECK_LIB(LIBRARY, FUNCTION [, OTHER-LIBRARIES]) +AC_DEFUN(GP_CHECK_LIB_QUIET, [ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` ac_save_LIBS="$LIBS" -LIBS="$TERMLIBS $TERMXLIBS -l$1 $5 $LIBS" +LIBS="$TERMLIBS $TERMXLIBS -l$1 $3 $LIBS" AC_TRY_LINK(dnl ifelse([$2], [main], , dnl Avoid conflicting decl of main. [/* Override any gcc2 internal prototype to avoid an error. */ @@ -277,47 +390,47 @@ eval "ac_cv_lib_$ac_lib_var=no") LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - ifelse([$3], , -[changequote(, )dnl +changequote(, )dnl ac_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` changequote([, ])dnl - LIBS="$LIBS -l$1" -], [$3]) -else - ifelse([$4], , , [$4 -])dnl +dnl LIBS="$LIBS -l$1" fi ]) -# serial 1 +# serial 2 -dnl gp_SEARCH_LIBDIRS(LIBRARY, FUNCTION [, OTHER-LIBRARIES]) -AC_DEFUN(gp_SEARCH_LIBDIRS, -[AC_MSG_CHECKING([for $2 in -l$1]) -gp_save_TERMLIBS="$TERMLIBS" +dnl GP_PATH_LIB(LIBRARY, FUNCTION, SEARCH-DIRS [, OTHER-LIBRARIES]) +AC_DEFUN(GP_PATH_LIB, +[ac_lib_var=`echo $1['_']$2 | sed 'y%./+-%__p_%'` changequote(, )dnl gp_tr_lib=HAVE_LIB`echo $1 | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` changequote([, ])dnl -dnl The "no" case is just a safety net -case "$with_$1" in - yes|no) - gp_lib_list="";; - *) - gp_lib_path=`echo $with_$1 | sed -e 's%/lib$1\.a$%%'` - gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'` - gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path" -esac -for ac_dir in '' /usr/local/lib $gp_lib_list ; do - TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS" - gp_CHECK_LIB_QUIET($1,$2,dnl - TERMLIBS="$TERMLIBS -l$1"; break, dnl ACTION-IF-FOUND - TERMLIBS="$gp_save_TERMLIBS", dnl ACTION-IF-NOT-FOUND - $3) dnl OTHER-LIBRARIES +AC_MSG_CHECKING([for $2 in -l$1]) +AC_CACHE_VAL(ac_cv_lib_$ac_lib_var, +[gp_save_TERMLIBS="$TERMLIBS" +if test "$3" != yes && test "$3" != no; then + gp_l_path=`echo "$3" | sed -e 's%/lib$1\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + GP_CHECK_LIB_QUIET($1,$2,$4) + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi done -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then +]) +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -l$1" AC_MSG_RESULT(yes) else AC_MSG_RESULT(no) @@ -326,30 +439,44 @@ -# serial 1 +# serial 2 -dnl gp_SEARCH_HEADERDIRS(HEADER-FILE [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) -AC_DEFUN(gp_SEARCH_HEADERDIRS, -[AC_REQUIRE([gp_SEARCH_LIBDIRS]) +dnl GP_PATH_HEADER(HEADER-FILE, SEARCH-DIRS [,ACTION-IF-FOUND [,ACTION-IF-NOT-FOUND]]) +AC_DEFUN(GP_PATH_HEADER, +[ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` +changequote(, )dnl + ac_tr_hdr=HAVE_`echo $1 | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +changequote([, ])dnl AC_MSG_CHECKING([for $1]) -ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` -gp_save_CPPFLAGS="$CPPFLAGS" -for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do - CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`" - AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", +AC_CACHE_VAL(ac_cv_header_$ac_safe, +[gp_save_CPPFLAGS="$CPPFLAGS" +if test "$2" != yes && test "$2" != no; then + gp_h_path=`echo "$2" | sed -e 's%/lib$1\.a$%%'` + gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path" +else + gp_h_list='' +fi +for ac_dir in $gp_h_list '' /usr/local/include ; do + test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}" + AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=${ac_dir}", eval "ac_cv_header_$ac_safe=no") - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + CPPFLAGS="$gp_save_CPPFLAGS" + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then break - else - CPPFLAGS="${ac_save_CPPFLAGS}" fi done -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then +]) +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then + eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\"" + fi + AC_DEFINE_UNQUOTED($ac_tr_hdr) AC_MSG_RESULT(yes) - ifelse([$2], , :, [$2]) + ifelse([$3], , :, [$3]) else AC_MSG_RESULT(no) -ifelse([$3], , , [$3 +ifelse([$4], , , [$4 ])dnl fi ]) diff -urN gnuplot-3.7/alloc.c gnuplot-3.7.1/alloc.c --- gnuplot-3.7/alloc.c Wed Apr 15 20:21:56 1998 +++ gnuplot-3.7.1/alloc.c Wed Apr 15 20:21:56 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: alloc.c,v 1.12 1998/03/22 22:31:16 drd Exp $"; +static char *RCSid = "$Id: alloc.c,v 1.1.1.2 1998/04/15 19:21:56 lhecking Exp $"; #endif /* GNUPLOT - alloc.c */ diff -urN gnuplot-3.7/alloc.h gnuplot-3.7.1/alloc.h --- gnuplot-3.7/alloc.h Wed Apr 15 20:21:58 1998 +++ gnuplot-3.7.1/alloc.h Wed Apr 15 20:21:58 1998 @@ -1,4 +1,4 @@ -/* $Id: alloc.h,v 1.6 1998/03/22 22:31:17 drd Exp $ */ +/* $Id: alloc.h,v 1.1.1.2 1998/04/15 19:21:58 lhecking Exp $ */ /* GNUPLOT - alloc.h */ diff -urN gnuplot-3.7/amiga.c gnuplot-3.7.1/amiga.c --- gnuplot-3.7/amiga.c Wed Apr 15 20:21:59 1998 +++ gnuplot-3.7.1/amiga.c Wed Apr 15 20:21:59 1998 @@ -1,4 +1,4 @@ -/* $Id: amiga.c,v 1.3 1998/03/22 22:31:17 drd Exp $ */ +/* $Id: amiga.c,v 1.1.1.2 1998/04/15 19:21:59 lhecking Exp $ */ /* GNUPLOT - amiga.c */ diff -urN gnuplot-3.7/ansichek.h gnuplot-3.7.1/ansichek.h --- gnuplot-3.7/ansichek.h Fri Nov 20 12:13:23 1998 +++ gnuplot-3.7.1/ansichek.h Thu Aug 19 15:42:08 1999 @@ -1,4 +1,4 @@ -/* $Id: ansichek.h,v 1.14 1998/06/18 14:55:01 ddenholm Exp $ */ +/* $Id: ansichek.h,v 1.8.2.1 1999/08/19 14:42:08 lhecking Exp $ */ /* GNUPLOT - ansichek.h */ @@ -44,14 +44,14 @@ #ifndef ANSI_CHECK_H # define ANSI_CHECK_H +# if defined(__STDC__) && __STDC__ +# ifndef ANSI_C +# define ANSI_C +# endif +# endif /* __STDC__ */ + # ifndef HAVE_CONFIG_H /* Only relevant for systems which don't run configure */ - -# if defined(__STDC__) && __STDC__ -# ifndef ANSI_C -# define ANSI_C -# endif -# endif /* __STDC__ */ /* are all these compiler tests necessary ? - can the makefiles not * just set ANSI_C ? diff -urN gnuplot-3.7/bf_test.c gnuplot-3.7.1/bf_test.c --- gnuplot-3.7/bf_test.c Wed Dec 2 18:38:13 1998 +++ gnuplot-3.7.1/bf_test.c Wed Dec 2 18:38:13 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: bf_test.c,v 1.11 1998/04/14 00:14:48 drd Exp $"; +static char *RCSid = "$Id: bf_test.c,v 1.9 1998/12/02 18:38:13 lhecking Exp $"; #endif diff -urN gnuplot-3.7/binary.c gnuplot-3.7.1/binary.c --- gnuplot-3.7/binary.c Wed Nov 4 14:52:39 1998 +++ gnuplot-3.7.1/binary.c Wed Nov 4 14:52:39 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: binary.c,v 1.10 1998/04/14 00:14:49 drd Exp $"; +static char *RCSid = "$Id: binary.c,v 1.4 1998/11/04 14:52:39 lhecking Exp $"; #endif /* diff -urN gnuplot-3.7/binary.h gnuplot-3.7.1/binary.h --- gnuplot-3.7/binary.h Mon Sep 21 22:07:00 1998 +++ gnuplot-3.7.1/binary.h Mon Sep 21 22:07:00 1998 @@ -1,4 +1,4 @@ -/* $Id: binary.h,v 1.4 1998/03/22 22:31:18 drd Exp $ */ +/* $Id: binary.h,v 1.2 1998/09/21 21:07:00 lhecking Exp $ */ /* GNUPLOT - binary.h */ diff -urN gnuplot-3.7/bitmap.c gnuplot-3.7.1/bitmap.c --- gnuplot-3.7/bitmap.c Wed Nov 4 14:52:55 1998 +++ gnuplot-3.7.1/bitmap.c Mon Oct 11 18:10:54 1999 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: bitmap.c,v 1.16 1998/03/22 22:31:19 drd Exp $"; +static char *RCSid = "$Id: bitmap.c,v 1.2.2.2 1999/10/11 17:10:54 lhecking Exp $"; #endif /* GNUPLOT - bitmap.c */ @@ -678,6 +678,110 @@ 0x1249,000000,000000,0x1249,000000,000000,0x1249}, }; +/* Moved here from gif.trm */ +struct rgb web_color_rgbs[] = +{ + { 0xff, 0xff, 0xff }, /* background: white */ + { 0x00, 0x00, 0x00 }, /* borders: black */ + { 0xa0, 0xa0, 0xa0 }, /* x & y axes: grey */ + { 0xff, 0x00, 0x00 }, /* color 01: red */ + { 0x00, 0xc0, 0x00 }, /* color 02: dark green */ + { 0x00, 0x80, 0xff }, /* color 03: dark blue */ + { 0xc0, 0x00, 0xff }, /* color 04: dark magenta */ + { 0xc0, 0xff, 0x40 }, /* color 05: yellow */ + { 0xc0, 0x40, 0x00 }, /* color 06: orange */ + { 0x40, 0xff, 0x80 }, /* color 07: sea green */ + { 0x20, 0x20, 0xc0 }, /* color 08: royal blue */ + { 0x80, 0x00, 0xc0 }, /* color 09: dark violet */ + /* please note: these colors are optimized for web216 compatibility */ + { 0x00, 0x60, 0x80 }, /* DeepSkyBlue4 */ + { 0x00, 0x80, 0x00 }, /* green4 */ + { 0x00, 0x80, 0x40 }, /* SpringGreen4 */ + { 0x00, 0x80, 0x80 }, /* dark cyan, turquoise4 */ + { 0x00, 0xc0, 0x60 }, /* SpringGreen3 */ + { 0x00, 0xc0, 0xc0 }, /* cyan3, turquoise3 */ + { 0x00, 0xff, 0x00 }, /* green */ + { 0x20, 0x80, 0x20 }, /* forest green */ + { 0x30, 0x60, 0x80 }, /* SteelBlue4 */ + { 0x40, 0x40, 0x40 }, /* grey25-31 */ + { 0x40, 0x80, 0x00 }, /* chartreuse4 */ + { 0x00, 0x00, 0x80 }, /* dark blue, navy blue */ + { 0x80, 0x60, 0x00 }, /* DarkGoldenrod4 */ + { 0x80, 0x60, 0x10 }, /* goldenrod4 */ + { 0x80, 0x60, 0x60 }, /* pink4 */ + { 0x80, 0x60, 0x80 }, /* plum4 */ + { 0x00, 0x00, 0xc0 }, /* medium blue */ + { 0x00, 0x00, 0xff }, /* blue */ + { 0x00, 0x60, 0x00 }, /* dark green */ + { 0x40, 0xc0, 0x80 }, /* SeaGreen3 */ + { 0x60, 0xa0, 0xc0 }, /* SkyBlue3 */ + { 0x60, 0xc0, 0x00 }, /* chartreuse3 */ + { 0x60, 0xc0, 0xa0 }, /* medium aquamarine */ + { 0x80, 0x00, 0x00 }, /* dark red */ + { 0x80, 0x00, 0x80 }, /* dark magenta */ + { 0x60, 0x20, 0x80 }, /* DarkOrchid4 */ + { 0x60, 0x60, 0x60 }, /* dim grey */ + { 0x00, 0xff, 0xff }, /* cyan1, turquoise1 */ + { 0x20, 0x20, 0x20 }, /* grey13-18 */ + { 0x20, 0x40, 0x40 }, /* dark slate grey */ + { 0x20, 0x40, 0x80 }, /* RoyalBlue4 */ + { 0x60, 0x80, 0x20 }, /* olive drab */ + { 0x60, 0x80, 0x60 }, /* DarkSeaGreen4 */ + { 0x60, 0x80, 0x80 }, /* LightBlue4, PaleTurquoise4 */ + { 0x80, 0x80, 0x40 }, /* LightGoldenrod4, khaki4 */ + { 0x80, 0x80, 0x80 }, /* grey51-56 */ + { 0xa0, 0xa0, 0xa0 }, /* dark grey, grey63-68 */ + { 0xa0, 0xd0, 0xe0 }, /* light blue */ + { 0xc0, 0x20, 0x20 }, /* firebrick3 */ + { 0xc0, 0x60, 0x00 }, /* DarkOrange3 */ + { 0x80, 0xc0, 0xe0 }, /* sky blue */ + { 0xc0, 0x60, 0xc0 }, /* orchid3 */ + { 0xc0, 0x80, 0x00 }, /* orange3 */ + { 0xc0, 0x80, 0x60 }, /* LightSalmon3 */ + { 0xff, 0x40, 0x00 }, /* orange red */ + { 0xff, 0x40, 0x40 }, /* brown1, tomato */ + { 0x80, 0xc0, 0xff }, /* light sky blue */ + { 0xff, 0x80, 0x60 }, /* salmon */ + { 0xff, 0x80, 0x80 }, /* light coral */ + { 0xc0, 0xa0, 0x00 }, /* gold3 */ + { 0xc0, 0xc0, 0xc0 }, /* grey76-81, honeydew3, ivory3, snow3 */ + { 0xc0, 0xff, 0xc0 }, /* DarkSeaGreen1 */ + { 0xff, 0x00, 0x00 }, /* red */ + { 0xff, 0x00, 0xff }, /* magenta */ + { 0xff, 0x80, 0xa0 }, /* PaleVioletRed1 */ + { 0xff, 0x80, 0xff }, /* orchid1 */ + { 0xc0, 0xc0, 0xa0 }, /* LemonChiffon3 */ + { 0xff, 0x60, 0x60 }, /* IndianRed1 */ + { 0xff, 0x80, 0x00 }, /* dark orange */ + { 0xff, 0xa0, 0x00 }, /* orange */ + { 0x80, 0xe0, 0xe0 }, /* CadetBlue2, DarkSlateGray2 */ + { 0xa0, 0xe0, 0xe0 }, /* pale turquoise */ + { 0xa0, 0xff, 0x20 }, /* green yellow */ + { 0xc0, 0x00, 0x00 }, /* red3 */ + { 0xc0, 0x00, 0xc0 }, /* magenta3 */ + { 0xa0, 0x20, 0x20 }, /* brown */ + { 0xa0, 0x20, 0xff }, /* purple */ + { 0x80, 0x20, 0x00 }, /* OrangeRed4 */ + { 0x80, 0x20, 0x20 }, /* brown4 */ + { 0x80, 0x40, 0x00 }, /* DarkOrange4 */ + { 0x80, 0x40, 0x20 }, /* sienna4 */ + { 0x80, 0x40, 0x80 }, /* orchid4 */ + { 0x80, 0x60, 0xc0 }, /* MediumPurple3 */ + { 0x80, 0x60, 0xff }, /* SlateBlue1 */ + { 0x80, 0x80, 0x00 }, /* yellow4 */ + { 0xa0, 0x80, 0xff }, /* MediumPurple1 */ + { 0xc0, 0x60, 0x80 }, /* PaleVioletRed3 */ + { 0xc0, 0xc0, 0x00 }, /* yellow3 */ + { 0xff, 0x80, 0x40 }, /* sienna1 */ + { 0xff, 0xa0, 0x40 }, /* tan1 */ + { 0xff, 0xa0, 0x60 }, /* sandy brown */ + { 0xff, 0xa0, 0x70 }, /* light salmon */ + { 0xff, 0xc0, 0x20 }, /* goldenrod1 */ + { 0xff, 0xc0, 0xc0 }, /* RosyBrown1, pink */ + { 0xff, 0xff, 0x00 }, /* yellow */ + { 0xff, 0xff, 0x80 }, /* khaki1 */ + { 0xff, 0xff, 0xc0 } /* lemon chiffon */ +}; /* ** The plotting area is defined as a huge bitmap. @@ -743,7 +847,7 @@ /* Currently unused */ -#if 0 +#if 1 /* HBB 991008: used by PNG, now */ /* * get pixel (x,y) value */ diff -urN gnuplot-3.7/bitmap.h gnuplot-3.7.1/bitmap.h --- gnuplot-3.7/bitmap.h Wed Apr 15 20:22:07 1998 +++ gnuplot-3.7.1/bitmap.h Wed Sep 29 14:48:16 1999 @@ -1,4 +1,4 @@ -/* $Id: bitmap.h,v 1.11 1998/03/22 22:31:19 drd Exp $ */ +/* $Id: bitmap.h,v 1.1.1.2.2.1 1999/09/29 13:48:16 lhecking Exp $ */ /* GNUPLOT - bitmap.h */ @@ -81,6 +81,19 @@ extern unsigned int b_pattern[]; extern int b_maskcount; extern unsigned int b_lastx, b_lasty; /* last pixel set - used by b_line */ + +/* RGB colour table moved out of gif.trm */ +/* + * Common RGB color table for use by all devices. + * It's a subset of the 216-color Web palette. + */ +#define WEB_N_COLORS 99 +struct rgb +{ + unsigned char r, g, b; +}; + +extern struct rgb web_color_rgbs[]; /* Prototypes from file "bitmap.c" */ diff -urN gnuplot-3.7/buildvms.com gnuplot-3.7.1/buildvms.com --- gnuplot-3.7/buildvms.com Wed Oct 28 21:05:30 1998 +++ gnuplot-3.7.1/buildvms.com Wed Oct 20 15:04:13 1999 @@ -31,9 +31,16 @@ $!----------------------------------------------------------------- $! customize CFLAGS for version of VMS, CRTL, and C compiler. $!----------------------------------------------------------------- +$ IF F$GETSYI("ARCH_TYPE") .EQ. 1 +$ THEN +$! these defines work for OpenVMS VAX v6.2 and DEC C v5.7 +$ CFLAGS = "/define=(ANSI_C,HAVE_UNISTD_H,HAVE_GETCWD,"- + +"HAVE_SLEEP,''x11'NO_GIH,PIPES,DECCRTL)''pfix'" +$ ELSE $! these defines work for OpenVMS Alpha v6.2 and DEC C v5.3 -$ CFLAGS = "/define=(ANSI_C,HAVE_LGAMMA,HAVE_ERF,HAVE_UNISTD_H,HAVE_GETCWD,HAVE_SLEEP,"- - +"''x11'NO_GIH,PIPES,DECCRTL)''pfix'/warnings=disable=ADDRCONSTEXT" +$ CFLAGS = "/define=(ANSI_C,HAVE_LGAMMA,HAVE_ERF,HAVE_UNISTD_H,HAVE_GETCWD,"- + +"HAVE_SLEEP,''x11'NO_GIH,PIPES,DECCRTL)''pfix'" +$ ENDIF $! $!----------------------------------------------------------------- $! @@ -109,6 +116,7 @@ $ cc 'CFLAGS' fit.c $ cc 'CFLAGS' graphics.c $ cc 'CFLAGS' graph3d.c +$ cc 'CFLAGS' help.c $ cc 'CFLAGS' hidden3d.c $ cc 'CFLAGS' internal.c $ cc 'CFLAGS' interpol.c @@ -132,18 +140,19 @@ $ cc 'CFLAGS' vms.c $ if its_gnuc then cc 'CFLAGS' GNU_CC_INCLUDE:[000000]_assert.c $! -$ link/exe=gnuplot - -bitmap,command,contour,eval,graphics,graph3d,vms,- -binary,specfun,interpol,fit,matrix,internal,misc,parse,- -plot,plot2d,plot3d,scanner,set,show,datafile,alloc,- -standard,stdfn,term,util,version,util3d,hidden3d,time'extralib''LINKOPT' +$ link/exe=gnuplot.exe - +bitmap.obj,command.obj,contour.obj,eval.obj,graphics.obj,graph3d.obj,help.obj,- +vms.obj,binary.obj,specfun.obj,interpol.obj,fit.obj,matrix.obj,internal.obj,- +misc.obj,parse.obj,plot.obj,plot2d.obj,plot3d.obj,scanner.obj,set.obj,- +show.obj,datafile.obj,alloc.obj,standard.obj,stdfn.obj,term.obj,util.obj,- +version.obj,util3d.obj,hidden3d.obj,time.obj'extralib''LINKOPT' $! $ cc 'CFLAGS' bf_test.c $ link /exe=bf_test bf_test,binary,alloc 'extralib''LINKOPT' -$ ren bf_test.exe [.demo] $ if .NOT. its_decw then goto do_docs $! -$ CC 'CFLAGS' GPLT_X11 stdfn.c +$ CC 'CFLAGS' GPLT_X11 +$ CC 'CFLAGS' stdfn.c $ LINK /exe=GNUPLOT_X11 gplt_x11,stdfn 'extralib''LINKOPT',SYS$INPUT:/OPT SYS$SHARE:DECW$XLIBSHR/SHARE $! @@ -152,14 +161,17 @@ $ if f$locate("ALL_TERM_DOC",CFLAGS).ne.f$length(CFLAGS) then - copy /concatenate [-.term]*.trm []allterm.h $ cc 'CFLAGS' /OBJ=doc2rnh.obj/include=([],[-],[-.term]) doc2rnh.c +$ cc 'CFLAGS' /OBJ=termdoc.obj/include=([],[-],[-.term]) termdoc.c $ SET DEF [-] ! LINKOPT is defined as being in [] -$ link [.docs]doc2rnh /exe=[.docs]doc2rnh 'extralib''LINKOPT' +$ link [.docs]doc2rnh.obj,termdoc.obj /exe=[.docs]doc2rnh 'extralib''LINKOPT' $ doc2rnh := $sys$disk:[.docs]doc2rnh $ doc2rnh [.docs]gnuplot.doc [.docs]gnuplot.rnh $ RUNOFF [.docs]gnuplot.rnh $ library/create/help sys$disk:[]gnuplot.hlb gnuplot.hlp $! -$ run [.demo]bf_test +$ set default [.demo] +$ run [-]bf_test +$ set default [-] $ if its_decw then - write sys$output "%define GNUPLOT_X11 :== $Disk:[directory]GNUPLOT_X11" $! diff -urN gnuplot-3.7/command.c gnuplot-3.7.1/command.c --- gnuplot-3.7/command.c Wed Dec 9 15:22:38 1998 +++ gnuplot-3.7.1/command.c Thu Aug 19 15:42:21 1999 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: command.c,v 1.126 1998/06/22 12:24:48 ddenholm Exp $"; +static char *RCSid = "$Id: command.c,v 1.20.2.1 1999/08/19 14:42:21 lhecking Exp $"; #endif /* GNUPLOT - command.c */ @@ -334,12 +334,12 @@ gstrptime(string, format, &tm); secs = gtimegm(&tm); fprintf(stderr, "internal = %f - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", - secs, tm.tm_mday, tm.tm_mon + 1, tm.tm_year, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); + secs, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); memset(&tm, 0, sizeof(tm)); ggmtime(&tm, secs); gstrftime(string, 159, format, secs); fprintf(stderr, "convert back \"%s\" - %d/%d/%d::%d:%d:%d , wday=%d, yday=%d\n", - string, tm.tm_mday, tm.tm_mon + 1, tm.tm_year, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); + string, tm.tm_mday, tm.tm_mon + 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec, tm.tm_wday, tm.tm_yday); } } } else if (almost_equals(c_token, "test")) { @@ -1114,7 +1114,7 @@ # endif /* AMIGA_AC_5 */ -# if defined(READLINE) || defined(GNU_READLINE) +# if defined(READLINE) || defined(HAVE_LIBREADLINE) /* keep some compilers happy */ static char *rlgets __PROTO((char *s, int n, char *prompt)); @@ -1149,7 +1149,7 @@ } return NULL; } -# endif /* READLINE || GNU_READLINE */ +# endif /* READLINE || HAVE_LIBREADLINE */ # if defined(MSDOS) || defined(_Windows) || defined(DOS386) @@ -1224,7 +1224,7 @@ /* read from stdin, everything except VMS */ -# if !defined(READLINE) && !defined(GNU_READLINE) +# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) # if (defined(MSDOS) || defined(DOS386)) && !defined(_Windows) && !defined(__EMX__) && !defined(DJGPP) /* if interactive use console IO so CED will work */ @@ -1310,7 +1310,7 @@ # define GET_STRING(s,l) fgets(s, l, stdin) # endif /* !plain DOS */ -# endif /* !READLINE && !GNU_READLINE) */ +# endif /* !READLINE && !HAVE_LIBREADLINE) */ /* Non-VMS version */ static int read_line(prompt) @@ -1320,22 +1320,22 @@ TBOOLEAN more = FALSE; int last = 0; -# if !defined(READLINE) && !defined(GNU_READLINE) +# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) if (interactive) PUT_STRING(prompt); # endif /* READLINE */ do { /* grab some input */ -# if defined(READLINE) || defined(GNU_READLINE) +# if defined(READLINE) || defined(HAVE_LIBREADLINE) if (((interactive) ? rlgets(&(input_line[start]), input_line_len - start, ((more) ? "> " : prompt)) : fgets(&(input_line[start]), input_line_len - start, stdin)) == (char *) NULL) { -# else /* !(READLINE || GNU_READLINE) */ +# else /* !(READLINE || HAVE_LIBREADLINE) */ if (GET_STRING(&(input_line[start]), input_line_len - start) == (char *) NULL) { -# endif /* !(READLINE || GNU_READLINE) */ +# endif /* !(READLINE || HAVE_LIBREADLINE) */ /* end-of-file */ if (interactive) (void) putc('\n', stderr); @@ -1368,7 +1368,7 @@ } else more = FALSE; } -# if !defined(READLINE) && !defined(GNU_READLINE) +# if !defined(READLINE) && !defined(HAVE_LIBREADLINE) if (more && interactive) PUT_STRING("> "); # endif diff -urN gnuplot-3.7/commitvers gnuplot-3.7.1/commitvers --- gnuplot-3.7/commitvers Wed Apr 15 20:16:28 1998 +++ gnuplot-3.7.1/commitvers Wed Apr 15 20:16:28 1998 @@ -1,6 +1,6 @@ #! /usr/bin/perl # -# $Id: commitvers,v 1.4 1996/02/26 22:21:49 drd Exp $ +# $Id: commitvers,v 1.1.1.1 1998/04/15 19:16:28 lhecking Exp $ # # update version.c and commit gnuplot # diff -urN gnuplot-3.7/config.hin gnuplot-3.7.1/config.hin --- gnuplot-3.7/config.hin Tue Jan 12 14:01:42 1999 +++ gnuplot-3.7.1/config.hin Fri Oct 22 19:29:08 1999 @@ -15,15 +15,6 @@ /* Define as the return type of signal handlers (int or void). */ #undef RETSIGTYPE -/* Define to the type of arg1 for select(). */ -#undef SELECT_TYPE_ARG1 - -/* Define to the type of args 2, 3 and 4 for select(). */ -#undef SELECT_TYPE_ARG234 - -/* Define to the type of arg5 for select(). */ -#undef SELECT_TYPE_ARG5 - /* Define to `unsigned' if doesn't define. */ #undef size_t @@ -36,81 +27,6 @@ /* Define if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING -/* Define if you want to use the Apollo Graphics Primitive Resource. */ -#undef APOLLO - -/* Define if you want to use the CGI terminal under SCO. */ -#undef CGI - -/* Define if you want to use libgrx20 with MSDOS/djgpp. */ -#undef DJSVGA - -/* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ -#undef DOS32 - -/* Define if declares errno. */ -#undef EXTERN_ERRNO - -/* Define if you are using the GNU readline library. */ -#undef GNU_READLINE - -/* Define if your libplot.a is from GNU plotutils. */ -#undef GNU_PLOTUTILS - -/* Define if you want to use the GNU version of the Unix plot library. */ -#undef GNUGRAPH - -/* Define if you want to use the Apollo Graphics Primitive Resource (fixed-size window. */ -#undef GPR - -/* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ -#undef GRX21 - -/* Define if you have Thomas Boutell's gd library. */ -#undef HAVE_LIBGD - -/* Define if you have the png library. */ -#undef HAVE_LIBPNG - -/* Define if you want to use the IRIS terminal on IRIS4D series computers. */ -#undef IRIS - -/* Define if this is a Linux system with SuperVGA library. */ -#undef LINUXVGA - -/* Define if you want to use the MGR Window system. */ -#undef MGR - -/* Define if this is an MSDOS system with djgpp. */ -#undef MSDOS - -/* Define if you do not want to read .gnuplot in the current directory. */ -#undef NOCWDRC - -/* Define if you do have the popen and pclose functions. */ -#undef PIPES - -/* Define if you want to use the included readline function. */ -#undef READLINE - -/* Define if you want to use the Redwood Graphics Interface Protocol. */ -#undef RGIP - -/* Define if you want to use the sunview terminal (sun). */ -#undef SUN - -/* Define if you want to use the unixpc terminal (ATT 3b1 or ATT 7300. */ -#undef UNIXPC - -/* Define if you want to use the standard Unix plot library. */ -#undef UNIXPLOT - -/* Define if you want to use the system time routines. */ -#undef USE_SYSTEM_TIME - -/* Define if you are using the X11 window system. */ -#undef X11 - /* Define to `long' if doesn't define. */ #undef time_t @@ -162,6 +78,9 @@ /* Define if you have the rindex function. */ #undef HAVE_RINDEX +/* Define if you have the select function. */ +#undef HAVE_SELECT + /* Define if you have the setvbuf function. */ #undef HAVE_SETVBUF @@ -258,9 +177,15 @@ /* Define if you have the header file. */ #undef HAVE_TIME_H +/* Define if you have the header file. */ +#undef HAVE_UNISTD_H + /* Define if you have the header file. */ #undef HAVE_VALUES_H +/* Define if you have the m library (-lm). */ +#undef HAVE_LIBM + /* Name of package */ #undef PACKAGE @@ -269,4 +194,79 @@ /* Define if compiler has function prototypes */ #undef PROTOTYPES + +/* Define if you are using the X11 window system. */ +#undef X11 + +/* Define if this is an MSDOS system. */ +#undef MSDOS + +/* Define if this system uses a 32-bit DOS extender (djgpp/emx). */ +#undef DOS32 + +/* Define if you want to use libgrx20 with MSDOS/djgpp. */ +#undef DJSVGA + +/* Define if you want to use a newer version of libgrx under MSDOS/djgpp. */ +#undef GRX21 + +/* Define if declares errno. */ +#undef EXTERN_ERRNO + +/* Define if you do have the popen and pclose functions. */ +#undef PIPES + +/* First arg for select(). */ +#undef fd_set_size_t + +/* Define if the type in arguments 2-4 to select() is fd_set. */ +#undef fd_set + +/* Define if the type in arguments 2-4 to select() is fd_set. */ +#undef SELECT_FD_SET_CAST + +/* Define if this is a Linux system with SuperVGA library. */ +#undef LINUXVGA + +/* Define if you are using the GNU readline library. */ +#undef HAVE_LIBREADLINE + +/* Define if you want to use the included readline function. */ +#undef READLINE + +/* Define if you want to use the standard Unix plot library. */ +#undef UNIXPLOT + +/* Define if you have the header file. */ +#undef HAVE_PLOTCOMPAT_H + +/* Define if you want to use the GNU version of the Unix plot library. */ +#undef GNUGRAPH + +/* Define if your libplot.a is from GNU plotutils. */ +#undef GNU_PLOTUTILS + +/* Define if you have Thomas Boutell's gd library. */ +#undef HAVE_LIBGD + +/* Define if you have the png library. */ +#undef HAVE_LIBPNG + +/* Define if you want to use the CGI terminal under SCO. */ +#undef CGI + +/* Define if you want to use the sunview terminal (sun). */ +#undef SUN + +/* Define if you do not want to read .gnuplot in the current directory. */ +#undef NOCWDRC + +/* Define if you want to use the IRIS terminal on IRIS4D series computers. */ +#undef IRIS + +/* Define if you want to use the MGR Window system. */ +#undef MGR + +/* Define if you want to use the Redwood Graphics Interface Protocol. */ +#undef RGIP diff -urN gnuplot-3.7/configure gnuplot-3.7.1/configure --- gnuplot-3.7/configure Thu Jan 14 19:43:23 1999 +++ gnuplot-3.7.1/configure Sun Nov 7 15:57:22 1999 @@ -1,80 +1,5 @@ #! /bin/sh -# From configure.in Revision: 1.90 - - - -# Do all the work for Automake. This macro actually does too much -- -# some checks are only needed if your package does certain things. -# But this isn't really a big deal. - -# serial 1 - - - - -# -# Check to make sure that the build environment is sane. -# - - - - - - -# serial 1 - - - - -# serial 1 - -# @defmac AC_PROG_CC_STDC -# @maindex PROG_CC_STDC -# @ovindex CC -# If the C compiler in not in ANSI C mode by default, try to add an option -# to output variable @code{CC} to make it so. This macro tries various -# options that select ANSI C on some system or another. It considers the -# compiler to be in ANSI C mode if it handles function prototypes correctly. -# -# If you use this macro, you should check after calling it whether the C -# compiler has been set to accept ANSI C; if not, the shell variable -# @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source -# code in ANSI C, you can make an un-ANSIfied copy of it by using the -# program @code{ansi2knr}, which comes with Ghostscript. -# @end defmac - - - - -# serial 1 - - - - - -# serial 1 - - - - - -# serial 1 - - - - -# serial 1 - - - - - -# serial 1 - - - - # Guess values for system-dependent variables and create Makefiles. # Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. @@ -87,11 +12,10 @@ ac_default_prefix=/usr/local # Any additions from configure.in: ac_help="$ac_help - --with-readline use the included minimal readline function (default) - --without-readline do not use the included readline function" -ac_help="$ac_help - --with-gnu-readline use the GNU readline library - --with-gnu-readline=PATH Specify the location of GNU readline" + --with-readline use the builtin minimal readline function (default) + --without-readline do not use the builtin readline function + --with-readline=gnu use the GNU readline library + --with-readline=PATH Specify the location of GNU readline" ac_help="$ac_help --with-plot use the Unix plot library --with-plot=PATH Specify the location of GNU libplot" @@ -109,14 +33,8 @@ ac_help="$ac_help --with-lasergnu install lasergnu printer script" ac_help="$ac_help - --without-linux-vga do not use the Linux console driver - (requires Linux SVGAlib /usr/lib/libvga)" -ac_help="$ac_help - --enable-apollo Apollo Graphics Primitive Resource" -ac_help="$ac_help - --enable-gpr Apollo Graphics Primitive Resource (fixed-size window)" -ac_help="$ac_help - --enable-cgi enable CGI terminal (SCO only)" + --with-linux-vga use the Linux SVGA console driver + (requires /usr/lib/libvga)" ac_help="$ac_help --enable-iris enable IRIS terminal (IRIS4D only)" ac_help="$ac_help @@ -124,12 +42,6 @@ ac_help="$ac_help --enable-rgip enable Redwood Graphics Interface Protocol" ac_help="$ac_help - --enable-sun enable sunview terminal (Sun only)" -ac_help="$ac_help - --enable-unixpc enable unixpc terminal (ATT 3b1 or ATT 7300)" -ac_help="$ac_help - --enable-system-time use the system time routines in time.c" -ac_help="$ac_help --with-x use the X Window System" # Initialize some variables set by options. @@ -641,7 +553,10 @@ fi + +# From configure.in Revision: 1.41.2.7 VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` +PL=`sed -n 's/.*patchlevel.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then @@ -673,7 +588,7 @@ # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:677: checking for a BSD compatible install" >&5 +echo "configure:592: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -726,7 +641,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6 -echo "configure:730: checking whether build environment is sane" >&5 +echo "configure:645: checking whether build environment is sane" >&5 # Just in case sleep 1 echo timestamp > conftestfile @@ -783,7 +698,7 @@ test "$program_transform_name" = "" && program_transform_name="s,x,x," echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6 -echo "configure:787: checking whether ${MAKE-make} sets \${MAKE}" >&5 +echo "configure:702: checking whether ${MAKE-make} sets \${MAKE}" >&5 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -810,9 +725,10 @@ fi + PACKAGE=gnuplot -VERSION=$VERSION +VERSION=$VERSION.$PL if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; } @@ -829,7 +745,7 @@ missing_dir=`cd $ac_aux_dir && pwd` echo $ac_n "checking for working aclocal""... $ac_c" 1>&6 -echo "configure:833: checking for working aclocal" >&5 +echo "configure:749: checking for working aclocal" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -842,7 +758,7 @@ fi echo $ac_n "checking for working autoconf""... $ac_c" 1>&6 -echo "configure:846: checking for working autoconf" >&5 +echo "configure:762: checking for working autoconf" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -855,7 +771,7 @@ fi echo $ac_n "checking for working automake""... $ac_c" 1>&6 -echo "configure:859: checking for working automake" >&5 +echo "configure:775: checking for working automake" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -868,7 +784,7 @@ fi echo $ac_n "checking for working autoheader""... $ac_c" 1>&6 -echo "configure:872: checking for working autoheader" >&5 +echo "configure:788: checking for working autoheader" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -881,7 +797,7 @@ fi echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6 -echo "configure:885: checking for working makeinfo" >&5 +echo "configure:801: checking for working makeinfo" >&5 # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. @@ -893,6 +809,50 @@ echo "$ac_t""missing" 1>&6 fi +install_sh="$missing_dir/install-sh" +test -f "$install_sh" || install_sh="$missing_dir/install.sh" + +for ac_prog in gnutar gtar tar +do +# Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:821: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_AMTAR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$AMTAR"; then + ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_AMTAR="$ac_prog" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +AMTAR="$ac_cv_prog_AMTAR" +if test -n "$AMTAR"; then + echo "$ac_t""$AMTAR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + +test -n "$AMTAR" && break +done + +AMTARFLAGS= +if test -n "$AMTAR"; then + if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then + AMTARFLAGS=o + fi +fi + @@ -906,15 +866,6 @@ fi -# Check whether --with-gnu-readline or --without-gnu-readline was given. -if test "${with_gnu_readline+set}" = set; then - withval="$with_gnu_readline" - : -else - test -z "$with_gnu_readline" && with_gnu_readline=no - -fi - # Check whether --with-plot or --without-plot was given. if test "${with_plot+set}" = set; then withval="$with_plot" @@ -945,15 +896,9 @@ # Check whether --with-cwdrc or --without-cwdrc was given. if test "${with_cwdrc+set}" = set; then withval="$with_cwdrc" - test "$withval" = no && cat >> confdefs.h <<\EOF -#define NOCWDRC 1 -EOF - + : else - cat >> confdefs.h <<\EOF -#define NOCWDRC 1 -EOF - + test -z "$with_cwdrc" && with_cwdrc=no fi @@ -972,34 +917,7 @@ withval="$with_linux_vga" : else - test -z "$with_linux_vga" && with_linux_vga=yes - -fi - -# Check whether --enable-apollo or --disable-apollo was given. -if test "${enable_apollo+set}" = set; then - enableval="$enable_apollo" - : -else - test -z "$enable_apollo" && enable_apollo=no - -fi - -# Check whether --enable-gpr or --disable-gpr was given. -if test "${enable_gpr+set}" = set; then - enableval="$enable_gpr" - : -else - test -z "$enable_gpr" && enable_gpr=no - -fi - -# Check whether --enable-cgi or --disable-cgi was given. -if test "${enable_cgi+set}" = set; then - enableval="$enable_cgi" - : -else - test -z "$enable_cgi" && enable_cgi=no + test -z "$with_linux_vga" && with_linux_vga=no fi @@ -1030,38 +948,11 @@ fi -# Check whether --enable-sun or --disable-sun was given. -if test "${enable_sun+set}" = set; then - enableval="$enable_sun" - : -else - test -z "$enable_sun" && enable_sun=no - -fi - -# Check whether --enable-unixpc or --disable-unixpc was given. -if test "${enable_unixpc+set}" = set; then - enableval="$enable_unixpc" - : -else - test -z "$enable_unixpc" && enable_unixpc=no - -fi - -# Check whether --enable-system-time or --disable-system-time was given. -if test "${enable_system_time+set}" = set; then - enableval="$enable_system_time" - : -else - test -z "$enable_system_time" && enable_system_time=no - -fi - # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1065: checking for $ac_word" >&5 +echo "configure:956: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1091,7 +982,7 @@ # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1095: checking for $ac_word" >&5 +echo "configure:986: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1142,7 +1033,7 @@ # Extract the first word of "cl", so it can be a program name with args. set dummy cl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1146: checking for $ac_word" >&5 +echo "configure:1037: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1174,7 +1065,7 @@ fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:1178: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:1069: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. @@ -1185,12 +1076,12 @@ cat > conftest.$ac_ext << EOF -#line 1189 "configure" +#line 1080 "configure" #include "confdefs.h" main(){return(0);} EOF -if { (eval echo configure:1194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then ac_cv_prog_cc_works=yes # If we can't run a trivial program, we are probably using a cross compiler. if (./conftest; exit) 2>/dev/null; then @@ -1216,12 +1107,12 @@ { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:1220: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:1111: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6 cross_compiling=$ac_cv_prog_cc_cross echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6 -echo "configure:1225: checking whether we are using GNU C" >&5 +echo "configure:1116: checking whether we are using GNU C" >&5 if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1230,7 +1121,7 @@ yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1234: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:1125: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then ac_cv_prog_gcc=yes else ac_cv_prog_gcc=no @@ -1249,7 +1140,7 @@ ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:1253: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:1144: checking whether ${CC-cc} accepts -g" >&5 if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1284,7 +1175,7 @@ echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6 -echo "configure:1288: checking for ${CC-cc} option to accept ANSI C" >&5 +echo "configure:1179: checking for ${CC-cc} option to accept ANSI C" >&5 if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else @@ -1294,13 +1185,14 @@ # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 -# HP-UX -Aa -D_HPUX_SOURCE +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ -for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat > conftest.$ac_ext < #include @@ -1337,7 +1229,7 @@ ; return 0; } EOF -if { (eval echo configure:1341: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* am_cv_prog_cc_stdc="$ac_arg"; break else @@ -1361,7 +1253,7 @@ esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1365: checking how to run the C preprocessor" >&5 +echo "configure:1257: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1376,13 +1268,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1393,13 +1285,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1403: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1410,13 +1302,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1443,7 +1335,7 @@ echo $ac_n "checking for function prototypes""... $ac_c" 1>&6 -echo "configure:1447: checking for function prototypes" >&5 +echo "configure:1339: checking for function prototypes" >&5 if test "$am_cv_prog_cc_stdc" != no; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -1456,12 +1348,12 @@ U=_ ANSI2KNR=./ansi2knr # Ensure some checks needed by ansi2knr itself. echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1460: checking for ANSI C header files" >&5 +echo "configure:1352: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -1469,7 +1361,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1473: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1486,7 +1378,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1504,7 +1396,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1525,7 +1417,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1536,7 +1428,7 @@ exit (0); } EOF -if { (eval echo configure:1540: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -1563,17 +1455,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1567: checking for $ac_hdr" >&5 +echo "configure:1459: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1577: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1469: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1602,7 +1494,7 @@ fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1606: checking how to run the C preprocessor" >&5 +echo "configure:1498: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1617,13 +1509,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1627: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1634,13 +1526,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1536: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1651,13 +1543,13 @@ rm -rf conftest* CPP="${CC-cc} -nologo -E" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1553: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : @@ -1682,12 +1574,12 @@ echo "$ac_t""$CPP" 1>&6 echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1686: checking for working const" >&5 +echo "configure:1578: checking for working const" >&5 if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1632: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1757,21 +1649,21 @@ fi echo $ac_n "checking for inline""... $ac_c" 1>&6 -echo "configure:1761: checking for inline" >&5 +echo "configure:1653: checking for inline" >&5 if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1667: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; break else @@ -1799,12 +1691,12 @@ echo $ac_n "checking for preprocessor stringizing operator""... $ac_c" 1>&6 -echo "configure:1803: checking for preprocessor stringizing operator" >&5 +echo "configure:1695: checking for preprocessor stringizing operator" >&5 if eval "test \"`echo '$''{'ac_cv_c_stringize'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 -echo "configure:1839: checking if compiler handles warn and error directives correctly" >&5 +echo "configure:1731: checking if compiler handles warn and error directives correctly" >&5 cat > conftest.$ac_ext <&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1741: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -1869,7 +1761,7 @@ # Uses ac_ vars as temps to allow command line to override cache and checks. # --without-x overrides everything else, but does not touch the cache. echo $ac_n "checking for X""... $ac_c" 1>&6 -echo "configure:1873: checking for X" >&5 +echo "configure:1765: checking for X" >&5 # Check whether --with-x or --without-x was given. if test "${with_x+set}" = set; then @@ -1931,12 +1823,12 @@ # First, try using that file with no special directory specified. cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1940: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1832: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2005,14 +1897,14 @@ ac_save_LIBS="$LIBS" LIBS="-l$x_direct_test_library $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:1908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* LIBS="$ac_save_LIBS" # We can link X programs with no special library path. @@ -2118,17 +2010,17 @@ case "`(uname -sr) 2>/dev/null`" in "SunOS 5"*) echo $ac_n "checking whether -R must be followed by a space""... $ac_c" 1>&6 -echo "configure:2122: checking whether -R must be followed by a space" >&5 +echo "configure:2014: checking whether -R must be followed by a space" >&5 ac_xsave_LIBS="$LIBS"; LIBS="$LIBS -R$x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_nospace=yes else @@ -2144,14 +2036,14 @@ else LIBS="$ac_xsave_LIBS -R $x_libraries" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2047: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_R_space=yes else @@ -2183,7 +2075,7 @@ # libraries were built with DECnet support. And karl@cs.umb.edu says # the Alpha needs dnet_stub (dnet does not exist). echo $ac_n "checking for dnet_ntoa in -ldnet""... $ac_c" 1>&6 -echo "configure:2187: checking for dnet_ntoa in -ldnet" >&5 +echo "configure:2079: checking for dnet_ntoa in -ldnet" >&5 ac_lib_var=`echo dnet'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2191,7 +2083,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2098: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2224,7 +2116,7 @@ if test $ac_cv_lib_dnet_dnet_ntoa = no; then echo $ac_n "checking for dnet_ntoa in -ldnet_stub""... $ac_c" 1>&6 -echo "configure:2228: checking for dnet_ntoa in -ldnet_stub" >&5 +echo "configure:2120: checking for dnet_ntoa in -ldnet_stub" >&5 ac_lib_var=`echo dnet_stub'_'dnet_ntoa | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2232,7 +2124,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldnet_stub $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2272,12 +2164,12 @@ # The nsl library prevents programs from opening the X display # on Irix 5.2, according to dickey@clark.net. echo $ac_n "checking for gethostbyname""... $ac_c" 1>&6 -echo "configure:2276: checking for gethostbyname" >&5 +echo "configure:2168: checking for gethostbyname" >&5 if eval "test \"`echo '$''{'ac_cv_func_gethostbyname'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_gethostbyname=yes" else @@ -2321,7 +2213,7 @@ if test $ac_cv_func_gethostbyname = no; then echo $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6 -echo "configure:2325: checking for gethostbyname in -lnsl" >&5 +echo "configure:2217: checking for gethostbyname in -lnsl" >&5 ac_lib_var=`echo nsl'_'gethostbyname | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2329,7 +2221,7 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2370,12 +2262,12 @@ # -lsocket must be given before -lnsl if both are needed. # We assume that if connect needs -lnsl, so does gethostbyname. echo $ac_n "checking for connect""... $ac_c" 1>&6 -echo "configure:2374: checking for connect" >&5 +echo "configure:2266: checking for connect" >&5 if eval "test \"`echo '$''{'ac_cv_func_connect'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_connect=yes" else @@ -2419,7 +2311,7 @@ if test $ac_cv_func_connect = no; then echo $ac_n "checking for connect in -lsocket""... $ac_c" 1>&6 -echo "configure:2423: checking for connect in -lsocket" >&5 +echo "configure:2315: checking for connect in -lsocket" >&5 ac_lib_var=`echo socket'_'connect | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2427,7 +2319,7 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2462,12 +2354,12 @@ # gomez@mi.uni-erlangen.de says -lposix is necessary on A/UX. echo $ac_n "checking for remove""... $ac_c" 1>&6 -echo "configure:2466: checking for remove" >&5 +echo "configure:2358: checking for remove" >&5 if eval "test \"`echo '$''{'ac_cv_func_remove'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_remove=yes" else @@ -2511,7 +2403,7 @@ if test $ac_cv_func_remove = no; then echo $ac_n "checking for remove in -lposix""... $ac_c" 1>&6 -echo "configure:2515: checking for remove in -lposix" >&5 +echo "configure:2407: checking for remove in -lposix" >&5 ac_lib_var=`echo posix'_'remove | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2519,7 +2411,7 @@ ac_save_LIBS="$LIBS" LIBS="-lposix $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2554,12 +2446,12 @@ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. echo $ac_n "checking for shmat""... $ac_c" 1>&6 -echo "configure:2558: checking for shmat" >&5 +echo "configure:2450: checking for shmat" >&5 if eval "test \"`echo '$''{'ac_cv_func_shmat'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2478: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_shmat=yes" else @@ -2603,7 +2495,7 @@ if test $ac_cv_func_shmat = no; then echo $ac_n "checking for shmat in -lipc""... $ac_c" 1>&6 -echo "configure:2607: checking for shmat in -lipc" >&5 +echo "configure:2499: checking for shmat in -lipc" >&5 ac_lib_var=`echo ipc'_'shmat | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2611,7 +2503,7 @@ ac_save_LIBS="$LIBS" LIBS="-lipc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2655,7 +2547,7 @@ # libraries we check for below, so use a different variable. # --interran@uluru.Stanford.EDU, kb@cs.umb.edu. echo $ac_n "checking for IceConnectionNumber in -lICE""... $ac_c" 1>&6 -echo "configure:2659: checking for IceConnectionNumber in -lICE" >&5 +echo "configure:2551: checking for IceConnectionNumber in -lICE" >&5 ac_lib_var=`echo ICE'_'IceConnectionNumber | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2663,7 +2555,7 @@ ac_save_LIBS="$LIBS" LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2698,6 +2590,50 @@ fi + +if test "$ac_cv_lib_nsl_gethostbyname" = no; then + echo $ac_n "checking for gethostbyname in -lbsd""... $ac_c" 1>&6 +echo "configure:2597: checking for gethostbyname in -lbsd" >&5 +ac_lib_var=`echo bsd'_'gethostbyname | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lbsd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" +else + echo "$ac_t""no" 1>&6 +fi + +fi + if test "$no_x" != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" X_LIBRARIES="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" @@ -2710,9 +2646,9 @@ echo $ac_n "checking for MS-DOS/djgpp/libGRX""... $ac_c" 1>&6 -echo "configure:2714: checking for MS-DOS/djgpp/libGRX" >&5 +echo "configure:2650: checking for MS-DOS/djgpp/libGRX" >&5 cat > conftest.$ac_ext </dev/null 2>&1; then rm -rf conftest* echo "$ac_t""yes" 1>&6 - LIBS="-lpc $LIBS" - cat >> confdefs.h <<\EOF + LIBS="-lpc $LIBS" + cat >> confdefs.h <<\EOF #define MSDOS 1 EOF - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define DOS32 1 EOF - with_linux_vga=no - echo $ac_n "checking for GrLine in -lgrx20""... $ac_c" 1>&6 -echo "configure:2738: checking for GrLine in -lgrx20" >&5 + with_linux_vga=no + echo $ac_n "checking for GrLine in -lgrx20""... $ac_c" 1>&6 +echo "configure:2674: checking for GrLine in -lgrx20" >&5 ac_lib_var=`echo grx20'_'GrLine | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2742,7 +2678,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgrx20 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2768,14 +2704,14 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="-lgrx20 $LIBS" - CFLAGS="$CFLAGS -fno-inline-functions" - cat >> confdefs.h <<\EOF + LIBS="-lgrx20 $LIBS" + CFLAGS="$CFLAGS -fno-inline-functions" + cat >> confdefs.h <<\EOF #define DJSVGA 1 EOF - echo $ac_n "checking for GrCustomLine in -lgrx20""... $ac_c" 1>&6 -echo "configure:2779: checking for GrCustomLine in -lgrx20" >&5 + echo $ac_n "checking for GrCustomLine in -lgrx20""... $ac_c" 1>&6 +echo "configure:2715: checking for GrCustomLine in -lgrx20" >&5 ac_lib_var=`echo grx20'_'GrCustomLine | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -2783,7 +2719,7 @@ ac_save_LIBS="$LIBS" LIBS="-lgrx20 $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:2734: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2809,29 +2745,29 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define GRX21 1 EOF - + else echo "$ac_t""no" 1>&6 fi - + else echo "$ac_t""no" 1>&6 fi else rm -rf conftest* - echo "$ac_t""no" 1>&6 - + echo "$ac_t""no" 1>&6 + fi rm -f conftest* echo $ac_n "checking for NeXT""... $ac_c" 1>&6 -echo "configure:2833: checking for NeXT" >&5 +echo "configure:2769: checking for NeXT" >&5 cat > conftest.$ac_ext <&6 LIBS="$LIBS -lsys_s -lNeXT_s" - NEXTOBJS=epsviewe.o CFLAGS="$CFLAGS -ObjC" else rm -rf conftest* - NEXTOBJS= - echo "$ac_t""no" 1>&6 + echo "$ac_t""no" 1>&6 +fi +rm -f conftest* + + + +echo $ac_n "checking for sin""... $ac_c" 1>&6 +echo "configure:2793: checking for sin" >&5 +if eval "test \"`echo '$''{'ac_cv_func_sin'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char sin(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_sin) || defined (__stub___sin) +choke me +#else +sin(); +#endif + +; return 0; } +EOF +if { (eval echo configure:2821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_sin=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_sin=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'sin`\" = yes"; then + echo "$ac_t""yes" 1>&6 + : +else + echo "$ac_t""no" 1>&6 +fi + +if test "$ac_cv_func_sin" = no ; then + echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6 +echo "configure:2842: checking for sin in -lm" >&5 +ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'` +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + ac_save_LIBS="$LIBS" +LIBS="-lm $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" fi rm -f conftest* +LIBS="$ac_save_LIBS" + +fi +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` + cat >> confdefs.h <&6 +fi -LIBS="$LIBS -lm" +fi +dnlLIBS="$LIBS -lm" echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2862: checking for ANSI C header files" >&5 +echo "configure:2893: checking for ANSI C header files" >&5 if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -2871,7 +2902,7 @@ #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2906: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -2888,7 +2919,7 @@ if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2906,7 +2937,7 @@ if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2927,7 +2958,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2938,7 +2969,7 @@ exit (0); } EOF -if { (eval echo configure:2942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2967,17 +2998,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2971: checking for $ac_hdr" >&5 +echo "configure:3002: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2981: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3012: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3008,17 +3039,17 @@ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3012: checking for $ac_hdr" >&5 +echo "configure:3043: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3053: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3045,12 +3076,12 @@ done test "$ac_cv_header_sys_stat_h" = yes && echo $ac_n "checking whether stat file-mode macros are broken""... $ac_c" 1>&6 -echo "configure:3049: checking whether stat file-mode macros are broken" >&5 +echo "configure:3080: checking whether stat file-mode macros are broken" >&5 if eval "test \"`echo '$''{'ac_cv_header_stat_broken'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3102,9 +3133,9 @@ echo $ac_n "checking for unistd.h""... $ac_c" 1>&6 -echo "configure:3106: checking for unistd.h" >&5 +echo "configure:3137: checking for unistd.h" >&5 cat > conftest.$ac_ext < EOF @@ -3123,9 +3154,9 @@ echo $ac_n "checking if errno variable is declared""... $ac_c" 1>&6 -echo "configure:3127: checking if errno variable is declared" >&5 +echo "configure:3158: checking if errno variable is declared" >&5 cat > conftest.$ac_ext < #ifdef HAVE_ERRNO_H @@ -3135,28 +3166,29 @@ errno=0 ; return 0; } EOF -if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3170: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define EXTERN_ERRNO 1 EOF - echo "$ac_t""no" 1>&6 + + echo "$ac_t""no" 1>&6 + fi rm -f conftest* - echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3155: checking for size_t" >&5 +echo "configure:3187: checking for size_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3184,9 +3216,9 @@ fi echo $ac_n "checking for time_t in time.h""... $ac_c" 1>&6 -echo "configure:3188: checking for time_t in time.h" >&5 +echo "configure:3220: checking for time_t in time.h" >&5 cat > conftest.$ac_ext < EOF @@ -3197,12 +3229,12 @@ else rm -rf conftest* echo "$ac_t""no" 1>&6 echo $ac_n "checking for time_t""... $ac_c" 1>&6 -echo "configure:3201: checking for time_t" >&5 +echo "configure:3233: checking for time_t" >&5 if eval "test \"`echo '$''{'ac_cv_type_time_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #if STDC_HEADERS @@ -3233,12 +3265,12 @@ rm -f conftest* echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6 -echo "configure:3237: checking return type of signal handlers" >&5 +echo "configure:3269: checking return type of signal handlers" >&5 if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < #include @@ -3255,7 +3287,7 @@ int i; ; return 0; } EOF -if { (eval echo configure:3259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_type_signal=void else @@ -3280,12 +3312,12 @@ strerror strchr index strrchr rindex strstr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3284: checking for $ac_func" >&5 +echo "configure:3316: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3337,12 +3369,12 @@ strncasecmp strnicmp sysinfo tcgetattr do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:3341: checking for $ac_func" >&5 +echo "configure:3373: checking for $ac_func" >&5 if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3396,21 +3428,77 @@ fi -for ac_hdr in sys/types.h sys/time.h sys/select.h sys/socket.h +for ac_func in select +do +echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 +echo "configure:3435: checking for $ac_func" >&5 +if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +/* Override any gcc2 internal prototype to avoid an error. */ +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func(); + +int main() { + +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +$ac_func(); +#endif + +; return 0; } +EOF +if { (eval echo configure:3463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_func_$ac_func=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_func_$ac_func=no" +fi +rm -f conftest* +fi + +if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then + echo "$ac_t""yes" 1>&6 + ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` + cat >> confdefs.h <&6 +fi +done + +if test "$ac_cv_func_select" = yes; then + for ac_hdr in unistd.h sys/types.h sys/time.h sys/select.h sys/socket.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:3404: checking for $ac_hdr" >&5 +echo "configure:3492: checking for $ac_hdr" >&5 if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3414: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:3502: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* @@ -3436,28 +3524,28 @@ fi done - echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6 -echo "configure:3441: checking types of arguments for select()" >&5 - if eval "test \"`echo '$''{'ac_cv_func_select_arg234'+set}'`\" = set"; then + echo $ac_n "checking argument types of select()""... $ac_c" 1>&6 +echo "configure:3529: checking argument types of select()" >&5 + if eval "test \"`echo '$''{'ac_cv_type_fd_set_size_t'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if eval "test \"`echo '$''{'ac_cv_func_select_arg1'+set}'`\" = set"; then + if eval "test \"`echo '$''{'ac_cv_type_fd_set'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - if eval "test \"`echo '$''{'ac_cv_func_select_arg5'+set}'`\" = set"; then - echo $ac_n "(cached) $ac_c" 1>&6 -else - for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do - for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do - for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do - cat > conftest.$ac_ext < conftest.$ac_ext < +#endif #ifdef HAVE_SYS_TYPES_H #include #endif -#ifdef HAVE_SYS_TIME_H -#include +#ifdef HAVE_UNISTD_H +#include #endif #ifdef HAVE_SYS_SELECT_H #include @@ -3465,56 +3553,98 @@ #ifdef HAVE_SYS_SOCKET_H #include #endif -extern select ($ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5); int main() { - +#ifdef __STDC__ +extern int select ($ac_cv_type_fd_set_size_t, + $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, $ac_cv_type_fd_set *, + $ac_type_timeval *); +#else +extern int select (); + $ac_cv_type_fd_set_size_t s; + $ac_cv_type_fd_set *p; + $ac_type_timeval *t; +#endif ; return 0; } EOF -if { (eval echo configure:3474: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3570: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* - ac_not_found=no ; break 3 + ac_found=yes ; break 3 else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* - ac_not_found=yes + ac_found=no fi rm -f conftest* + done + done done - done - done - + fi fi - -fi - if test "$ac_not_found" = yes; then - ac_cv_func_select_arg1=int - ac_cv_func_select_arg234='int *' - ac_cv_func_select_arg5='struct timeval *' - fi - echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6 - cat >> confdefs.h <&2; exit 1; } + fi + + echo "$ac_t""select($ac_cv_type_fd_set_size_t,$ac_cv_type_fd_set *,...)" 1>&6 + cat >> confdefs.h <> confdefs.h < conftest.$ac_ext < +#endif +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_UNISTD_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "(^|[^a-zA-Z_0-9])fd_set[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + # We found fd_set type in a header, need special cast + ac_cast="($ac_cv_type_fd_set *)" +else + rm -rf conftest* + # No fd_set type; it is safe to define it + cat >> confdefs.h <> confdefs.h <> confdefs.h <&6 -echo "configure:3516: checking for linux vga library" >&5 +echo "configure:3646: checking for linux vga library" >&5 echo $ac_n "checking for vga_init in -lvga""... $ac_c" 1>&6 -echo "configure:3518: checking for vga_init in -lvga" >&5 +echo "configure:3648: checking for vga_init in -lvga" >&5 ac_lib_var=`echo vga'_'vga_init | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3522,7 +3652,7 @@ ac_save_LIBS="$LIBS" LIBS="-lvga $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3561,11 +3691,12 @@ fi -if test "$with_gnu_readline" != no; then - gp_tcap="" - for termlib in ncurses curses termcap terminfo termlib; do - echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6 -echo "configure:3569: checking for tputs in -l${termlib}" >&5 +if test "$with_readline" != no; then + if test "$with_readline" != yes; then + gp_tcap="" + for termlib in ncurses curses termcap terminfo termlib; do + echo $ac_n "checking for tputs in -l${termlib}""... $ac_c" 1>&6 +echo "configure:3700: checking for tputs in -l${termlib}" >&5 ac_lib_var=`echo ${termlib}'_'tputs | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3573,7 +3704,7 @@ ac_save_LIBS="$LIBS" LIBS="-l${termlib} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3599,30 +3730,29 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - gp_tcap="${gp_tcap} -l${termlib}" + gp_tcap="$gp_tcap -l$termlib" else echo "$ac_t""no" 1>&6 fi - case "${gp_tcap}" in - *-l${termlib}*) - echo "$ac_t""using ${gp_tcap} with readline" 1>&6 - break - ;; - esac - done + case "$gp_tcap" in + *-l${termlib}*) + break + ;; + esac + done - if test "$with_gnu_readline" = yes; then - echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 -echo "configure:3618: checking for readline in -lreadline" >&5 + if test "$with_readline" = gnu; then + echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:3748: checking for readline in -lreadline" >&5 ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lreadline ${gp_tcap} $LIBS" +LIBS="-lreadline ${gp_tcap} $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3648,51 +3778,108 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - LIBS="$LIBS -lreadline $gp_tcap" - cat >> confdefs.h <<\EOF -#define GNU_READLINE 1 + TERMLIBS="$TERMLIBS -lreadline $gp_tcap" +else + echo "$ac_t""no" 1>&6 +fi + + else + ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` + gp_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6 +echo "configure:3792: checking for readline in -lreadline" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_readline" != yes && test "$with_readline" != no; then + gp_l_path=`echo "$with_readline" | sed -e 's%/libreadline\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + ac_lib_var=`echo readline'_'readline | sed 'y%./+-%__p_%'` +ac_save_LIBS="$LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lreadline ${gp_tcap} $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + ac_tr_lib=HAVE_LIB`echo readline | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +fi + + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done + +fi - with_readline=no +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lreadline" + echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 - { echo "configure: error: Can't find -lreadline in a standard path -- specify its location using --with-gnu-readline=/path/to/libreadline.a" 1>&2; exit 1; } fi - else - if test ! -f $with_gnu_readline ; then - if test ! -f ${with_gnu_readline}/lib/libreadline.a ; then - if test ! -f ${with_gnu_readline}/libreadline.a ; then - { echo "configure: error: GNU readline library not found" 1>&2; exit 1; } - else - echo "$ac_t""using ${with_gnu_readline}/libreadline.a" 1>&6 - LIBS="$LIBS ${with_gnu_readline}/libreadline.a $gp_tcap" - fi - else - echo "$ac_t""using ${with_gnu_readline}/lib/libreadline.a" 1>&6 - LIBS="$LIBS ${with_gnu_readline}/lib/libreadline.a $gp_tcap" + + if test "$ac_cv_lib_readline_readline" != no; then + TERMLIBS="$TERMLIBS $gp_tcap" fi - else - echo "$ac_t""using ${with_gnu_readline}" 1>&6 - LIBS="$LIBS $with_gnu_readline $gp_tcap" fi - cat >> confdefs.h <<\EOF -#define GNU_READLINE 1 + if test "$ac_cv_lib_readline_readline" = no; then + echo "configure: warning: GNU readline not found - falling back to builtin readline" 1>&2 + with_readline=yes + else + cat >> confdefs.h <<\EOF +#define HAVE_LIBREADLINE 1 EOF - with_readline=no - fi -fi + fi # ! ac_cv_lib_readline_readline = no -test "$with_readline" = yes && cat >> confdefs.h <<\EOF + fi # ! with_readline != yes + + if test "$with_readline" = yes; then + cat >> confdefs.h <<\EOF #define READLINE 1 EOF + fi + +fi if test "$with_plot" != no; then if test "$with_plot" = yes; then echo $ac_n "checking for openpl in -lplot""... $ac_c" 1>&6 -echo "configure:3696: checking for openpl in -lplot" >&5 +echo "configure:3883: checking for openpl in -lplot" >&5 ac_lib_var=`echo plot'_'openpl | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -3700,7 +3887,7 @@ ac_save_LIBS="$LIBS" LIBS="-lplot $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3902: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3738,37 +3925,38 @@ else TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11" - echo $ac_n "checking for textangle in -lplot""... $ac_c" 1>&6 -echo "configure:3743: checking for textangle in -lplot" >&5 -gp_save_TERMLIBS="$TERMLIBS" + ac_lib_var=`echo plot'_'pl_textangle | sed 'y%./+-%__p_%'` gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -case "$with_plot" in - yes|no) - gp_lib_list="";; - *) - gp_lib_path=`echo $with_plot | sed -e 's%/libplot\.a$%%'` - gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'` - gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path" -esac -for ac_dir in '' /usr/local/lib $gp_lib_list ; do - TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS" - ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'` +echo $ac_n "checking for pl_textangle in -lplot""... $ac_c" 1>&6 +echo "configure:3933: checking for pl_textangle in -lplot" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_plot" != yes && test "$with_plot" != no; then + gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + ac_lib_var=`echo plot'_'pl_textangle | sed 'y%./+-%__p_%'` ac_save_LIBS="$LIBS" -LIBS="$TERMLIBS $TERMXLIBS -lplot $TERMXLIBS $LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lplot $TERMXLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:3960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3780,50 +3968,62 @@ rm -f conftest* LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - TERMLIBS="$TERMLIBS -lplot"; break -else - TERMLIBS="$gp_save_TERMLIBS" + ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` fi - done -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done + +fi + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lplot" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi - if test "$ac_cv_lib_plot_textangle" = no; then - TERMXLIBS= - echo $ac_n "checking for rotate in -lplot""... $ac_c" 1>&6 -echo "configure:3798: checking for rotate in -lplot" >&5 -gp_save_TERMLIBS="$TERMLIBS" + if test "$ac_cv_lib_plot_pl_textangle" = no; then + ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'` gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -case "$with_plot" in - yes|no) - gp_lib_list="";; - *) - gp_lib_path=`echo $with_plot | sed -e 's%/libplot\.a$%%'` - gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'` - gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path" -esac -for ac_dir in '' /usr/local/lib $gp_lib_list ; do - TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS" - ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'` +echo $ac_n "checking for textangle in -lplot""... $ac_c" 1>&6 +echo "configure:4000: checking for textangle in -lplot" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_plot" != yes && test "$with_plot" != no; then + gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + ac_lib_var=`echo plot'_'textangle | sed 'y%./+-%__p_%'` ac_save_LIBS="$LIBS" -LIBS="$TERMLIBS $TERMXLIBS -lplot $LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lplot $TERMXLIBS $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4027: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3835,73 +4035,63 @@ rm -f conftest* LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - TERMLIBS="$TERMLIBS -lplot"; break -else - TERMLIBS="$gp_save_TERMLIBS" -fi - done -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - echo "$ac_t""yes" 1>&6 -else - echo "$ac_t""no" 1>&6 + ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` fi - if test "$ac_cv_lib_plot_rotate" = no; then - echo "configure: warning: can't find GNU libplot -- disabling gnugraph terminal" 1>&2 - with_plot=no - else - echo "$ac_t"" - using obsolete GNU graphics library" 1>&6 - cat >> confdefs.h <<\EOF -#define GNUGRAPH 1 -EOF - - fi # old GNU plotlib - else - echo "$ac_t"" - using GNU plotutils library" 1>&6 - cat >> confdefs.h <<\EOF -#define GNUGRAPH 1 -EOF + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done - cat >> confdefs.h <<\EOF -#define GNU_PLOTUTILS 1 -EOF +fi - fi # new GNU plotlib - fi # Unix plotlib +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lplot" + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 fi -if test "$with_gd" != no; then - echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6 -echo "configure:3876: checking for gdImageCreate in -lgd" >&5 -gp_save_TERMLIBS="$TERMLIBS" - gp_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + if test "$ac_cv_lib_plot_textangle" = no; then + TERMXLIBS= + ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'` + gp_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -case "$with_gd" in - yes|no) - gp_lib_list="";; - *) - gp_lib_path=`echo $with_gd | sed -e 's%/libgd\.a$%%'` - gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'` - gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path" -esac -for ac_dir in '' /usr/local/lib $gp_lib_list ; do - TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS" - ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` +echo $ac_n "checking for rotate in -lplot""... $ac_c" 1>&6 +echo "configure:4068: checking for rotate in -lplot" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_plot" != yes && test "$with_plot" != no; then + gp_l_path=`echo "$with_plot" | sed -e 's%/libplot\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + ac_lib_var=`echo plot'_'rotate | sed 'y%./+-%__p_%'` ac_save_LIBS="$LIBS" -LIBS="$TERMLIBS $TERMXLIBS -lgd $LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lplot $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4095: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3913,36 +4103,67 @@ rm -f conftest* LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - TERMLIBS="$TERMLIBS -lgd"; break -else - TERMLIBS="$gp_save_TERMLIBS" + ac_tr_lib=HAVE_LIB`echo plot | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` fi - done -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done + +fi + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lplot" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi - if test "$ac_cv_lib_gd_gdImageCreate" = yes; then - -echo $ac_n "checking for gd.h""... $ac_c" 1>&6 -echo "configure:3931: checking for gd.h" >&5 -ac_safe=`echo "gd.h" | sed 'y%./+-%__p_%'` -gp_save_CPPFLAGS="$CPPFLAGS" -for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do - CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`" + if test "$ac_cv_lib_plot_rotate" = no; then + echo "configure: warning: can't find GNU libplot -- disabling gnugraph terminal" 1>&2 + with_plot=no + else + echo "$ac_t"" - using obsolete GNU graphics library" 1>&6 + fi # old GNU plotlib + else + echo "$ac_t"" - using GNU plotutils library" 1>&6 + fi # GNU plotlib pre-2.2 + else + ac_safe=`echo "plotcompat.h" | sed 'y%./+-%__p_%'` + ac_tr_hdr=HAVE_`echo plotcompat.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo $ac_n "checking for plotcompat.h""... $ac_c" 1>&6 +echo "configure:4143: checking for plotcompat.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_CPPFLAGS="$CPPFLAGS" +if test "$with_plot" != yes && test "$with_plot" != no; then + gp_h_path=`echo "$with_plot" | sed -e 's%/libplotcompat.h\.a$%%'` + gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path" +else + gp_h_list='' +fi +for ac_dir in $gp_h_list '' /usr/local/include ; do + test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}" cat > conftest.$ac_ext < +#include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:3942: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_header_$ac_safe=${ac_dir}" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 @@ -3951,51 +4172,208 @@ eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + CPPFLAGS="$gp_save_CPPFLAGS" + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then break - else - CPPFLAGS="${ac_save_CPPFLAGS}" fi done -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +fi + +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then + eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\"" + fi + cat >> confdefs.h <&6 - : + cat >> confdefs.h <<\EOF +#define HAVE_PLOTCOMPAT_H 1 +EOF + else echo "$ac_t""no" 1>&6 -echo "configure: warning: found gd library but not gd.h" 1>&2 - echo "configure: warning: please add path to gd.h to CPPFLAGS in Makefile" 1>&2 - +echo "configure: warning: found GNU plotutils 2.2+ library but not plotcompat.h" 1>&2 + echo "configure: warning: please add path to plotcompat.h to CPPFLAGS in Makefile" 1>&2 + fi - cat >> confdefs.h <<\EOF + # plotcompat.h + fi # new GNU plotlib + + if test "$with_plot" != no; then + cat >> confdefs.h <<\EOF +#define GNUGRAPH 1 +EOF + + cat >> confdefs.h <<\EOF +#define GNU_PLOTUTILS 1 +EOF + + fi + + fi # ! Unix plotlib +fi + +if test "$with_gd" != no; then + ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` + gp_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +echo $ac_n "checking for gdImageCreate in -lgd""... $ac_c" 1>&6 +echo "configure:4225: checking for gdImageCreate in -lgd" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_gd" != yes && test "$with_gd" != no; then + gp_l_path=`echo "$with_gd" | sed -e 's%/libgd\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" + ac_lib_var=`echo gd'_'gdImageCreate | sed 'y%./+-%__p_%'` +ac_save_LIBS="$LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lgd $LIBS" +cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_lib_$ac_lib_var=no" +fi +rm -f conftest* +LIBS="$ac_save_LIBS" +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + ac_tr_lib=HAVE_LIB`echo gd | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` +fi + + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done + +fi + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lgd" + echo "$ac_t""yes" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + if test "$ac_cv_lib_gd_gdImageCreate" != no; then + ac_safe=`echo "gd.h" | sed 'y%./+-%__p_%'` + ac_tr_hdr=HAVE_`echo gd.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` +echo $ac_n "checking for gd.h""... $ac_c" 1>&6 +echo "configure:4291: checking for gd.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_CPPFLAGS="$CPPFLAGS" +if test "$with_gd" != yes && test "$with_gd" != no; then + gp_h_path=`echo "$with_gd" | sed -e 's%/libgd.h\.a$%%'` + gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path" +else + gp_h_list='' +fi +for ac_dir in $gp_h_list '' /usr/local/include ; do + test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}" + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4311: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=${ac_dir}" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* + CPPFLAGS="$gp_save_CPPFLAGS" + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + break + fi +done + +fi + +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then + eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\"" + fi + cat >> confdefs.h <&6 + cat >> confdefs.h <<\EOF #define HAVE_LIBGD 1 EOF +else + echo "$ac_t""no" 1>&6 + echo "configure: warning: found gd library but not gd.h" 1>&2 + echo "configure: warning: please add path to gd.h to CPPFLAGS in Makefile" 1>&2 +fi + else echo "$ac_t""- see term/gif.trm for download details" 1>&6 fi fi if test "$with_png" != no; then - echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6 -echo "configure:3981: checking for png_info_init in -lpng" >&5 -gp_save_TERMLIBS="$TERMLIBS" + ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'` gp_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` -case "$with_png" in - yes|no) - gp_lib_list="";; - *) - gp_lib_path=`echo $with_png | sed -e 's%/libpng\.a$%%'` - gp_lib_prefix=`echo $gp_lib_path | sed 's%/lib$%%'` - gp_lib_list="$gp_lib_prefix $gp_lib_prefix/lib $gp_lib_path" -esac -for ac_dir in '' /usr/local/lib $gp_lib_list ; do - TERMLIBS="`test x${ac_dir} != x && echo -L${ac_dir}` $gp_save_TERMLIBS" +echo $ac_n "checking for png_info_init in -lpng""... $ac_c" 1>&6 +echo "configure:4361: checking for png_info_init in -lpng" >&5 +if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_TERMLIBS="$TERMLIBS" +if test "$with_png" != yes && test "$with_png" != no; then + gp_l_path=`echo "$with_png" | sed -e 's%/libpng\.a$%%'` + gp_l_prfx=`echo $gp_l_path | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_l_list="$gp_l_prfx $gp_l_prfx/lib $gp_l_path" +fi +for ac_dir in $gp_l_list '' /usr/local/lib ; do + test x${ac_dir} != x && TERMLIBS="-L${ac_dir} $gp_save_TERMLIBS" ac_lib_var=`echo png'_'png_info_init | sed 'y%./+-%__p_%'` ac_save_LIBS="$LIBS" -LIBS="$TERMLIBS $TERMXLIBS -lpng -lz $LIBS" +LIBS="$TERMLIBS $TERMXLIBS -lpng -lz $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4018,37 +4396,59 @@ rm -f conftest* LIBS="$ac_save_LIBS" if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then - TERMLIBS="$TERMLIBS -lpng"; break -else - TERMLIBS="$gp_save_TERMLIBS" + ac_tr_lib=HAVE_LIB`echo png | sed -e 's/[^a-zA-Z0-9_]/_/g' \ + -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` fi - done -if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + + TERMLIBS="$gp_save_TERMLIBS" + if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then + eval "ac_cv_lib_$ac_lib_var=${ac_dir}" + break + fi +done + +fi + +if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" != no"; then + if eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != x" && eval "test \"`echo x'$ac_cv_lib_'$ac_lib_var`\" != xyes"; then + eval "TERMLIBS=\"$gp_save_TERMLIBS -L`echo '$ac_cv_lib_'$ac_lib_var`\"" + fi + TERMLIBS="$TERMLIBS -lpng" echo "$ac_t""yes" 1>&6 else echo "$ac_t""no" 1>&6 fi - if test "$ac_cv_lib_png_png_info_init" = yes; then + if test "$ac_cv_lib_png_png_info_init" != no; then TERMLIBS="$TERMLIBS -lz" - + ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` + ac_tr_hdr=HAVE_`echo png.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for png.h""... $ac_c" 1>&6 -echo "configure:4037: checking for png.h" >&5 -ac_safe=`echo "png.h" | sed 'y%./+-%__p_%'` -gp_save_CPPFLAGS="$CPPFLAGS" -for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do - CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`" +echo "configure:4428: checking for png.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_CPPFLAGS="$CPPFLAGS" +if test "$with_png" != yes && test "$with_png" != no; then + gp_h_path=`echo "$with_png" | sed -e 's%/libpng.h\.a$%%'` + gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path" +else + gp_h_list='' +fi +for ac_dir in $gp_h_list '' /usr/local/include ; do + test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4448: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_header_$ac_safe=${ac_dir}" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 @@ -4057,39 +4457,59 @@ eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + CPPFLAGS="$gp_save_CPPFLAGS" + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then break - else - CPPFLAGS="${ac_save_CPPFLAGS}" fi done -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +fi + +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then + eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\"" + fi + cat >> confdefs.h <&6 : else echo "$ac_t""no" 1>&6 -echo "configure: warning: found png library but not png.h" 1>&2 + echo "configure: warning: found png library but not png.h" 1>&2 echo "configure: warning: please add path to png.h to CPPFLAGS in Makefile" 1>&2 fi - + + ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` + ac_tr_hdr=HAVE_`echo zlib.h | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` echo $ac_n "checking for zlib.h""... $ac_c" 1>&6 -echo "configure:4078: checking for zlib.h" >&5 -ac_safe=`echo "zlib.h" | sed 'y%./+-%__p_%'` -gp_save_CPPFLAGS="$CPPFLAGS" -for ac_dir in '' /usr/local/include $gp_lib_prefix $gp_lib_prefix/include ; do - CPPFLAGS="$gp_save_CPPFLAGS `test x${ac_dir} != x && echo -I${ac_dir}`" +echo "configure:4489: checking for zlib.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + gp_save_CPPFLAGS="$CPPFLAGS" +if test "$with_png" != yes && test "$with_png" != no; then + gp_h_path=`echo "$with_png" | sed -e 's%/libzlib.h\.a$%%'` + gp_h_prfx=`echo "$gp_h_path" | sed -e 's%/lib$%%' -e 's%/include$%%'` + gp_h_list="$gp_h_prfx $gp_h_prfx/include $gp_h_path" +else + gp_h_list='' +fi +for ac_dir in $gp_h_list '' /usr/local/include ; do + test x${ac_dir} != x && CPPFLAGS="$gp_save_CPPFLAGS -I${ac_dir}" cat > conftest.$ac_ext < EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:4089: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:4509: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* - eval "ac_cv_header_$ac_safe=yes" + eval "ac_cv_header_$ac_safe=${ac_dir}" else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 @@ -4098,24 +4518,34 @@ eval "ac_cv_header_$ac_safe=no" fi rm -f conftest* - if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + CPPFLAGS="$gp_save_CPPFLAGS" + if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then break - else - CPPFLAGS="${ac_save_CPPFLAGS}" fi done -if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + +fi + +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" != no"; then + if eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != x" && eval "test \"`echo x'$ac_cv_header_'$ac_safe`\" != xyes"; then + eval "CPPFLAGS=\"$gp_save_CPPFLAGS -I`echo '$ac_cv_header_'$ac_safe`\"" + fi + cat >> confdefs.h <&6 : else echo "$ac_t""no" 1>&6 -echo "configure: warning: found z library but not zlib.h" 1>&2 + echo "configure: warning: found z library but not zlib.h" 1>&2 echo "configure: warning: please add path to zlib.h to CPPFLAGS in Makefile" 1>&2 fi - if test "$ac_cv_header_png_h" = yes; then + + if test "$ac_cv_header_png_h" != no; then cat > conftest.$ac_ext </dev/null 2>&1; then rm -rf conftest* echo "configure: warning: - libpng too old - not including png driver" 1>&2 -else - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define HAVE_LIBPNG 1 -EOF - + with_png=no fi rm -f conftest* else echo "configure: warning: - cannot check png version - compilation may fail" 1>&2 - cat >> confdefs.h <<\EOF + fi + + if test "$with_png" != no; then + cat >> confdefs.h <<\EOF #define HAVE_LIBPNG 1 EOF - fi + fi + else echo "$ac_t""- see term/png.trm for download details" 1>&6 fi fi -echo $ac_n "checking terminal driver sources""... $ac_c" 1>&6 -echo "configure:4153: checking terminal driver sources" >&5 -( cd $srcdir/term && for i in *.trm ; do echo '${srcdir}'/../term/$i ; done )\ - |(tr '\012' @; echo) |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012' >termlist -TERM_LIST=termlist - -echo "$ac_t""list created" 1>&6 - -if test "$enable_apollo" = yes; then - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define APOLLO 1 -EOF - -else - rm -rf conftest* - enable_apollo=no -fi -rm -f conftest* - -fi - -if test "$enable_gpr" = yes; then - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define APOLLO 1 -EOF - cat >> confdefs.h <<\EOF -#define GPR 1 -EOF - -else - rm -rf conftest* - enable_gpr=no -fi -rm -f conftest* - -fi - -if test "$enable_cgi" = yes; then - cat > conftest.$ac_ext < conftest.$ac_ext <&5 | egrep "yes" >/dev/null 2>&1; then rm -rf conftest* echo $ac_n "checking for v_opnwk in -lccgi""... $ac_c" 1>&6 -echo "configure:4226: checking for v_opnwk in -lccgi" >&5 +echo "configure:4595: checking for v_opnwk in -lccgi" >&5 ac_lib_var=`echo ccgi'_'v_opnwk | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 @@ -4230,7 +4599,7 @@ ac_save_LIBS="$LIBS" LIBS="-lccgi $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4256,45 +4625,50 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF + cat >> confdefs.h <<\EOF #define CGI 1 EOF - - TERMLIBS="$TERMLIBS -lccgi" + TERMLIBS="$TERMLIBS -lccgi" else echo "$ac_t""no" 1>&6 fi -else - rm -rf conftest* - enable_cgi=no fi rm -f conftest* -fi -if test "$enable_iris" = yes; then - echo $ac_n "checking for winopen in -lgl_s""... $ac_c" 1>&6 -echo "configure:4279: checking for winopen in -lgl_s" >&5 -ac_lib_var=`echo gl_s'_'winopen | sed 'y%./+-%__p_%'` +cat > conftest.$ac_ext <&5 | + egrep "yes" >/dev/null 2>&1; then + rm -rf conftest* + echo $ac_n "checking for window_create in -lsuntool""... $ac_c" 1>&6 +echo "configure:4653: checking for window_create in -lsuntool" >&5 +ac_lib_var=`echo suntool'_'window_create | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lgl_s $LIBS" +LIBS="-lsuntool -lsunwindow -lpixrect $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4309,40 +4683,80 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 - cat >> confdefs.h <<\EOF -#define IRIS 1 + ac_safe=`echo "suntool/sunview.h" | sed 'y%./+-%__p_%'` +echo $ac_n "checking for suntool/sunview.h""... $ac_c" 1>&6 +echo "configure:4689: checking for suntool/sunview.h" >&5 +if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:4699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + rm -rf conftest* + eval "ac_cv_header_$ac_safe=yes" +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + eval "ac_cv_header_$ac_safe=no" +fi +rm -f conftest* +fi +if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then + echo "$ac_t""yes" 1>&6 + cat >> confdefs.h <<\EOF +#define SUN 1 EOF + TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect" +else + echo "$ac_t""no" 1>&6 +fi - TERMLIBS="$TERMLIBS -lgl_s" else echo "$ac_t""no" 1>&6 - enable_iris=no fi fi +rm -f conftest* -if test "$enable_mgr" = yes; then - echo $ac_n "checking for m_getinfo in -lmgr""... $ac_c" 1>&6 -echo "configure:4327: checking for m_getinfo in -lmgr" >&5 -ac_lib_var=`echo mgr'_'m_getinfo | sed 'y%./+-%__p_%'` + + +if test "$with_cdwrc" = no; then + cat >> confdefs.h <<\EOF +#define NOCWDRC 1 +EOF + +fi + +if test "$enable_iris" = yes; then + echo $ac_n "checking for winopen in -lgl_s""... $ac_c" 1>&6 +echo "configure:4741: checking for winopen in -lgl_s" >&5 +ac_lib_var=`echo gl_s'_'winopen | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lmgr -lpixrect $LIBS" +LIBS="-lgl_s $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4358,45 +4772,39 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF -#define MGR 1 +#define IRIS 1 EOF - TERMLIBS="$TERMLIBS -lmgr -lpixrect" + + TERMLIBS="$TERMLIBS -lgl_s" else echo "$ac_t""no" 1>&6 - enable_mgr=no + enable_iris=no fi fi -if test "$enable_rgip" = yes; then - cat >> confdefs.h <<\EOF -#define RGIP 1 -EOF - -fi - -if test "$enable_sun" = yes; then - echo $ac_n "checking for window_create in -lsuntool""... $ac_c" 1>&6 -echo "configure:4381: checking for window_create in -lsuntool" >&5 -ac_lib_var=`echo suntool'_'window_create | sed 'y%./+-%__p_%'` +if test "$enable_mgr" = yes; then + echo $ac_n "checking for m_getinfo in -lmgr""... $ac_c" 1>&6 +echo "configure:4789: checking for m_getinfo in -lmgr" >&5 +ac_lib_var=`echo mgr'_'m_getinfo | sed 'y%./+-%__p_%'` if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else ac_save_LIBS="$LIBS" -LIBS="-lsuntool -lsunwindow -lpixrect $LIBS" +LIBS="-lmgr -lpixrect $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then +if { (eval echo configure:4808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4412,45 +4820,20 @@ if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF -#define SUN 1 -EOF - TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect" -else - echo "$ac_t""no" 1>&6 - enable_sun=no -fi - -fi - -if test "$enable_unixpc" = yes; then - cat > conftest.$ac_ext <&5 | - egrep "yes" >/dev/null 2>&1; then - rm -rf conftest* - cat >> confdefs.h <<\EOF -#define UNIXPC 1 +#define MGR 1 EOF + TERMLIBS="$TERMLIBS -lmgr -lpixrect" else - rm -rf conftest* - enable_unixpc=no + echo "$ac_t""no" 1>&6 + enable_mgr=no fi -rm -f conftest* fi -if test "$enable_system_time" = yes; then +if test "$enable_rgip" = yes; then cat >> confdefs.h <<\EOF -#define USE_SYSTEM_TIME 1 +#define RGIP 1 EOF fi @@ -4463,7 +4846,6 @@ - eval gp_datadir=$datadir test $gp_datadir = NONE/share && gp_datadir=/usr/local/share echo "$ac_t"" @@ -4472,62 +4854,55 @@ Where is the help file? $gp_datadir/gnuplot.gih " 1>&6 test "$ac_cv_header_gd_h" = yes && \ - echo "$ac_t"" Enable generation of GIF files." 1>&6 + echo "$ac_t"" Enable generation of GIF files" 1>&6 test "$ac_cv_header_zlib_h" = yes && \ - echo "$ac_t"" Enable generation of PNG files." 1>&6 + echo "$ac_t"" Enable generation of PNG files" 1>&6 test "$with_cwdrc" = yes && \ - echo "$ac_t"" Check current directory for .gnuplot file." 1>&6 + echo "$ac_t"" Check current directory for .gnuplot file" 1>&6 -if test "$with_gnu_readline" != no; then - echo "$ac_t"" Use GNU readline library." 1>&6 -else - test "$with_readline" != no && \ - echo "$ac_t"" Use included readline." 1>&6 +if test "$with_readline" != no; then + if test "$with_readline" != yes; then + echo "$ac_t"" Use GNU readline library" 1>&6 + test -n "$gp_tcap" && echo "$ac_t"" with ${gp_tcap}" 1>&6 + else + echo "$ac_t"" Use builtin minimal readline" 1>&6 + fi fi if test "$with_plot" = yes; then - echo "$ac_t"" Use the Unix plot library." 1>&6 + echo "$ac_t"" Use the Unix plot library" 1>&6 elif test "$with_plot" != no; then - echo "$ac_t"" Use the GNU plot library." 1>&6 + echo "$ac_t"" Use the GNU plot library," 1>&6 + if test x"$ac_cv_header_plotcompat_h" != x && \ + test "$ac_cv_header_plotcompat_h" != no ; then + echo "$ac_t"" version 2.2 or newer" 1>&6 + else + echo "$ac_t"" version 2.1 or older" 1>&6 + fi fi test "$with_lasergnu" = yes && \ - echo "$ac_t"" Install lasergnu printer script." 1>&6 - -test "$with_linux_vga" = yes && \ - echo "$ac_t"" Use the Linux console driver." 1>&6 - -test "$enable_apollo" = yes && \ - echo "$ac_t"" Enable Apollo terminal (resizeable window)." 1>&6 - -test "$enable_cgi" = yes && \ - echo "$ac_t"" Enable cgi terminal (SCO)." 1>&6 + echo "$ac_t"" Install lasergnu printer script" 1>&6 -test "$enable_gpr" = yes && \ - echo "$ac_t"" Enable Apollo terminal (fixed-size window)." 1>&6 +if test "$with_linux_vga" = yes; then + echo "$ac_t"" Use the Linux SVGA console driver" 1>&6 + echo "$ac_t"" SECURITY NOTICE: SVGAlib requires that" 1>&6 + echo "$ac_t"" gnuplot is installed suid root!" 1>&6 +fi test "$enable_iris" = yes && \ - echo "$ac_t"" Enable IRIS terminal." 1>&6 + echo "$ac_t"" Enable IRIS terminal" 1>&6 test "$enable_mgr" = yes && \ - echo "$ac_t"" Enable MGR terminal." 1>&6 + echo "$ac_t"" Enable MGR terminal" 1>&6 test "$enable_rgip" = yes && \ - echo "$ac_t"" Enable RGIP terminal." 1>&6 - -test "$enable_sun" = yes && \ - echo "$ac_t"" Enable sunview terminal." 1>&6 - -test "$enable_unixpc" = yes && \ - echo "$ac_t"" Enable unixpc terminal (ATT 3b1 or ATT 7300)." 1>&6 - -test "$enable_system_time" = yes && \ - echo "$ac_t"" Use system time routines in time.c." 1>&6 + echo "$ac_t"" Enable RGIP terminal" 1>&6 test "$no_x" != yes && \ - echo "$ac_t"" Use the X Window System. + echo "$ac_t"" Use the X Window System " 1>&6 trap '' 1 2 15 @@ -4673,6 +5048,9 @@ s%@AUTOMAKE@%$AUTOMAKE%g s%@AUTOHEADER@%$AUTOHEADER%g s%@MAKEINFO@%$MAKEINFO%g +s%@install_sh@%$install_sh%g +s%@AMTAR@%$AMTAR%g +s%@AMTARFLAGS@%$AMTARFLAGS%g s%@SET_MAKE@%$SET_MAKE%g s%@CC@%$CC%g s%@CPP@%$CPP%g @@ -4685,11 +5063,8 @@ s%@X_PRE_LIBS@%$X_PRE_LIBS%g s%@X_LIBS@%$X_LIBS%g s%@X_EXTRA_LIBS@%$X_EXTRA_LIBS%g -/@TERM_LIST@/r $TERM_LIST -s%@TERM_LIST@%%g s%@LASERGNU@%$LASERGNU%g s%@LINUXSUID@%$LINUXSUID%g -s%@NEXTOBJS@%$NEXTOBJS%g s%@TERMLIBS@%$TERMLIBS%g s%@TERMXLIBS@%$TERMXLIBS%g @@ -4905,7 +5280,7 @@ EOF cat >> $CONFIG_STATUS <<\EOF \ -test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h ; rm -f termlist +test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h exit 0 EOF chmod +x $CONFIG_STATUS diff -urN gnuplot-3.7/configure.in gnuplot-3.7.1/configure.in --- gnuplot-3.7/configure.in Tue Jan 12 19:15:48 1999 +++ gnuplot-3.7.1/configure.in Thu Nov 4 17:21:00 1999 @@ -1,40 +1,27 @@ dnl Process this file with autoconf to produce a configure script. dnl configure.in for gnuplot 3.7 on Unix. dnl -dnl Where possible, please adopt a convention that the absense of -dnl a macro is the usual case : this saves having to update -dnl countless makefiles when new tests are added. By usual case -dnl I guess ansi compiler on posix system or something like that +dnl $Id: configure.in,v 1.41.2.7 1999/10/22 18:29:24 lhecking Exp $ dnl -dnl [Lars: this is no longer necessary. I have cut this stuff out -dnl of configure.in and added the necessery definitions to syscfg.h. -dnl This reduced the size of configure by 30k! -dnl -dnl $Id: configure.in,v 1.90 1998/06/18 14:52:55 ddenholm Exp $ -dnl -AC_PREREQ(2.13) -AC_REVISION($Revision: 1.90 $) AC_INIT(graphics.c) +AC_PREREQ(2.13) +AC_REVISION($Revision: 1.41.2.7 $) VERSION=`sed -n 's/.*version.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` -AM_INIT_AUTOMAKE(gnuplot, $VERSION) +PL=`sed -n 's/.*patchlevel.*"\(.*\)".*/\1/p' $srcdir/version.c|tr -d ' '` +AM_INIT_AUTOMAKE(gnuplot, $VERSION.$PL) AC_CONFIG_HEADER(config.h:config.hin) dnl Optional features. -dnl Do not use the included readline function +dnl Use builtin readline or GNU readline AC_ARG_WITH(readline,dnl -[ --with-readline use the included minimal readline function (default) - --without-readline do not use the included readline function],, +[ --with-readline use the builtin minimal readline function (default) + --without-readline do not use the builtin readline function + --with-readline=gnu use the GNU readline library + --with-readline=PATH Specify the location of GNU readline],, test -z "$with_readline" && with_readline=yes )dnl -dnl The GNU readline library -AC_ARG_WITH(gnu-readline,dnl -[ --with-gnu-readline use the GNU readline library - --with-gnu-readline=PATH Specify the location of GNU readline],, -test -z "$with_gnu_readline" && with_gnu_readline=no -)dnl - dnl If no PATH argument given, use the Unix plot library dnl Else use either GNU libplot from plotutils, dnl or ancient GNU graphics libplot @@ -63,8 +50,8 @@ dnl Use .gnuplot file in current directory AC_ARG_WITH(cwdrc,dnl [ --with-cwdrc check current directory for .gnuplot file, - normally disabled for security reasons], -test "$withval" = no && AC_DEFINE(NOCWDRC), AC_DEFINE(NOCWDRC) + normally disabled for security reasons],, +test -z "$with_cwdrc" && with_cwdrc=no )dnl dnl Install the lasergnu printer script @@ -76,27 +63,9 @@ dnl The Linux console driver AC_ARG_WITH(linux-vga,dnl -[ --without-linux-vga do not use the Linux console driver - (requires Linux SVGAlib /usr/lib/libvga)],, -test -z "$with_linux_vga" && with_linux_vga=yes -)dnl - -dnl Apollo Graphics Primitive Resource -AC_ARG_ENABLE(apollo,dnl -[ --enable-apollo Apollo Graphics Primitive Resource],, -test -z "$enable_apollo" && enable_apollo=no -)dnl - -dnl Apollo Graphics Primitive Resource (fixed-size window) -AC_ARG_ENABLE(gpr,dnl -[ --enable-gpr Apollo Graphics Primitive Resource (fixed-size window)],, -test -z "$enable_gpr" && enable_gpr=no -)dnl - -dnl On SCO only: cgi terminal -AC_ARG_ENABLE(cgi,dnl -[ --enable-cgi enable CGI terminal (SCO only)],, -test -z "$enable_cgi" && enable_cgi=no +[ --with-linux-vga use the Linux SVGA console driver + (requires /usr/lib/libvga)],, +test -z "$with_linux_vga" && with_linux_vga=no )dnl dnl IRIS terminal on IRIS4D series computer @@ -117,24 +86,6 @@ test -z "$enable_rgip" && enable_rgip=no )dnl -dnl SUNview driver -AC_ARG_ENABLE(sun,dnl -[ --enable-sun enable sunview terminal (Sun only)],, -test -z "$enable_sun" && enable_sun=no -)dnl - -dnl ATT 3b1 or ATT 7300 unixpc -AC_ARG_ENABLE(unixpc,dnl -[ --enable-unixpc enable unixpc terminal (ATT 3b1 or ATT 7300)],, -test -z "$enable_unixpc" && enable_unixpc=no -)dnl - -dnl enable system time routines -AC_ARG_ENABLE(system-time,dnl -[ --enable-system-time use the system time routines in time.c],, -test -z "$enable_system_time" && enable_system_time=no -)dnl - dnl configure.in body dnl Compiler characteristics @@ -162,11 +113,18 @@ AC_SUBST(X_LIBRARIES) AC_SUBST(GNUPLOT_X11) AC_PATH_XTRA + +dnl Needed for LynxOS until AC_PATH_XTRA is fixed +if test "$ac_cv_lib_nsl_gethostbyname" = no; then + AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd") +fi + if test "$no_x" != yes; then CPPFLAGS="$CPPFLAGS $X_CFLAGS" X_LIBRARIES="$X_PRE_LIBS $X_LIBS -lX11 $X_EXTRA_LIBS" GNUPLOT_X11=gnuplot_x11 - AC_DEFINE(X11) + AC_DEFINE(X11, 1, + [ Define if you are using the X11 window system. ]) fi @@ -174,11 +132,17 @@ dnl FIXME AC_DEFINE(ISC22) dnl FIXME AC_DEFINE(KSR) dnl Check for MSDOS and djgpp, NeXT -gp_MSDOS -gp_NEXT +GP_MSDOS +GP_NEXT +dnl Apparently, -lNeXT_s is needed on NeXT +dnl _instead_ of -lm ... +AC_CHECK_FUNC(sin) +if test "$ac_cv_func_sin" = no ; then + AC_CHECK_LIB(m,sin) +fi dnl this has to be after -lsys_s on NeXT -LIBS="$LIBS -lm" +dnlLIBS="$LIBS -lm" dnl Header files. ANSI first @@ -207,7 +171,11 @@ #ifdef HAVE_ERRNO_H #include #endif], - errno=0,AC_MSG_RESULT(yes),AC_DEFINE(EXTERN_ERRNO) AC_MSG_RESULT(no)) + errno=0,AC_MSG_RESULT(yes),dnl + AC_DEFINE(EXTERN_ERRNO, 1, + [ Define if declares errno. ]) + AC_MSG_RESULT(no) +)dnl dnl Types. @@ -231,11 +199,12 @@ AC_CHECK_FUNCS(erf erfc gamma lgamma getcwd pclose popen sleep snprintf \ strncasecmp strnicmp sysinfo tcgetattr) if test "$ac_cv_func_pclose" = yes && test "$ac_cv_func_popen" = yes ; then - AC_DEFINE(PIPES) + AC_DEFINE(PIPES, 1, + [ Define if you do have the popen and pclose functions. ]) fi -dnl arg types for select -AC_FUNC_SELECT_ARGTYPES +dnl Argument types of select() +AC_FUNC_SELECT dnl On SVR3. dnl FIXME AC_DEFINE(CRIPPLED_SELECT) @@ -244,58 +213,54 @@ if test "$with_linux_vga" = yes; then AC_MSG_CHECKING(for linux vga library) AC_CHECK_LIB(vga, vga_init, - [AC_DEFINE(LINUXVGA) + [AC_DEFINE(LINUXVGA, 1, + [ Define if this is a Linux system with SuperVGA library. ]) LINUXSUID='chown root $(bindir)/gnuplot; chmod u+s $(bindir)/gnuplot' TERMLIBS="$TERMLIBS -lvga"],dnl with_linux_vga=no) fi dnl GNU readline and the required terminal library -if test "$with_gnu_readline" != no; then - dnl check for terminal library - dnl this is a very cool solution from octave's configure.in - gp_tcap="" - for termlib in ncurses curses termcap terminfo termlib; do - AC_CHECK_LIB(${termlib}, tputs, [gp_tcap="${gp_tcap} -l${termlib}"]) - case "${gp_tcap}" in - *-l${termlib}*) - AC_MSG_RESULT([using ${gp_tcap} with readline]) - break - ;; - esac - done - - if test "$with_gnu_readline" = yes; then - AC_CHECK_LIB(readline, readline,dnl - LIBS="$LIBS -lreadline $gp_tcap" - AC_DEFINE(GNU_READLINE) - with_readline=no,dnl - AC_MSG_ERROR([Can't find -lreadline in a standard path -- specify its location using --with-gnu-readline=/path/to/libreadline.a]),dnl - ${gp_tcap})dnl readline - else - if test ! -f $with_gnu_readline ; then - if test ! -f ${with_gnu_readline}/lib/libreadline.a ; then - if test ! -f ${with_gnu_readline}/libreadline.a ; then - AC_MSG_ERROR([GNU readline library not found]) - else - AC_MSG_RESULT([using ${with_gnu_readline}/libreadline.a]) - LIBS="$LIBS ${with_gnu_readline}/libreadline.a $gp_tcap" - fi - else - AC_MSG_RESULT([using ${with_gnu_readline}/lib/libreadline.a]) - LIBS="$LIBS ${with_gnu_readline}/lib/libreadline.a $gp_tcap" - fi +if test "$with_readline" != no; then + if test "$with_readline" != yes; then + dnl check for terminal library + dnl this is a very cool solution from octave's configure.in + gp_tcap="" + for termlib in ncurses curses termcap terminfo termlib; do + AC_CHECK_LIB(${termlib}, tputs, [gp_tcap="$gp_tcap -l$termlib"]) + case "$gp_tcap" in + *-l${termlib}*) + break + ;; + esac + done + + if test "$with_readline" = gnu; then + AC_CHECK_LIB(readline, readline,dnl + TERMLIBS="$TERMLIBS -lreadline $gp_tcap",, ${gp_tcap}) else - AC_MSG_RESULT([using ${with_gnu_readline}]) - LIBS="$LIBS $with_gnu_readline $gp_tcap" + GP_PATH_LIB(readline,readline,[$with_readline],[${gp_tcap}]) + if test "$ac_cv_lib_readline_readline" != no; then + TERMLIBS="$TERMLIBS $gp_tcap" + fi fi - AC_DEFINE(GNU_READLINE) - with_readline=no + if test "$ac_cv_lib_readline_readline" = no; then + AC_MSG_WARN([GNU readline not found - falling back to builtin readline]) + with_readline=yes + else + AC_DEFINE(HAVE_LIBREADLINE, 1, + [ Define if you are using the GNU readline library. ]) + fi # ! ac_cv_lib_readline_readline = no + + fi # ! with_readline != yes + + if test "$with_readline" = yes; then + AC_DEFINE(READLINE, 1, + [ Define if you want to use the included readline function. ]) fi -fi -test "$with_readline" = yes && AC_DEFINE(READLINE) +fi dnl end readline dnl libplot @@ -303,41 +268,59 @@ if test "$with_plot" = yes; then dnl Unix plot library AC_CHECK_LIB(plot,openpl,dnl - AC_DEFINE(UNIXPLOT) + AC_DEFINE(UNIXPLOT, 1, + [ Define if you want to use the standard Unix plot library. ]) TERMLIBS="$TERMLIBS -lplot",dnl with_plot=no) else dnl GNU plot library - test for new version first TERMXLIBS="$X_LIBS -lXaw -lXmu -lXt -lXext -lX11" - gp_SEARCH_LIBDIRS(plot,textangle,[$TERMXLIBS]) - if test "$ac_cv_lib_plot_textangle" = no; then - TERMXLIBS= - gp_SEARCH_LIBDIRS(plot,rotate) - if test "$ac_cv_lib_plot_rotate" = no; then - AC_MSG_WARN([can't find GNU libplot -- disabling gnugraph terminal]) - with_plot=no + GP_PATH_LIB(plot,pl_textangle,[$with_plot],[$TERMXLIBS]) + if test "$ac_cv_lib_plot_pl_textangle" = no; then + GP_PATH_LIB(plot,textangle,[$with_plot],[$TERMXLIBS]) + if test "$ac_cv_lib_plot_textangle" = no; then + TERMXLIBS= + GP_PATH_LIB(plot,rotate,[$with_plot]) + if test "$ac_cv_lib_plot_rotate" = no; then + AC_MSG_WARN([can't find GNU libplot -- disabling gnugraph terminal]) + with_plot=no + else + AC_MSG_RESULT([ - using obsolete GNU graphics library]) + fi # old GNU plotlib else - AC_MSG_RESULT([ - using obsolete GNU graphics library]) - AC_DEFINE(GNUGRAPH) - fi # old GNU plotlib + AC_MSG_RESULT([ - using GNU plotutils library]) + fi # GNU plotlib pre-2.2 else - AC_MSG_RESULT([ - using GNU plotutils library]) - AC_DEFINE(GNUGRAPH) - AC_DEFINE(GNU_PLOTUTILS) + GP_PATH_HEADER(plotcompat.h,[$with_plot],dnl + AC_DEFINE(HAVE_PLOTCOMPAT_H, 1, + [ Define if you have the header file. ]), + AC_MSG_WARN([found GNU plotutils 2.2+ library but not plotcompat.h]) + AC_MSG_WARN([please add path to plotcompat.h to CPPFLAGS in Makefile]) + ) # plotcompat.h fi # new GNU plotlib - fi # Unix plotlib + + if test "$with_plot" != no; then + AC_DEFINE(GNUGRAPH, 1, + [ Define if you want to use the GNU version of the Unix plot library. ]) + AC_DEFINE(GNU_PLOTUTILS, 1, + [ Define if your libplot.a is from GNU plotutils. ]) + fi + + fi # ! Unix plotlib fi -dnl end plot +dnl end libplot dnl check for Tom Boutell's gd library if test "$with_gd" != no; then - gp_SEARCH_LIBDIRS(gd,gdImageCreate) - if test "$ac_cv_lib_gd_gdImageCreate" = yes; then - gp_SEARCH_HEADERDIRS(gd.h,, - AC_MSG_WARN([found gd library but not gd.h]) - AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile]) - )dnl gp_SEARCH_HEADERDIRS - AC_DEFINE(HAVE_LIBGD) + GP_PATH_LIB(gd,gdImageCreate,[$with_gd]) + if test "$ac_cv_lib_gd_gdImageCreate" != no; then + GP_PATH_HEADER(gd.h,[$with_gd],dnl + dnl ACTION-IF-FOUND + AC_DEFINE(HAVE_LIBGD, 1, + [ Define if you have Thomas Boutell's gd library. ]),dnl + dnl ACTION-IF-NOT-FOUND + AC_MSG_WARN([found gd library but not gd.h]) + AC_MSG_WARN([please add path to gd.h to CPPFLAGS in Makefile])) else AC_MSG_RESULT([- see term/gif.trm for download details]) fi @@ -346,116 +329,95 @@ dnl check for png and z library if test "$with_png" != no; then - gp_SEARCH_LIBDIRS(png,png_info_init,[-lz]) - if test "$ac_cv_lib_png_png_info_init" = yes; then + GP_PATH_LIB(png,png_info_init,[$with_png],[-lz]) + if test "$ac_cv_lib_png_png_info_init" != no; then TERMLIBS="$TERMLIBS -lz" - gp_SEARCH_HEADERDIRS(png.h,, + GP_PATH_HEADER(png.h,[$with_png],,dnl AC_MSG_WARN([found png library but not png.h]) AC_MSG_WARN([please add path to png.h to CPPFLAGS in Makefile]) - )dnl gp_SEARCH_HEADERIRS - gp_SEARCH_HEADERDIRS(zlib.h,, + ) + GP_PATH_HEADER(zlib.h,[$with_png],,dnl AC_MSG_WARN([found z library but not zlib.h]) AC_MSG_WARN([please add path to zlib.h to CPPFLAGS in Makefile]) - )dnl gp_SEARCH_HEADERDIRS - if test "$ac_cv_header_png_h" = yes; then + ) + if test "$ac_cv_header_png_h" != no; then AC_EGREP_CPP([You lose], [#include "png.h" #if PNG_LIBPNG_VER < 89 You lose. #endif ],dnl - AC_MSG_WARN([- libpng too old - not including png driver]),dnl - AC_DEFINE(HAVE_LIBPNG)) + AC_MSG_WARN([- libpng too old - not including png driver]) + with_png=no) else AC_MSG_WARN([- cannot check png version - compilation may fail]) - AC_DEFINE(HAVE_LIBPNG) fi + + if test "$with_png" != no; then + AC_DEFINE(HAVE_LIBPNG, 1, + [ Define if you have the png library. ]) + fi + else AC_MSG_RESULT([- see term/png.trm for download details]) fi fi dnl end png and z -dnl create list of terminals -AC_MSG_CHECKING([terminal driver sources]) -( cd $srcdir/term && for i in *.trm ; do echo '${srcdir}'/../term/$i ; done )\ - |(tr '\012' @; echo) |sed 's/@$/%/;s/@/ \\@/g' |tr @% '\012\012' >termlist -TERM_LIST=termlist -AC_SUBST_FILE(TERM_LIST) -AC_MSG_RESULT([list created]) - dnl How do we detect the Ultrix X libraries? dnl Or is it really a server (run-time) problem? dnl FIXME AC_DEFINE(ULTRIX_KLUDGE) -dnl Process enable options +dnl Removed enable options for these +dnl Just autodetect -if test "$enable_apollo" = yes; then - AC_EGREP_CPP(yes, - [#ifdef apollo - yes - #endif - ],AC_DEFINE(APOLLO),dnl - enable_apollo=no) -fi - -if test "$enable_gpr" = yes; then - AC_EGREP_CPP(yes, - [#ifdef apollo - yes - #endif - ],AC_DEFINE(APOLLO) AC_DEFINE(GPR),dnl - enable_gpr=no) -fi - -if test "$enable_cgi" = yes; then - AC_EGREP_CPP(yes, - [#ifdef SCO - yes - #endif - ],AC_CHECK_LIB(ccgi,v_opnwk,dnl - AC_DEFINE(CGI) - TERMLIBS="$TERMLIBS -lccgi"),dnl - enable_cgi=no) +dnl SCO cgi +AC_EGREP_CPP(yes, +[#ifdef SCO +yes +#endif +],AC_CHECK_LIB(ccgi, v_opnwk,dnl + AC_DEFINE(CGI, 1, + [ Define if you want to use the CGI terminal under SCO. ])dnl + TERMLIBS="$TERMLIBS -lccgi")) + +dnl Sun sunview +AC_EGREP_CPP(yes, +[#ifdef sun +yes +#endif +], AC_CHECK_LIB(suntool, window_create,dnl + AC_CHECK_HEADER(suntool/sunview.h,dnl + AC_DEFINE(SUN, 1, + [ Define if you want to use the sunview terminal (sun). ])dnl + TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect"),,dnl + [-lsunwindow -lpixrect])) + +dnl Process with and enable options + +if test "$with_cdwrc" = no; then + AC_DEFINE(NOCWDRC, 1, + [ Define if you do not want to read .gnuplot in the current directory. ]) fi if test "$enable_iris" = yes; then AC_CHECK_LIB(gl_s,winopen,dnl - AC_DEFINE(IRIS) + AC_DEFINE(IRIS, 1, + [ Define if you want to use the IRIS terminal on IRIS4D series computers. ]) TERMLIBS="$TERMLIBS -lgl_s",dnl enable_iris=no) fi if test "$enable_mgr" = yes; then AC_CHECK_LIB(mgr,m_getinfo,dnl - AC_DEFINE(MGR)dnl + AC_DEFINE(MGR, 1, + [ Define if you want to use the MGR Window system. ]) TERMLIBS="$TERMLIBS -lmgr -lpixrect",dnl enable_mgr=no,[-lpixrect]) fi if test "$enable_rgip" = yes; then - AC_DEFINE(RGIP) -fi - -if test "$enable_sun" = yes; then - AC_CHECK_LIB(suntool,window_create,dnl - AC_DEFINE(SUN)dnl - TERMLIBS="$TERMLIBS -lsuntool -lsunwindow -lpixrect",dnl - enable_sun=no,[-lsunwindow -lpixrect]) -fi - -if test "$enable_unixpc" = yes; then - AC_EGREP_CPP(yes, - [/* Not sure about this; definitely - * true for gcc */ - #ifdef unixpc - yes - #endif - ],AC_DEFINE(UNIXPC),dnl - enable_unixpc=no) -fi - -if test "$enable_system_time" = yes; then - AC_DEFINE(USE_SYSTEM_TIME) + AC_DEFINE(RGIP, 1, + [ Define if you want to use the Redwood Graphics Interface Protocol. ]) fi dnl Substitute variables @@ -463,7 +425,6 @@ AC_SUBST(VERSION) AC_SUBST(LASERGNU) AC_SUBST(LINUXSUID) -AC_SUBST(NEXTOBJS) AC_SUBST(TERMLIBS) AC_SUBST(TERMXLIBS) @@ -477,67 +438,60 @@ Where is the help file? $gp_datadir/gnuplot.gih ]) test "$ac_cv_header_gd_h" = yes && \ - AC_MSG_RESULT([ Enable generation of GIF files.]) + AC_MSG_RESULT([ Enable generation of GIF files]) test "$ac_cv_header_zlib_h" = yes && \ - AC_MSG_RESULT([ Enable generation of PNG files.]) + AC_MSG_RESULT([ Enable generation of PNG files]) test "$with_cwdrc" = yes && \ - AC_MSG_RESULT([ Check current directory for .gnuplot file.]) + AC_MSG_RESULT([ Check current directory for .gnuplot file]) -if test "$with_gnu_readline" != no; then - AC_MSG_RESULT([ Use GNU readline library.]) -else - test "$with_readline" != no && \ - AC_MSG_RESULT([ Use included readline.]) +if test "$with_readline" != no; then + if test "$with_readline" != yes; then + AC_MSG_RESULT([ Use GNU readline library]) + test -n "$gp_tcap" && AC_MSG_RESULT([ with ${gp_tcap}]) + else + AC_MSG_RESULT([ Use builtin minimal readline]) + fi fi if test "$with_plot" = yes; then - AC_MSG_RESULT([ Use the Unix plot library.]) + AC_MSG_RESULT([ Use the Unix plot library]) elif test "$with_plot" != no; then - AC_MSG_RESULT([ Use the GNU plot library.]) + AC_MSG_RESULT([ Use the GNU plot library,]) + if test x"$ac_cv_header_plotcompat_h" != x && \ + test "$ac_cv_header_plotcompat_h" != no ; then + AC_MSG_RESULT([ version 2.2 or newer]) + else + AC_MSG_RESULT([ version 2.1 or older]) + fi fi test "$with_lasergnu" = yes && \ - AC_MSG_RESULT([ Install lasergnu printer script.]) - -test "$with_linux_vga" = yes && \ - AC_MSG_RESULT([ Use the Linux console driver.]) - -test "$enable_apollo" = yes && \ - AC_MSG_RESULT([ Enable Apollo terminal (resizeable window).]) + AC_MSG_RESULT([ Install lasergnu printer script]) -test "$enable_cgi" = yes && \ - AC_MSG_RESULT([ Enable cgi terminal (SCO).]) - -test "$enable_gpr" = yes && \ - AC_MSG_RESULT([ Enable Apollo terminal (fixed-size window).]) +if test "$with_linux_vga" = yes; then + AC_MSG_RESULT([ Use the Linux SVGA console driver]) + AC_MSG_RESULT([ SECURITY NOTICE: SVGAlib requires that]) + AC_MSG_RESULT([ gnuplot is installed suid root!]) +fi test "$enable_iris" = yes && \ - AC_MSG_RESULT([ Enable IRIS terminal.]) + AC_MSG_RESULT([ Enable IRIS terminal]) test "$enable_mgr" = yes && \ - AC_MSG_RESULT([ Enable MGR terminal.]) + AC_MSG_RESULT([ Enable MGR terminal]) test "$enable_rgip" = yes && \ - AC_MSG_RESULT([ Enable RGIP terminal.]) - -test "$enable_sun" = yes && \ - AC_MSG_RESULT([ Enable sunview terminal.]) - -test "$enable_unixpc" = yes && \ - AC_MSG_RESULT([ Enable unixpc terminal (ATT 3b1 or ATT 7300).]) - -test "$enable_system_time" = yes && \ - AC_MSG_RESULT([ Use system time routines in time.c.]) + AC_MSG_RESULT([ Enable RGIP terminal]) test "$no_x" != yes && \ - AC_MSG_RESULT([ Use the X Window System. + AC_MSG_RESULT([ Use the X Window System ]) dnl end config report dnl Write Makefiles and configuration header AC_OUTPUT([Makefile docs/Makefile docs/latextut/Makefile], \ -[test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h ; rm -f termlist]) +[test -z "$CONFIG_HEADERS" || echo timestamp >stamp-h]) dnl end configure.in diff -urN gnuplot-3.7/contour.c gnuplot-3.7.1/contour.c --- gnuplot-3.7/contour.c Thu Dec 3 22:23:46 1998 +++ gnuplot-3.7.1/contour.c Thu Dec 3 22:23:46 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: contour.c,v 1.31 1998/04/14 00:15:15 drd Exp $"; +static char *RCSid = "$Id: contour.c,v 1.9 1998/12/03 22:23:46 lhecking Exp $"; #endif /* GNUPLOT - contour.c */ diff -urN gnuplot-3.7/corplot.c gnuplot-3.7.1/corplot.c --- gnuplot-3.7/corplot.c Wed Oct 28 21:08:12 1998 +++ gnuplot-3.7.1/corplot.c Wed Oct 28 21:08:12 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: corplot.c,v 1.8 1998/03/22 22:31:27 drd Exp $"; +static char *RCSid = "$Id: corplot.c,v 1.2 1998/10/28 21:08:12 lhecking Exp $"; #endif /* GNUPLOT - corplot.c */ diff -urN gnuplot-3.7/ctrl87.c gnuplot-3.7.1/ctrl87.c --- gnuplot-3.7/ctrl87.c Wed Apr 15 20:22:16 1998 +++ gnuplot-3.7.1/ctrl87.c Wed Apr 15 20:22:16 1998 @@ -1,4 +1,4 @@ -/* $Id: ctrl87.c,v 1.2 1998/03/22 22:31:27 drd Exp $ */ +/* $Id: ctrl87.c,v 1.1.1.2 1998/04/15 19:22:16 lhecking Exp $ */ /* GNUPLOT - ctrl87.c */ diff -urN gnuplot-3.7/ctrl87.h gnuplot-3.7.1/ctrl87.h --- gnuplot-3.7/ctrl87.h Wed Apr 15 20:22:17 1998 +++ gnuplot-3.7.1/ctrl87.h Wed Apr 15 20:22:17 1998 @@ -1,4 +1,4 @@ -/* $Id: ctrl87.h,v 1.2 1998/03/22 22:31:27 drd Exp $ */ +/* $Id: ctrl87.h,v 1.1.1.2 1998/04/15 19:22:17 lhecking Exp $ */ /* GNUPLOT - ctrl87.h */ diff -urN gnuplot-3.7/datafile.c gnuplot-3.7.1/datafile.c --- gnuplot-3.7/datafile.c Tue Nov 3 12:46:21 1998 +++ gnuplot-3.7.1/datafile.c Thu Aug 19 15:41:09 1999 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: datafile.c,v 1.42 1998/04/14 00:15:17 drd Exp $"; +static char *RCSid = "$Id: datafile.c,v 1.11.2.1 1999/08/19 14:41:09 lhecking Exp $"; #endif /* GNUPLOT - datafile.c */ @@ -348,12 +348,15 @@ #endif /* NO_FORTRAN_NUMS */ } else { /* skip any space at start of column */ - while (isspace((int)*s)) + /* HBB tells me that the cast must be to + * unsigned char instead of int. */ + while (isspace((unsigned char) *s)) ++s; count = *s ? 1 : 0; /* skip chars to end of column */ - for (used = 0; !isspace((int)*s) && (*s != NUL); ++used, ++s) - ; + used = 0; + while (!isspace((unsigned char) *s) && (*s != NUL)) + ++s; } /* it might be a fortran double or quad precision. @@ -467,7 +470,8 @@ */ { - static char filename[MAX_LINE_LEN + 1] = ""; + /* now allocated dynamically */ + static char *filename = NULL; int i; int name_token; @@ -516,14 +520,12 @@ assert(max_using <= NCOL); /* empty name means re-use last one */ - - { - char name[MAX_LINE_LEN + 1]; - quote_str(name, c_token, MAX_LINE_LEN); - if (name[0]) - strcpy(filename, name); - else if (!filename[0]) - int_error("No previous filename", c_token); + if (isstring(c_token) && token_len(c_token) == 2) { + if (!filename || !*filename) + int_error("No previous filename",c_token); + } else { + filename = gp_realloc(filename, token_len(c_token), "datafile name"); + quote_str(filename, c_token, token_len(c_token)); } name_token = c_token++; diff -urN gnuplot-3.7/demo/1.dat gnuplot-3.7.1/demo/1.dat --- gnuplot-3.7/demo/1.dat Wed Apr 15 20:16:40 1998 +++ gnuplot-3.7.1/demo/1.dat Wed Apr 15 20:16:40 1998 @@ -1,5 +1,5 @@ # -# $Id: 1.dat,v 1.4 1993/09/27 17:10:59 alex Exp $ +# $Id: 1.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -3.041676 diff -urN gnuplot-3.7/demo/2.dat gnuplot-3.7.1/demo/2.dat --- gnuplot-3.7/demo/2.dat Wed Apr 15 20:16:40 1998 +++ gnuplot-3.7.1/demo/2.dat Wed Apr 15 20:16:40 1998 @@ -1,5 +1,5 @@ # -# $Id: 2.dat,v 1.4 1993/09/27 17:11:02 alex Exp $ +# $Id: 2.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -6.083352 diff -urN gnuplot-3.7/demo/3.dat gnuplot-3.7.1/demo/3.dat --- gnuplot-3.7/demo/3.dat Wed Apr 15 20:16:40 1998 +++ gnuplot-3.7.1/demo/3.dat Wed Apr 15 20:16:40 1998 @@ -1,5 +1,5 @@ # -# $Id: 3.dat,v 1.4 1993/09/27 17:11:04 alex Exp $ +# $Id: 3.dat,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # -20.000000 -9.125028 diff -urN gnuplot-3.7/demo/airfoil.dem gnuplot-3.7.1/demo/airfoil.dem --- gnuplot-3.7/demo/airfoil.dem Wed Apr 15 20:16:40 1998 +++ gnuplot-3.7.1/demo/airfoil.dem Mon Oct 11 14:17:35 1999 @@ -1,5 +1,5 @@ # -# $Id: airfoil.dem,v 1.3 1993/10/07 16:53:28 alex Exp $ +# $Id: airfoil.dem,v 1.1.1.1.2.1 1999/10/11 13:17:35 lhecking Exp $ # # This demo shows how to use bezier splines to define NACA four # series airfoils and complex variables to define Joukowski @@ -142,7 +142,7 @@ pause -1 "Press Return" set title "" set xlab "" -set key +set key box set parametric set samples 100 set isosamples 10 @@ -165,6 +165,4 @@ set xlabel "eps = 0.06 + i0.06" plot real(eta(t)),imag(eta(t)) pause -1 "Press Return" -set title "" -set xlabel "" -set notime +reset diff -urN gnuplot-3.7/demo/all.dem gnuplot-3.7.1/demo/all.dem --- gnuplot-3.7/demo/all.dem Wed Apr 15 20:16:40 1998 +++ gnuplot-3.7.1/demo/all.dem Wed Apr 15 20:16:40 1998 @@ -1,5 +1,5 @@ # -# $Id: all.dem,v 1.8 1996/12/09 15:58:08 drd Exp $ +# $Id: all.dem,v 1.1.1.1 1998/04/15 19:16:40 lhecking Exp $ # # Executes ALL demos in this directory, in functionality order. # diff -urN gnuplot-3.7/demo/animate.dem gnuplot-3.7.1/demo/animate.dem --- gnuplot-3.7/demo/animate.dem Wed Apr 22 14:38:39 1998 +++ gnuplot-3.7.1/demo/animate.dem Mon Oct 11 14:25:39 1999 @@ -20,3 +20,4 @@ iteration_count=0 load "gnuplot.rot" +reset diff -urN gnuplot-3.7/demo/battery.dat gnuplot-3.7.1/demo/battery.dat --- gnuplot-3.7/demo/battery.dat Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/battery.dat Wed Apr 15 20:16:41 1998 @@ -1,5 +1,5 @@ # -# $Id: battery.dat,v 1.1 1993/10/07 10:22:22 alex Exp $ +# $Id: battery.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # 50.000000 0.036990 2.500000 0.007039 47.000000 0.036990 2.500000 0.007039 diff -urN gnuplot-3.7/demo/big_peak.dat gnuplot-3.7.1/demo/big_peak.dat --- gnuplot-3.7/demo/big_peak.dat Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/big_peak.dat Wed Apr 15 20:16:41 1998 @@ -1,5 +1,5 @@ # -# $Id: big_peak.dat,v 1.1 1993/10/07 10:22:25 alex Exp $ +# $Id: big_peak.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # 26.500000 0.753252 0.012953 27.000000 0.877710 0.019712 diff -urN gnuplot-3.7/demo/binary.dem gnuplot-3.7.1/demo/binary.dem --- gnuplot-3.7/demo/binary.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/binary.dem Mon Oct 11 14:25:24 1999 @@ -1,10 +1,11 @@ # -# $Id: binary.dem,v 1.4 1996/09/22 21:10:06 drd Exp $ +# $Id: binary.dem,v 1.1.1.1.2.1 1999/10/11 13:25:24 lhecking Exp $ # set data style lines set hidden3d set title "Hidden line removal of explicit binary surfaces" set ticslevel 0 +set key box set xrange [-3:3] set yrange [-2:2] diff -urN gnuplot-3.7/demo/bivariat.dem gnuplot-3.7.1/demo/bivariat.dem --- gnuplot-3.7/demo/bivariat.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/bivariat.dem Wed Apr 15 20:16:41 1998 @@ -1,5 +1,5 @@ # -# $Id: bivariat.dem,v 1.2 1993/09/27 17:11:14 alex Exp $ +# $Id: bivariat.dem,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # # This demo is very slow and requires unusually large stack size. # Do not attempt to run this demo under MSDOS. diff -urN gnuplot-3.7/demo/contours.dem gnuplot-3.7.1/demo/contours.dem --- gnuplot-3.7/demo/contours.dem Wed Dec 9 15:26:49 1998 +++ gnuplot-3.7.1/demo/contours.dem Thu Aug 19 15:33:04 1999 @@ -1,5 +1,5 @@ # -# $Id: contours.dem,v 1.2 1993/09/27 17:11:16 alex Exp $ +# $Id: contours.dem,v 1.2.2.1 1999/08/19 14:33:04 lhecking Exp $ # set samples 20 set isosamples 21 @@ -137,7 +137,8 @@ set logscale z set hidden3d set isosamples 60 -set view 20,340,1,2 +set ticslevel 0. +set view 20,340 #HBB: ,1,2 set xlabel "x" set ylabel "y" splot [-1.5:1.5] [-0.5:1.5] (1-x)**2 + 100*(y - x**2)**2 diff -urN gnuplot-3.7/demo/controls.dem gnuplot-3.7.1/demo/controls.dem --- gnuplot-3.7/demo/controls.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/controls.dem Mon Oct 11 14:25:20 1999 @@ -1,5 +1,5 @@ # -# $Id: controls.dem,v 1.2 1993/09/27 17:11:18 alex Exp $ +# $Id: controls.dem,v 1.1.1.1.2.1 1999/10/11 13:25:20 lhecking Exp $ # # warning: this demo is SLOW on PCs without math coprocessors! # @@ -17,15 +17,11 @@ set xrange [0:13] set samples 50 set dummy t +set key box # # plot c(t) for several different damping factors s # plot s=.1,c(t),s=.3,c(t),s=.5,c(t),s=.7,c(t),s=.9,c(t),s=1.0,c(t),s=1.5,c(t),s=2.0,c(t) pause -1 "Hit return to continue" - -# undo what we have done -set xrange [-10:10] -set autoscale xy -set samples 160 -set dummy x +reset diff -urN gnuplot-3.7/demo/discrete.dem gnuplot-3.7.1/demo/discrete.dem --- gnuplot-3.7/demo/discrete.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/discrete.dem Wed Apr 15 20:16:41 1998 @@ -1,5 +1,5 @@ # -# $Id: discrete.dem,v 1.3 1994/03/30 01:28:36 alex Exp $ +# $Id: discrete.dem,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # # set contour diff -urN gnuplot-3.7/demo/electron.dem gnuplot-3.7.1/demo/electron.dem --- gnuplot-3.7/demo/electron.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/electron.dem Mon Oct 11 14:25:14 1999 @@ -1,5 +1,5 @@ # -# $Id: electron.dem,v 1.4 1996/08/13 21:48:22 drd Exp $ +# $Id: electron.dem,v 1.1.1.1.2.1 1999/10/11 13:25:14 lhecking Exp $ # # Electronics demo # @@ -21,6 +21,7 @@ set xrange [0 : 0.75] set ylabel "Ic (collector current)" set yrange [0 : 0.005] +set key box set key .2,.0045 set format y "%.4f" plot Ic(Vbe) diff -urN gnuplot-3.7/demo/fit.dem gnuplot-3.7.1/demo/fit.dem --- gnuplot-3.7/demo/fit.dem Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/fit.dem Mon Oct 11 14:25:07 1999 @@ -1,5 +1,5 @@ # -# $Id: fit.dem,v 1.9 1997/05/27 01:29:34 drd Exp $ +# $Id: fit.dem,v 1.1.1.1.2.1 1999/10/11 13:25:07 lhecking Exp $ # print "Some examples how data fitting using nonlinear least squares fit" @@ -11,6 +11,7 @@ plot 'lcdemo.dat' set xlabel "Temperature T [deg Cels.]" set ylabel "Density [g/cm3]" +set key below print "now fitting a straight line to the data :-)" print "only as a demo without physical meaning" @@ -213,3 +214,4 @@ print "from time to time!" print "" pause -1 "Done with fitting demo (-> return)" +reset diff -urN gnuplot-3.7/demo/glass.dat gnuplot-3.7.1/demo/glass.dat --- gnuplot-3.7/demo/glass.dat Wed Apr 15 20:16:41 1998 +++ gnuplot-3.7.1/demo/glass.dat Wed Apr 15 20:16:41 1998 @@ -1,5 +1,5 @@ # -# $Id: glass.dat,v 1.4 1993/09/27 17:11:27 alex Exp $ +# $Id: glass.dat,v 1.1.1.1 1998/04/15 19:16:41 lhecking Exp $ # # 16x16 grid Glass shape. Created Using DRAWFN3D, Gershon Elber 1990. # diff -urN gnuplot-3.7/demo/hidden.dem gnuplot-3.7.1/demo/hidden.dem --- gnuplot-3.7/demo/hidden.dem Wed Dec 2 18:35:37 1998 +++ gnuplot-3.7.1/demo/hidden.dem Mon Oct 11 14:25:02 1999 @@ -1,5 +1,5 @@ # -# $Id: hidden.dem,v 1.3 1995/03/27 18:07:39 drd Exp $ +# $Id: hidden.dem,v 1.2.2.1 1999/10/11 13:25:02 lhecking Exp $ # # set samples 20 @@ -51,7 +51,7 @@ splot "glass.dat" using 1 pause -1 "Hit return to continue (6)" -set view 50, +set view 50 set grid replot pause -1 "Hit return to continue (7)" diff -urN gnuplot-3.7/demo/mgr.dem gnuplot-3.7.1/demo/mgr.dem --- gnuplot-3.7/demo/mgr.dem Mon Dec 7 22:08:02 1998 +++ gnuplot-3.7.1/demo/mgr.dem Mon Oct 11 14:24:57 1999 @@ -1,10 +1,11 @@ # -# $Id: mgr.dem,v 1.4 1997/01/05 22:03:11 drd Exp $ +# $Id: mgr.dem,v 1.2.2.1 1999/10/11 13:24:57 lhecking Exp $ # pause 0 "Watch some cubic splines" set samples 50 set xlabel "Angle (deg)" set ylabel "Amplitude" +set key box set title "Brag-Reflex -- Peak only" plot "big_peak.dat" title "Rate" with errorbars, \ "" smooth csplines t "Rate" @@ -71,9 +72,5 @@ plot [0:50] "battery.dat" u 1:2:3 t "Power" w xerr, n(x) t "Theory" w lines pause -1 "Y-Bars only " plot [0:50] "battery.dat" u 1:2:4 t "Power" w yerr, n(x) t "Theory" w lines -set bars large - -set xlabel "" -set ylabel "" -set title "" +reset diff -urN gnuplot-3.7/demo/param.dem gnuplot-3.7.1/demo/param.dem --- gnuplot-3.7/demo/param.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/param.dem Mon Oct 11 14:24:52 1999 @@ -1,5 +1,5 @@ # -# $Id: param.dem,v 1.2 1993/09/27 17:11:33 alex Exp $ +# $Id: param.dem,v 1.1.1.1.2.1 1999/10/11 13:24:52 lhecking Exp $ # # Show some of the new parametric capabilities. # @@ -8,6 +8,8 @@ set autoscale set samples 160 set title "" +set key box +set key below plot t,sin(t)/t title "t,sin(t)/t or sin(x)/x" pause -1 "Hit return to continue" diff -urN gnuplot-3.7/demo/polar.dem gnuplot-3.7.1/demo/polar.dem --- gnuplot-3.7/demo/polar.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/polar.dem Mon Oct 11 14:24:50 1999 @@ -1,5 +1,5 @@ # -# $Id: polar.dem,v 1.4 1995/03/27 18:07:43 drd Exp $ +# $Id: polar.dem,v 1.1.1.1.2.1 1999/10/11 13:24:50 lhecking Exp $ # # Show some of the new polar capabilities. # @@ -15,6 +15,7 @@ plot .5,1,1.5 pause -1 "Hit return to continue" set title "" +set key box plot cos(2*t) pause -1 "Hit return to continue" diff -urN gnuplot-3.7/demo/poldat.dem gnuplot-3.7.1/demo/poldat.dem --- gnuplot-3.7/demo/poldat.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/poldat.dem Wed Apr 15 20:16:42 1998 @@ -1,5 +1,5 @@ # -# $Id: poldat.dem,v 1.3 1995/04/19 13:16:50 drd Exp $ +# $Id: poldat.dem,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $ # # set size square @@ -148,7 +148,7 @@ 180.000 0.000 -200.000 0.000 -200.000 0.000 e # -# formerly $Id: poldat.dem,v 1.3 1995/04/19 13:16:50 drd Exp $ +# formerly $Id: poldat.dem,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $ # # 0.000 90.007E-01 -35.926E+00 -71.297E+00 90.783E-01 diff -urN gnuplot-3.7/demo/prob.dem gnuplot-3.7.1/demo/prob.dem --- gnuplot-3.7/demo/prob.dem Wed Dec 2 18:35:48 1998 +++ gnuplot-3.7.1/demo/prob.dem Mon Oct 11 14:24:41 1999 @@ -1,5 +1,5 @@ # -# $Id: prob.dem,v 1.4 1996/12/09 15:58:09 drd Exp $ +# $Id: prob.dem,v 1.2.2.1 1999/10/11 13:24:41 lhecking Exp $ # # Demo Statistical Functions version 2.3 # @@ -51,7 +51,7 @@ #xmax = 1.0 #Mode of beta PDF used #ymax = (p < 1.0 || q < 1.0) ? 2.0 : 1.1 * beta((p - 1.0)/(p + q - 2.0)) -set key +set key right box set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -68,6 +68,7 @@ p = 0.5, q = 2.5, beta(x) title "p = 0.5, q = 2.5" pause -1 "Hit return to continue" set title "incomplete beta CDF" +set key left box plot [0:1] [0:1.1] p = 0.5, q = 0.7, cbeta(x) title "p = 0.5, q = 0.7", \ p = 5.0, q = 3.0, cbeta(x) title "p = 5.0, q = 3.0", \ p = 0.5, q = 2.5, cbeta(x) title "p = 0.5, q = 2.5" @@ -109,7 +110,7 @@ #xmin = a - 4.0 * b #xmax = a + 4.0 * b #ymax = 1.1 * cauchy(a) #Mode of cauchy PDF used -set key +set key left box set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -137,7 +138,7 @@ #xmin = xmin < 0 ? 0 : xmin #xmax = mu + 4.0 * sigma #ymax = 1.1 * (df1 > 2.0 ? chi(df1 - 2.0) : 1.0) #Mode of chi PDF used -set key +set key right box set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -149,10 +150,12 @@ set format y "%.2f" set sample 100 set title "chi-square PDF" +set key right box plot [0:15] [0:0.2] df1 = 4, chi(x) title "df = 4", \ df1 = 6, chi(x) title "df = 6", \ df1 = 8, chi(x) title "df = 8" pause -1 "Hit return to continue" +set key left box set title "chi-square CDF" plot [0:15] [0:1.1] df1 = 4, cchi(x) title "df = 4", \ df1 = 6, cchi(x) title "df = 6", \ @@ -167,7 +170,6 @@ #xmin = xmin < 0 ? 0 : xmin #xmax = mu + 4.0 * sigma #ymax = n < 2.0 ? 1.0 : 1.1 * erlang((n - 1.0) / lambda) #Mode of erlang PDF used -set key set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -179,10 +181,12 @@ set format y "%.1f" set sample 100 set title "erlang PDF" +set key right box plot [0:10] [0:1] lambda = 1, n = 2, erlang(x) title "lambda = 1, n = 2", \ lambda = 2, n = 2, erlang(x) title "lambda = 2, n = 2" pause -1 "Hit return to continue" set title "erlang CDF" +set key left box plot [0:10] [0:1.1] lambda = 1, n = 2, cerlang(x) title "lambda = 1, n = 2", \ lambda = 2, n = 2, cerlang(x) title "lambda = 2, n = 2" pause -1 "Hit return to continue" @@ -195,7 +199,6 @@ #xmin = mu - 4.0 * sigma #xmax = mu + 4.0 * sigma #ymax = 1.1 * extreme(u) #Mode of extreme PDF used -set key set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -207,10 +210,12 @@ set format y "%.2f" set sample 100 set title "extreme PDF" +set key left box plot [-10:10] [0:0.4] alpha = 0.5, u = 1.0, extreme(x) title "alpha = 0.5, u = 1.0", \ alpha = 1.0, u = 0.0, extreme(x) title "alpha = 1.0, u = 0.0" pause -1 "Hit return to continue" set title "extreme CDF" +set key left box plot [-10:10] [0:1.1] alpha = 0.5, u = 1.0, cextreme(x) title "alpha = 0.5, u = 1.0", \ alpha = 1.0, u = 0.0, cextreme(x) title "alpha = 1.0, u = 0.0" pause -1 "Hit return to continue" @@ -224,7 +229,6 @@ #xmax = mu + 4.0 * sigma #Mode of F PDF used #ymax = df1 < 3.0 ? 1.0 : 1.1 * f((df1 / 2.0 - 1.0) / (df1 / 2.0 + df1 / df2)) -set key set zeroaxis #set xrange [xmin : xmax] #set yrange [0 : ymax] @@ -236,10 +240,12 @@ set format y "%.2f" set sample 100 set title "F PDF" +set key right box plot [0:4] [0:0.8] df1 = 5.0, df2 = 9.0, f(x) title "df1 = 5, df2 = 9", \ df1 = 7.0, df2 = 6.0, f(x) title "df1 = 7, df2 = 6" pause -1 "Hit return to continue" set title "F CDF" +set key left box plot [0:4] [0:1.1] df1 = 5.0, df2 = 9.0, cf(x) title "df1 = 5, df2 = 9", \ df1 = 7.0, df2 = 6.0, cf(x) title "df1 = 7, df2 = 6" pause -1 "Hit return to continue" @@ -252,7 +258,6 @@ #xmin = xmin < 0 ? 0 : xmin #xmax = mu + 4.0 * sigma #ymax = rho < 1.0 ? 2.0 : 1.1 * g((rho - 1.0) / lambda) #Mode of gamma pdf used -set key set zeroaxis #set xrange [xmin: xmax] #set yrange [0: ymax] @@ -264,11 +269,13 @@ set format y "%.1f" set sample 100 set title "gamma PDF" +set key right plot [0:5] [0:1.5] rho = 0.5, lambda = 1.0, g(x) title "rho = 0.5, lambda = 1.0", \ rho = 1.0, lambda = 1.0, g(x) title "rho = 1.0, lambda = 1.0", \ rho = 2.0, lambda = 2.0, g(x) title "rho = 2.0, lambda = 2.0" pause -1 "Hit return to continue" set title "incomplete gamma CDF (lambda == 1.0)" +set key right bottom plot [0:5] [0:1.1] rho = 0.5, cgamma(x) title "rho = 0.5", \ rho = 1.0, cgamma(x) title "rho = 1.0", \ rho = 2.0, cgamma(x) title "rho = 2.0" @@ -450,7 +457,6 @@ #xmin = xmin < 0 ? 0 : xmin #xmax = mu + 4.0 * sigma #ymax = 1.1 * maxwell(1.0 / a) #Mode of maxwell PDF used -set key set zeroaxis #set xrange[xmin: xmax] #set yrange[0: ymax] @@ -462,11 +468,13 @@ set format y "%.1f" set sample 100 set title "maxwell PDF" +set key right top box plot [0:6] [0:1.4] a = 1.5, maxwell(x) title "a = 1.5", \ a = 1.0, maxwell(x) title "a = 1.0", \ a = 0.5, maxwell(x) title "a = 0.5" pause -1 "Hit return to continue" set title "maxwell CDF" +set key right bottom box plot [0:6] [0:1.1] a = 1.5, cmaxwell(x) title "a = 1.5", \ a = 1.0, cmaxwell(x) title "a = 1.0", \ a = 0.5, cmaxwell(x) title "a = 0.5" @@ -532,7 +540,6 @@ #xmin = mu - 4.0 * sigma #xmax = mu + 4.0 * sigma #ymax = 1.1 * normal(mu) #Mode of normal PDF used -set key set zeroaxis #set xrange [xmin: xmax] #set yrange [0: ymax] @@ -544,11 +551,13 @@ set format y "%.1f" set sample 100 set title "normal (also called gauss or bell-curved) PDF" +set key left top box plot [-4:4] [0:1] mu = 0, sigma = 1.0, normal(x) title "mu = 0, sigma = 1.0", \ mu = 2, sigma = 0.5, normal(x) title "mu = 2, sigma = 0.5", \ mu = 1, sigma = 2.0, normal(x) title "mu = 1, sigma = 2.0" pause -1 "Hit return to continue" set title "normal (also called gauss or bell-curved) CDF" +set key left top box plot [-4:4] [0:1.1] mu = 0, sigma = 1.0, cnormal(x) title "mu = 0, sigma = 1.0", \ mu = 2, sigma = 0.5, cnormal(x) title "mu = 2, sigma = 0.5", \ mu = 1, sigma = 2.0, cnormal(x) title "mu = 1, sigma = 2.0" @@ -642,7 +651,6 @@ #xmin = 0.0 #xmax = a #ymax = 1.1 * 2.0 / a #Mode of sine PDF used -set key set zeroaxis #set xrange [xmin: xmax] #set yrange [0: ymax] @@ -654,10 +662,12 @@ set format y "%.1f" set sample 100 set title "sine PDF" +set key bottom outside plot [0:2] [0:1.1] a = 2.0, n = 1, sine(x) title "a = 2.0, n = 1", \ a = 2.0, n = 3, sine(x) title "a = 2.0, n = 3" pause -1 "Hit return to continue" set title "sine CDF" +set key top left plot [0:2] [0:1.1] a = 2.0, n = 1, csine(x) title "a = 2.0, n = 1", \ a = 2.0, n = 3, csine(x) title "a = 2.0, n = 3" pause -1 "Hit return to continue" @@ -773,3 +783,4 @@ lambda = 1, n = 1.0, cweibull(x) title "lambda = 1, n = 1.0", \ lambda = 1, n = 2.0, cweibull(x) title "lambda = 1, n = 2.0", \ lambda = 3, n = 2.0, cweibull(x) title "lambda = 3, n = 2.0" +reset diff -urN gnuplot-3.7/demo/prob2.dem gnuplot-3.7.1/demo/prob2.dem --- gnuplot-3.7/demo/prob2.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/prob2.dem Mon Oct 11 14:24:36 1999 @@ -1,5 +1,5 @@ # -# $Id: prob2.dem,v 1.3 1994/03/30 01:28:45 alex Exp $ +# $Id: prob2.dem,v 1.1.1.1.2.1 1999/10/11 13:24:36 lhecking Exp $ # # Demo Statistical Approximations version 1.1 # @@ -45,7 +45,7 @@ ymax = 1.1 * binom(mu) #mode of binomial PDF used xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -77,7 +77,7 @@ ymax = 1.1 * binom(mu) #mode of binomial PDF used xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -111,7 +111,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * p -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -143,7 +143,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * p -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -176,7 +176,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * hypgeo(mu) #mode of binom PDF used -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -209,7 +209,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * hypgeo(mu) #mode of binom PDF used -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -243,7 +243,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * g((rho - 1) / lambda) #mode of gamma PDF used -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -275,7 +275,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * negbin(mu - 1/p) #mode of gamma PDF used -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -304,7 +304,7 @@ xmin = mu - 4.0 * sigma xmax = mu + 4.0 * sigma ymax = 1.1 * logistic(mu) #mode of logistic PDF used -set key +set key box set nozeroaxis set xrange [xmin: xmax] set yrange [0 : ymax] @@ -335,7 +335,7 @@ xinc = ceil((xmax - xmin) / 10) xinc = xinc > 1 ? xinc : 1 ymax = 1.1 * poisson(mu) #mode of poisson PDF used -set key +set key box set nozeroaxis set xrange [xmin - 1 : xmax + 1] set yrange [0 : ymax] @@ -353,5 +353,5 @@ set label "mu" at mu + 1, ymax / 10 set label "sigma" at mu + 1 + sigma, normal(mu + sigma) plot poisson(x), normal(x - 0.5) -set noarrow -set nolabel +reset + diff -urN gnuplot-3.7/demo/random.dem gnuplot-3.7.1/demo/random.dem --- gnuplot-3.7/demo/random.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/random.dem Wed Apr 15 20:16:42 1998 @@ -1,5 +1,5 @@ # -# $Id: random.dem,v 1.3 1994/03/30 01:28:47 alex Exp $ +# $Id: random.dem,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $ # # random.dem # diff -urN gnuplot-3.7/demo/scatter.dem gnuplot-3.7.1/demo/scatter.dem --- gnuplot-3.7/demo/scatter.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/scatter.dem Mon Oct 11 14:24:27 1999 @@ -10,6 +10,7 @@ set parametric set data style points set xlabel "data style point - no dgrid" +set key box splot "hemisphr.dat" pause -1 "Hit return to continue (1)" @@ -42,6 +43,7 @@ splot "scatter2.dat" pause -1 "Hit return to continue (6)" +set key nobox set dgrid3d ,,1 set xlabel "data style lines, dgrid3d ,,1" set data style lines @@ -53,9 +55,5 @@ set data style lines splot "scatter2.dat" pause -1 "Hit return to continue (8)" +reset -set noparametric -set nodgrid3d -set nocontour -set title "" -set xlabel "" diff -urN gnuplot-3.7/demo/silver.dat gnuplot-3.7.1/demo/silver.dat --- gnuplot-3.7/demo/silver.dat Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/silver.dat Wed Apr 15 20:16:42 1998 @@ -1,5 +1,5 @@ # -# $Id: silver.dat,v 1.1 1993/10/07 10:22:29 alex Exp $ +# $Id: silver.dat,v 1.1.1.1 1998/04/15 19:16:42 lhecking Exp $ # 10.000000 280.000000 16.733201 20.000000 191.000000 13.820275 diff -urN gnuplot-3.7/demo/simple.dem gnuplot-3.7.1/demo/simple.dem --- gnuplot-3.7/demo/simple.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/simple.dem Mon Oct 11 14:24:20 1999 @@ -1,19 +1,22 @@ # -# $Id: simple.dem,v 1.2 1993/09/27 17:11:48 alex Exp $ +# $Id: simple.dem,v 1.1.1.1.2.1 1999/10/11 13:24:20 lhecking Exp $ # # Requires data files "[123].dat" from this directory, # so change current working directory to this directory before running. # gnuplot> set term # gnuplot> load 'simple.dem' # +set key left box set samples 50 plot [-10:10] sin(x),atan(x),cos(atan(x)) pause -1 "Hit return to continue" +set key right nobox set samples 100 plot [-pi/2:pi] cos(x),-(sin(x) > sin(x+1) ? sin(x) : sin(x+1)) pause -1 "Hit return to continue" +set key left box set samples 200 plot [-3:5] asin(x),acos(x) pause -1 "Hit return to continue" @@ -25,9 +28,11 @@ plot [-10:10] real(sin(x)**besj0(x)) pause -1 "Hit return to continue" +set key outside below plot [-5*pi:5*pi] [-5:5] real(tan(x)/atan(x)), 1/x pause -1 "Hit return to continue" +set key left box set autoscale set samples 800 plot [-30:20] sin(x*20)*atan(x) @@ -38,8 +43,5 @@ f(x) = x/100 plot [-19:19] '1.dat'with impulses ,'2.dat' thru f(x) ,'3.dat' with lines pause -1 "Hit return to continue" +reset -# undo what we have done above -set samples 160 -set xrange [-10:10] -set autoscale xy diff -urN gnuplot-3.7/demo/singulr.dem gnuplot-3.7.1/demo/singulr.dem --- gnuplot-3.7/demo/singulr.dem Wed Apr 15 20:16:42 1998 +++ gnuplot-3.7.1/demo/singulr.dem Thu Aug 19 15:35:07 1999 @@ -1,4 +1,4 @@ -# $Id: singulr.dem,v 1.3 1995/12/11 23:14:19 drd Exp $ +# $Id: singulr.dem,v 1.1.1.1.2.2 1999/08/19 14:35:07 lhecking Exp $ # # Demo that plots some surfaces with singularities. # Author: Carsten Steger @@ -159,9 +159,9 @@ set xrange [-12:12] set yrange [-12:12] set zrange [*:*] -set ticslevel 0.5 set nohidden3d -set view 50,15,1,1.7 +set ticslevel 0. +set view 50,15 #HBB: ,1,1.7 set title "Klein bottle, glassblowers' version (look-through)" splot "klein.dat" pause -1 "Hit return to continue (19)" diff -urN gnuplot-3.7/demo/spline.dem gnuplot-3.7.1/demo/spline.dem --- gnuplot-3.7/demo/spline.dem Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/spline.dem Mon Oct 11 14:24:09 1999 @@ -1,5 +1,5 @@ # -# $Id: spline.dem,v 1.3 1997/04/05 19:44:48 drd Exp $ +# $Id: spline.dem,v 1.1.1.1.2.1 1999/10/11 13:24:09 lhecking Exp $ # # Some curve plotting using common cubic polynomial basis function for cagd. # @@ -7,6 +7,7 @@ # set xrang [0:1] set grid +set key box set yrange[-0.2:1.4] m0(x) = 1 @@ -90,9 +91,4 @@ plot cub_hermit_x1(t), cub_hermit_y1(t) with lines 2,\ cub_hermit_x2(t), cub_hermit_y2(t) with lines 3 pause -1 "Press return to continue" - -set noparametric -set noarrow -set auto -set nogrid -set title "" +reset diff -urN gnuplot-3.7/demo/stat.inc gnuplot-3.7.1/demo/stat.inc --- gnuplot-3.7/demo/stat.inc Wed Apr 22 14:38:51 1998 +++ gnuplot-3.7.1/demo/stat.inc Wed Apr 22 14:38:51 1998 @@ -1,5 +1,5 @@ # -# $Id: stat.inc,v 1.3 1998/04/14 00:16:54 drd Exp $ +# $Id: stat.inc,v 1.1.1.2 1998/04/22 13:38:51 lhecking Exp $ # # Library of Statistical Functions version 3.0 # diff -urN gnuplot-3.7/demo/steps.dem gnuplot-3.7.1/demo/steps.dem --- gnuplot-3.7/demo/steps.dem Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/steps.dem Mon Oct 11 14:24:04 1999 @@ -21,4 +21,5 @@ set title "Inverse Normal Distribution Function" plot [0:1] invnorm(x) -set title "" +pause -1 "Press return to continue" +reset diff -urN gnuplot-3.7/demo/surface1.dem gnuplot-3.7.1/demo/surface1.dem --- gnuplot-3.7/demo/surface1.dem Wed Dec 9 15:26:57 1998 +++ gnuplot-3.7.1/demo/surface1.dem Mon Oct 11 14:23:57 1999 @@ -1,5 +1,5 @@ # -# $Id: surface1.dem,v 1.5 1995/04/21 12:49:06 drd Exp $ +# $Id: surface1.dem,v 1.3.2.1 1999/10/11 13:23:57 lhecking Exp $ # set samples 21 set isosample 11 @@ -130,19 +130,6 @@ mand(z,a,n) = n<=0 || abs(z)>100 ? 1:mand(z*z+a,a,n-1)+1 splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),30) pause -1 "Hit return to continue (21)" +reset # TANAKA Masaki (Tokyo Institute of technology) # masaki@isea.is.titech.ac.jp - -# -# Clean up: -# -set samples 100 -set isosamples 10 -set xrange [-10:10] -set yrange [-10:10] -set zrange [-10:10] -set auto -set xlabel "" 0,0 -set ylabel "" 0,0 -set zlabel "" 0,0 -set nohidden diff -urN gnuplot-3.7/demo/surface2.dem gnuplot-3.7.1/demo/surface2.dem --- gnuplot-3.7/demo/surface2.dem Wed Dec 2 18:36:01 1998 +++ gnuplot-3.7.1/demo/surface2.dem Mon Oct 11 14:23:53 1999 @@ -1,24 +1,26 @@ # -# $Id: surface2.dem,v 1.4 1997/04/05 19:44:49 drd Exp $ +# $Id: surface2.dem,v 1.2.2.2 1999/10/11 13:23:53 lhecking Exp $ # set parametric set isosamples 50,10 set hidden +set key below set title "Parametric Sphere" set urange [-pi/2:pi/2] set vrange [0:2*pi] -set zrange [-1:1] set ztics nomirror -1.0,0.25,1.0 -set view 45,50,,2.5 +set view 45,50 splot cos(u)*cos(v),cos(u)*sin(v),sin(u) pause -1 "Hit return to continue (1)" -set view ,,,0.8 +set view ,,,0.7 +set title "Parametric Sphere, crunched z axis" replot pause -1 "Hit return to continue (2)" -set view ,,,1.6 +set view ,,,1.4 +set title "Parametric Sphere, enlarged z axis" replot pause -1 "Hit return to continue (3)" @@ -27,22 +29,22 @@ set title "Parametric Torus" set urange [0:2*pi] set vrange [0:2*pi] +set zrange [-1:1] # imitate old 'set view' hack splot (1-0.2*cos(v))*cos(u),(1-0.2*cos(v))*sin(u),0.2*sin(v) pause -1 "Hit return to continue (4)" -set view ,,,2.0 - set title "Parametric Hexagon" set urange [-1.3:1.3] set vrange [0:2*pi] -set zrange [-0.6:0.6] -set zrange [-1:1] +set autoscale z +set ticslevel 0. # reserve more space z direction. +set view ,,0.7,1.4 # crunch xyz, and re-extend z back to full size set ztics autofreq splot cos(v)**3*cos(u)**3,sin(v)**3*cos(u)**3,sin(u)**3 pause -1 "Hit return to continue (5)" -set view ,,,1.5 +set view ,,1.,1. set title "Parametric Helix" set isosamples 100,20 @@ -52,9 +54,8 @@ splot (1-0.1*cos(v))*cos(u),(1-0.1*cos(v))*sin(u),0.1*(sin(v)+u/1.7-10) pause -1 "Hit return to continue (6)" -set view ,,,1.0 -set title "Parametric Shell (cut by hidden3d)" +set title "Parametric Shell (clipped to limited z range)" set isosamples 40,20 set view 50,30,1.0 set urange [0:2*pi] @@ -64,7 +65,7 @@ pause -1 "Hit return to continue (7)" set autoscale z -set title "Parametric Shell" +set title "Parametric Shell (automatic z range)" replot pause -1 "Hit return to continue (8)" @@ -73,19 +74,11 @@ set urange [-pi:pi] set vrange [-pi:pi] set isosamples 50,20 -splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines +splot cos(u)+.5*cos(u)*cos(v),sin(u)+.5*sin(u)*cos(v),.5*sin(v) with lines, \ + 1+cos(u)+.5*cos(u)*cos(v),.5*sin(v),sin(u)+.5*sin(u)*cos(v) with lines pause -1 "Hit return to continue (9)" # # Clean up: # -set noparametric -set dummy x,y -set isosamples 10,10 -set view 60,30,1,1 -set urange [-5:5] -set vrange [-5:5] -set zrange [-10:10] -set auto -set title "" 0,0 -set nohidden +reset diff -urN gnuplot-3.7/demo/timedat.dem gnuplot-3.7.1/demo/timedat.dem --- gnuplot-3.7/demo/timedat.dem Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/timedat.dem Mon Oct 11 14:23:45 1999 @@ -13,4 +13,5 @@ , 'timedat.dat' using 1:3 t 'Total P' with points \ , 'timedat.dat' using 1:4 t '' \ , 'timedat.dat' using 1:4 t 'PO4' with points -pause -1 'Tast ' +pause -1 'Test ' +reset diff -urN gnuplot-3.7/demo/using.dat gnuplot-3.7.1/demo/using.dat --- gnuplot-3.7/demo/using.dat Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/using.dat Wed Apr 15 20:16:43 1998 @@ -1,5 +1,5 @@ # -# $Id: using.dat,v 1.4 1993/09/27 17:12:00 alex Exp $ +# $Id: using.dat,v 1.1.1.1 1998/04/15 19:16:43 lhecking Exp $ # # 891101 00 1.00 14 8.6 94.0 diff -urN gnuplot-3.7/demo/using.dem gnuplot-3.7.1/demo/using.dem --- gnuplot-3.7/demo/using.dem Wed Dec 2 18:36:13 1998 +++ gnuplot-3.7.1/demo/using.dem Mon Oct 11 14:23:35 1999 @@ -1,11 +1,12 @@ # -# $Id: using.dem,v 1.2 1993/09/27 17:12:02 alex Exp $ +# $Id: using.dem,v 1.2.2.1 1999/10/11 13:23:35 lhecking Exp $ # # Requires data file "using.dat" from this directory, # so change current working directory to this directory before running. # set title "Convex November 1-7 1989 Circadian" +set key left box set xrange[-1:24] plot 'using.dat' using 2:4 title "Logged in" with impulses,\ 'using.dat' using 2:4 title "Logged in" with points @@ -14,14 +15,12 @@ set xrange [1:8] #set xdtic set title "Convex November 1-7 1989" +set key below set label "(Weekend)" at 5,25 center plot 'using.dat' using 3:4 title "Logged in" with impulses,\ 'using.dat' using 3:5 t "Load average" with points,\ 'using.dat' using 3:6 t "%CPU used" with lines set nolabel pause -1 "Hit return to continue" +reset -# undo what we have done above -set title -set autoscale x -#set xtics autofreq diff -urN gnuplot-3.7/demo/world.cor gnuplot-3.7.1/demo/world.cor --- gnuplot-3.7/demo/world.cor Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/world.cor Wed Apr 15 20:16:43 1998 @@ -1,5 +1,5 @@ # -# $Id: world.cor,v 1.4 1993/09/27 17:12:03 alex Exp $ +# $Id: world.cor,v 1.1.1.1 1998/04/15 19:16:43 lhecking Exp $ # # Gnuplot world correspondences. Feel free to check for and update # your site; especially if it represents a new location or you diff -urN gnuplot-3.7/demo/world.dat gnuplot-3.7.1/demo/world.dat --- gnuplot-3.7/demo/world.dat Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/world.dat Wed Apr 15 20:16:43 1998 @@ -1,5 +1,5 @@ # -# $Id: world.dat,v 1.4 1993/09/27 17:12:06 alex Exp $ +# $Id: world.dat,v 1.1.1.1 1998/04/15 19:16:43 lhecking Exp $ # # -140.37 60.25 diff -urN gnuplot-3.7/demo/world.dem gnuplot-3.7.1/demo/world.dem --- gnuplot-3.7/demo/world.dem Wed Apr 15 20:16:43 1998 +++ gnuplot-3.7.1/demo/world.dem Thu Aug 19 15:34:27 1999 @@ -1,5 +1,5 @@ # -# $Id: world.dem,v 1.3 1995/04/21 12:49:16 drd Exp $ +# $Id: world.dem,v 1.1.1.1.2.2 1999/08/19 14:34:27 lhecking Exp $ # # set title "Gnuplot Correspondences" @@ -22,7 +22,8 @@ # plot a '3D version using spherical coordinate system' of the world. set angles degrees set title "3D version using spherical coordinate system" -set view 70,40,,2.0 +set ticslevel 0 +set view 70,40,0.8,1.2 # HBB: ,,2.0 set mapping spherical set parametric set samples 32 @@ -35,7 +36,8 @@ # # plot a '3D version using cylindrical coordinate system' of the world. set title "3D version using cylindrical coordinate system" -set view 70,40,,2.0 +set ticslevel 0.0 +set view 70,40,0.8,1.2 #HBB: ,,2.0 set mapping cylindrical set parametric set samples 32 @@ -50,14 +52,4 @@ # # Clean up: # -set noparametric -set mapping cartesian -set angles radians -set samples 100 -set isosamples 10 -set view 60,30,1,1 -set xrange [-10:10] -set yrange [-10:10] -set zrange [-10:10] -set auto -set title "" 0,0 +reset diff -urN gnuplot-3.7/descrip.mms gnuplot-3.7.1/descrip.mms --- gnuplot-3.7/descrip.mms Mon Dec 21 22:22:54 1998 +++ gnuplot-3.7.1/descrip.mms Thu Jan 1 01:00:00 1970 @@ -1,216 +0,0 @@ -! -! GNUPLOT Makefile for VMS, Vers. 2.1, 1998/08/25 -! -! "$ MMS" or "$ MMK" makes GNUPLOT.(E,A)XE, gnuplot_X11.(E,A)XE, GNUPLOT.HLB -! "$ MMS ALL" makes in addition GNUPLOT.HTML, GNUPLOT.TEX -! "$ MMS/MACRO=VAXC" or "$ MMS/MACRO=GNUC" for the other compilers. -! -! (Rolf Niepraschk, niepraschk@ptb.de) -! - -.IFDEF SCNDCALL !------------------- second call ------------ - -.IFDEF AXP -O=ABJ -X=AXE -.ELSE -O=OBJ -X=EXE -.ENDIF - -T = [.TERM] -D = [.DOCS] -L = [.DOCS.LATEXTUT] -M = [.DEMO] - -DEFAULT : gnuplot.$(X) gnuplot_X11.$(X) $(M)binary1 gnuplot.hlb - @ ! - -ALL : DEFAULT gnuplot.html $(D)gnuplot.tex - @ ! - -.IFDEF GNUC -CC = GCC -CFLAGS = /NOOP/define=(ANSI_C,HAVE_SLEEP,NO_GIH,NO_LOCALE_H,X11,PIPES,VAXCRTL) -CRTL_SHARE = ,GNU_CC:[000000]GCCLIB.OLB/lib,$(CWD)linkopt.vms/opt -.ENDIF - -.IFDEF VAXC -CFLAGS = /STAND=VAXC/NOOP/define=(HAVE_SLEEP,NO_GIH,NO_LOCALE_H,X11,PIPES,VAXCRTL) -CRTL_SHARE = ,linkopt.vms/opt -.ENDIF - -.IFDEF DECC - -! If this doesn't work use the next definitions. -! -! but the following definitions work with OpenVMS Alpha V6.2 and DEC C V5.3 -CFLAGS = /define=(ANSI_C,HAVE_LGAMMA,HAVE_ERFC,HAVE_ERF,HAVE_UNISTD_H,- -HAVE_GETCWD,HAVE_SLEEP,NO_GIH,X11,PIPES,DECCRTL) /prefix=all - -! A more conservative set of definitions is -! -!CFLAGS = /NOOP/define=(ANSI_C,NO_GIH,NO_LOCALE_H,X11,PIPES,DECCRTL,- -!HAVE_SLEEP,HAVE_GETCWD) /prefix=all - -CRTL_SHARE = -.ENDIF - -.SUFFIXES : ! clear the suffix list first -.SUFFIXES : .$(X) .$(O) .C -.C.$(O) : - $(CC) /OBJ=$@ $(CFLAGS) $< - -.$(O).$(X) : - LINK /EXE=$@ $(CRTL_SHARE) $+ - -X11_LIB = SYS$SHARE:DECW$XLIBSHR/SHARE -X11OPT_FILE = x11vms.opt -OPT_FILE = gnuplot.opt - -CREATE_OPT = @genopt.com -PURGE = purge /nolog -CD = SET DEFAULT -CWD = SYS$DISK:[] -SAY = WRITE SYS$OUTPUT - -TERMFLAGS = /INCL=($(T),$(CWD)) - -.INCLUDE MAKEFILE.ALL - -OBJS = $(COREOBJS) version.$(O) vms.$(O) - -.FIRST - @ MAKEDIR = F$ENVIRONMENT("DEFAULT") - -.LAST -! @ IF F$SEARCH("$(OPT_FILE)") .NES. "" THEN DELETE /NOLOG $(OPT_FILE);* -! @ IF F$SEARCH("*.$(O)",).NES."" THEN $(PURGE) *.$(O) -! @ IF F$SEARCH("*.$(X)",).NES."" THEN $(PURGE) *.$(X) -! @ IF F$SEARCH("*.HLP",).NES."" THEN $(PURGE) *.HLP -! @ IF F$SEARCH("*.HLB",).NES."" THEN $(PURGE) *.HLB - @ IF F$SEARCH("*.HTML",).NES."" THEN $(PURGE) *.HTML - @ IF F$SEARCH("*.DVI",).NES."" THEN $(PURGE) *.DVI - -$(OPT_FILE) : $(OBJS) - @ LIST := $+ - @ $(CREATE_OPT) $@/write LIST - -gnuplot.$(X) : $(OBJS) $(OPT_FILE) - link /exe=$@ $(OPT_FILE)/opt $(CRTL_SHARE) - @ $(SAY) "" - @ $(SAY) "Your gnuplot executable is $@" - @ $(SAY) "" - -gnuplot_X11.$(X) : gplt_x11.$(O) stdfn.$(O) $(X11OPT_FILE) - LINK /EXE=$@ GPLT_X11.$(O), STDFN.$(O), $(X11OPT_FILE)/opt $(CRTL_SHARE) - @ $(SAY) "" - @ $(SAY) "Your gnuplot_x11 executable is $@" - @ $(SAY) "" - -term.$(O) : term.c term.h $(CORETERM) - $(CC) /OBJ=$@ $(CFLAGS) $(TERMFLAGS) $*.c - -$(X11OPT_FILE) : - @ OPEN/WRITE OUT_FILE $(X11OPT_FILE) - @ WRITE OUT_FILE "$(X11_LIB)" - @ CLOSE OUT_FILE - -gnuplot.hlb : gnuplot.hlp - @ IF "''F$SEARCH("$@")'" .EQS. "" THEN LIBRARY/CREATE/HELP $@ - LIBRARY $@ $< - -gnuplot.hlp : doc2hlp.$(X) $(D)gnuplot.doc - CREATE_DOC := $ $(CWD)$< - CREATE_DOC $(D)gnuplot.doc $@ - -!$(D)gnuplot.rnh : doc2rnh.$(X) $(D)gnuplot.doc -! CREATE_DOC := $ $(CWD)$< -! CREATE_DOC $(D)gnuplot.doc $@ - -!gnuplot.hlp : $(D)gnuplot.rnh -! RUNOFF $(D)gnuplot.rnh - -gnuplot.html : doc2html.$(X) $(D)gnuplot.doc - CREATE_DOC := $ $(CWD)$< - CREATE_DOC $(D)gnuplot.doc $@ - -$(D)gnuplot.tex : doc2tex.$(X) $(D)gnuplot.doc - CREATE_DOC := $ $(CWD)$< - CREATE_DOC $(D)gnuplot.doc $@ - -gnuplot.dvi : $(D)gnuplot.tex $(D)titlepag.tex $(D)toc_entr.sty - $(CD) $(D) - LATEX $* - LATEX $* - RENAME $@ 'MAKEDIR'$@ - $(CD) 'MAKEDIR' - -doc2rnh.$(X) : doc2rnh.$(O) -doc2hlp.$(X) : doc2hlp.$(O) termdoc.$(O) - LINK /EXE=$@ doc2hlp.$(O),termdoc.$(O) -doc2html.$(X) : doc2html.$(O) -doc2tex.$(X) : doc2tex.$(O) - -doc2hlp.$(O) doc2html.$(O) doc2tex.$(O) termdoc.$(O) : $(D)termdoc.c $(D)allterm.h - $(CC) /OBJ=$@ $(CFLAGS) $(TERMFLAGS) $(D)$*.c -doc2rnh.$(O) doc2hlp.$(O) doc2html.$(O) doc2tex.$(O) : $(D)termdoc.c $(D)allterm.h - $(CC) /OBJ=$@ $(CFLAGS) $(TERMFLAGS) $(D)$*.c - -$(D)allterm.h : $(CORETERM) -! COPY /CONCATENATE $+ $@ !!! - COPY /CONCATENATE $(T)*.trm $@ - -$(M)binary1 $(M)binary2 $(M)binary3 : bf_test.$(X) - $(CD) $(M) - RUN 'MAKEDIR'$< - @ $(CD) 'MAKEDIR' - -bf_test.$(X) : bf_test.$(O) binary.$(O) alloc.$(O) - -CLEAN : - IF F$SEARCH("*.$(O)",).NES."" THEN DEL *.$(O);* - IF F$SEARCH("$(M)bf_test.$(X)",).NES."" THEN DEL $(M)bf_test.$(X);* - IF F$SEARCH("doc2tex.$(X)",).NES."" THEN DEL doc2tex.$(X);* - IF F$SEARCH("doc2html.$(X)",).NES."" THEN DEL doc2html.$(X);* - IF F$SEARCH("$(D)allterm.h",).NES."" THEN DEL $(D)allterm.h;* - IF F$SEARCH("gnuplot.hlp",).NES."" THEN DEL gnuplot.hlp;* - -VERYCLEAN : CLEAN - IF F$SEARCH("gnuplot.$(X)",).NES."" THEN DEL gnuplot.$(X);* - IF F$SEARCH("gnuplot.dvi",).NES."" THEN DEL gnuplot.dvi;* - IF F$SEARCH("gnuplot.html",).NES."" THEN DEL gnuplot.html;* - IF F$SEARCH("gnuplot.hlb",).NES."" THEN DEL gnuplot.hlb;* - IF F$SEARCH("$(D)gnuplot.tex",).NES."" THEN DEL $(D)gnuplot.tex;* - IF F$SEARCH("$(M)binary1.",).NES."" THEN DEL $(M)binary1.;* - IF F$SEARCH("$(M)binary2.",).NES."" THEN DEL $(M)binary2.;* - IF F$SEARCH("$(M)binary3.",).NES."" THEN DEL $(M)binary3.;* - -.ELSE !------------------- first call ------------ - -SAY = WRITE SYS$OUTPUT - -? $(MMSTARGETS) : DEFAULT - @ ! - -DEFAULT : - -.IFDEF GNUC - @ CCOMP = "GNUC=1" - @ $(SAY) "Making Gnuplot with GNUC..." -.ELSE -.IFDEF VAXC - @ CCOMP = "VAXC=1" - @ $(SAY) "Making Gnuplot with VAXC..." -.ELSE - @ CCOMP = "DECC=1" - @ $(SAY) "Making Gnuplot with DECC..." -.ENDIF -.ENDIF - @ $(SAY) "" - @ PARAM = "/MACRO=(SCNDCALL=1,''CCOMP')" - @ IF F$GETSYI("ARCH_TYPE") .NE. 1 THEN \ - PARAM = "/MACRO=(SCNDCALL=1,''CCOMP',AXP=1)" - @ $(MMS)/IGNORE=WARNING 'PARAM' $(MMSTARGETS) ! second call - -.ENDIF ! SCNDCALL diff -urN gnuplot-3.7/docs/Makefile.in gnuplot-3.7.1/docs/Makefile.in --- gnuplot-3.7/docs/Makefile.in Fri Dec 4 15:18:29 1998 +++ gnuplot-3.7.1/docs/Makefile.in Mon Nov 1 12:25:16 1999 @@ -4,17 +4,37 @@ # See README. # # To print manual: -# make gnuplot.dvi (for latex) -# (print or view gnuplot.dvi) -# OR -# make gnuplot.nroff (for nroff) -# (print or view gnuplot.nroff) -# or -# make "TROFF=itroff" troff (for troff; use your troff here) +# +# For LaTeX +# make gnuplot.dvi +# (print or view gnuplot.dvi) +# or (requires pdflatex) +# make pdf +# (print or view gnuplot.pdf) +# or +# make ps +# (print or view gnuplot.ps) +# +# For groff (GNU troff} +# make grotxt +# (print or view gnuplot.txt) +# or +# make grodvi +# (print or view gnuplot.dvi) +# or +# make grops +# (print or view gnuplot.ps) +# +# For nroff +# make gnuplot.nroff +# (print or view gnuplot.nroff) +# +# For troff +# make "TROFF=itroff" troff (use your troff here) # # default is what is needed for interactive gnuplot -default: gnuplot.hlp gnuplot.gih +all: gnuplot.gih # this tells GNU make not to export variables into the environment # But other makes dont understand its significance, so it must @@ -28,9 +48,9 @@ exec_prefix = @exec_prefix@ bindir = @bindir@ datadir = @datadir@ -mandir = @mandir@ +infodir = @infodir@ srcdir = @srcdir@ -top_builddir = . +top_builddir = .. top_srcdir = @top_srcdir@ VPATH = @srcdir@ @@ -39,33 +59,77 @@ INSTALL_DATA = @INSTALL_DATA@ CC = @CC@ +CPP = @CPP@ DEFS = @DEFS@ +CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ -INCLUDES = -I.. -I$(srcdir)/.. -I$(srcdir)/../term -I. +INCLUDES = -I.. -I$(top_srcdir) -I$(top_srcdir)/term -I. LDFLAGS = @LDFLAGS@ -LIBS = +LIBS = @LIBS@ -COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CFLAGS) +COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@ +.c.o: + $(COMPILE) -c $< + # The makeinfo command from GNU texinfo MAKEINFO = makeinfo +# If you want to try doc2texi.el +# EMACS = emacs + # substitute your troff command (and any flags) for this one -TROFF=troff +TROFF = troff + +# LaTeX command, either latex or latex2e or no +LATEX = latex + +# PDFLaTeX command +PDFLATEX = pdflatex # substitute your DVI to PostScript conversion program here -DVIPS=dvips +DVIPS = dvips -# list of terminals, generated at configure time -TERM_LIST = \@TERM_LIST@ +T = ${srcdir}/../term +CORETERM = $(T)/aed.trm $(T)/ai.trm $(T)/amiga.trm $(T)/apollo.trm \ +$(T)/atariaes.trm $(T)/atarivdi.trm $(T)/be.trm $(T)/cgi.trm $(T)/cgm.trm \ +$(T)/corel.trm $(T)/debug.trm $(T)/djsvga.trm $(T)/dumb.trm $(T)/dxf.trm \ +$(T)/dxy.trm $(T)/eepic.trm $(T)/emxvga.trm $(T)/epson.trm $(T)/excl.trm \ +$(T)/fg.trm $(T)/fig.trm $(T)/gif.trm $(T)/gnugraph.trm $(T)/gpic.trm \ +$(T)/gpr.trm $(T)/grass.trm $(T)/hp26.trm $(T)/hp2648.trm $(T)/hp500c.trm \ +$(T)/hpgl.trm $(T)/hpljii.trm $(T)/hppj.trm $(T)/imagen.trm $(T)/iris4d.trm \ +$(T)/kyo.trm $(T)/latex.trm $(T)/linux.trm $(T)/mac.trm $(T)/metafont.trm \ +$(T)/metapost.trm $(T)/mgr.trm $(T)/mif.trm $(T)/multitos.trm \ +$(T)/next.trm $(T)/openstep.trm $(T)/pbm.trm $(T)/pc.trm $(T)/pm.trm \ +$(T)/png.trm $(T)/post.trm $(T)/pslatex.trm $(T)/pstricks.trm $(T)/qms.trm \ +$(T)/regis.trm $(T)/rgip.trm $(T)/sun.trm $(T)/t410x.trm $(T)/table.trm \ +$(T)/tek.trm $(T)/texdraw.trm $(T)/tgif.trm $(T)/tkcanvas.trm $(T)/tpic.trm \ +$(T)/unixpc.trm $(T)/unixplot.trm $(T)/v384.trm $(T)/vws.trm $(T)/win.trm \ +$(T)/x11.trm $(T)/xlib.trm + +DIST_COMMON = README Makefile.in + +SOURCES = checkdoc.c doc2gih.c doc2hlp.c doc2html.c doc2info.c \ +doc2ipf.c doc2ms.c doc2rnh.c doc2rtf.c doc2tex.c termdoc.c xref.c + +HEADERS = doc2x.h xref.h + +EXTRA_DIST = doc2hlp.com doc2texi.el doc2texi.pl gnuplot.1 gnuplot.doc \ +gnuplot.texi gpcard.tex lasergnu.1 makefile.ami makefile.dst titlepag.ms \ +titlepag.tex toc_entr.sty latextut old psdoc -allterm.h : $(TERM_LIST) +DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(EXTRA_DIST) + +allterm.h : $(CORETERM) @echo Building allterm.h - cat $(srcdir)/../term/*.trm > allterm.h + @cat $(top_srcdir)/term/*.trm > allterm.c + $(CPP) -I$(top_srcdir)/term -DTERM_DRIVER_H -DTERM_HELP allterm.c | \ + sed '/^ *$$/d;/^#/d' > allterm.h + @rm -f allterm.c # for debugging -alldoc: check dvi gih hlp html info ipf ms nroff ps rnh rtf +alldoc: check dvi gih hlp html info ipf ms nroff pdf ps rnh rtf ### [tn]roff documentation troff: gnuplot.ms titlepag.ms @@ -86,6 +150,34 @@ tbl | neqn | nroff -ms | col > gnuplot.nroff ; \ fi +### groff documentation + +groff: grotxt grodvi grops + +grotxt: gnuplot.ms titlepag.ms + @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ + groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \ + else \ + sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ + groff -s -p -t -e -ms -Tlatin1 gnuplot.ms > gnuplot.txt ; \ + fi + +grodvi: gnuplot.ms titlepag.ms + @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ + groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \ + else \ + sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ + groff -s -p -t -e -ms -Tdvi gnuplot.ms > gnuplot.dvi ; \ + fi + +grops: gnuplot.ms titlepag.ms + @if [ "$(srcdir)" = "$(top_builddir)" ] ; then \ + groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \ + else \ + sed "s,titlepag\.ms,$(srcdir)/titlepag\.ms," gnuplot.ms |\ + groff -s -p -t -e -ms -Tps gnuplot.ms > gnuplot.ps ; \ + fi + ### doc2xxx dependencies ms: gnuplot.ms @@ -110,6 +202,17 @@ doc2html.o: doc2html.c allterm.h $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2html.c +### PDF documentation +pdf: gnuplot.pdf + +gnuplot.pdf: gnuplot.tex + @if test $(PDFLATEX) != no ; then \ + TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ + TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(PDFLATEX) gnuplot ; \ + else \ + echo pdflatex not found - cannot build pdf file ; \ + fi + ### LaTeX documentation tex: gnuplot.tex @@ -126,13 +229,17 @@ dvi: gnuplot.dvi gpcard.dvi gnuplot.dvi: gnuplot.tex titlepag.tex toc_entr.sty - TEXINPUTS=.:$(srcdir): latex gnuplot - TEXINPUTS=.:$(srcdir): latex gnuplot + @if test $(LATEX) != no ; then \ + TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ + TEXINPUTS=.:$(srcdir):${TEXINPUTS}: $(LATEX) gnuplot ; \ + else \ + echo latex not found - cannot build dvi file ; \ + fi gpcard.dvi: gpcard.tex TEXINPUTS=.:$(srcdir): tex gpcard -# this is how to make PostScript files +### Postscript format # if pslatex has been installed, add "times" to titlepage.tex ps: gnuplot.ps gpcard.ps @@ -152,7 +259,7 @@ doc2hlp: doc2hlp.o termdoc.o $(LINK) doc2hlp.o termdoc.o $(LIBS) -# this is how to make gnuplot.gih +### gnuplot interactive help format gih: gnuplot.gih gnuplot.gih: doc2gih $(srcdir)/gnuplot.doc @@ -174,7 +281,7 @@ $(COMPILE) -DALL_TERM_DOC -c $(srcdir)/doc2gih.c @mv doc2gih.o alldoc2gih.o -# this is how to make Info documentation +### GNU info format info: gnuplot.info gnuplot.info: doc2info $(srcdir)/gnuplot.doc @@ -183,6 +290,16 @@ doc2info: doc2info.o termdoc.o xref.o $(LINK) doc2info.o termdoc.o xref.o $(LIBS) +## An alternative to doc2info.c, Thanks to Bruce Ravel +#gnuplot.info: $(srcdir)/gnuplot.texi $(srcdir)/gnuplot.doc +# $(MAKEINFO) -I$(srcdir) $(srcdir)/gnuplot.texi --no-split --output=$@ +#gnuplot.texi: $(srcdir)/doc2info.el $(srcdir)/gnuplot.doc +# @if test "$(EMACS)" != no; then \ +# $(EMACS) -batch -l $(srcdir)/doc2texi.el -f d2t-doc-to-texi; \ +# else \ +# @echo No emacs found - cannot create texinfo file; \ +# fi + # this is how to make OS/2 ipfc documentation ipf: gnuplot.ipf @@ -192,7 +309,7 @@ doc2ipf: doc2ipf.o termdoc.o xref.o $(LINK) doc2ipf.o termdoc.o xref.o $(LIBS) -# this is how to make rtf documentation +### Rich Text Format rtf: gnuplot.rtf gnuplot.rtf: doc2rtf $(srcdir)/gnuplot.doc @@ -216,10 +333,15 @@ ( cd latextut; $(MAKE) ) # this is how to check the gnuplot.doc file -check: checkdoc $(srcdir)/gnuplot.doc - ./checkdoc < $(srcdir)/gnuplot.doc +check: all checkdoc + @./checkdoc < $(srcdir)/gnuplot.doc; \ + if test $$? -eq 0; then \ + echo "PASS: gnuplot.doc"; \ + else \ + :; \ + fi -checkdoc: checkdoc.o termdoc.o +checkdoc: checkdoc.o termdoc.o $(srcdir)/gnuplot.doc $(LINK) checkdoc.o termdoc.o $(LIBS) checkdoc.o: checkdoc.c allterm.h @@ -227,6 +349,7 @@ # For Unix and MSDOS only install: gnuplot.gih + $(top_srcdir)/mkinstalldirs $(datadir) $(INSTALL_DATA) gnuplot.gih $(datadir)/gnuplot.gih uninstall: @@ -236,8 +359,26 @@ install-vms: gnuplot.hlp $(INSTALL_DATA) gnuplot.hlp $(datadir)/gnuplot.hlp +distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) + +subdir = docs + + +distdir: $(DISTFILES) + distdir=`cd $(distdir) && pwd` + @for file in $(DISTFILES); do \ + d=$(srcdir); \ + if test -d $$d/$$file; then \ + cp -pr $$d/$$file $(distdir)/$$file; \ + else \ + test -f $(distdir)/$$file \ + || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ + || cp -p $$d/$$file $(distdir)/$$file || :; \ + fi; \ + done + clean: - rm -f doc2tex gnuplot.tex gnuplot.dvi \ + -rm -f doc2tex gnuplot.tex gnuplot.dvi \ gnuplot.aux gnuplot.log gnuplot.toc \ gnuplot.ps gpcard.dvi gpcard.log gpcard.ps \ alldoc2gih doc2gih gnuplot.gih \ @@ -250,17 +391,19 @@ doc2rtf gnuplot.rtf \ gnuplot.nroff checkdoc *.o core a.out allterm.h ( cd latextut; $(MAKE) clean ) + rm -f *.exe mostlyclean: clean distclean: clean - rm -f Makefile + -rm -f Makefile realclean: distclean - rm -f TAGS + -rm -f TAGS -.c.o: - $(COMPILE) -c $< +Makefile: Makefile.in ../config.status + cd .. \ + && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status ### Dependencies - do not edit! @@ -269,33 +412,33 @@ # (but then we have to change all the other makefiles). Plus then # we cannot make some doc2* filters use allterm.h and others use term.h -TERM_H = $(srcdir)/../term.h +TERM_H = $(top_srcdir)/term.h -checkdoc.o: checkdoc.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h allterm.h -alldoc2gih.o: doc2gih.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h allterm.h -doc2gih.o: doc2gih.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2hlp.o: doc2hlp.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2html.o: doc2html.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h allterm.h -doc2info.o: doc2info.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2ipf.o: doc2ipf.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2ms.o: doc2ms.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h allterm.h -doc2rnh.o: doc2rnh.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2rtf.o: doc2rtf.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h $(TERM_H) -doc2tex.o: doc2tex.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h allterm.h -termdoc.o: termdoc.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h -xref.o: xref.c ../config.h $(srcdir)/../ansichek.h \ - $(srcdir)/../stdfn.h doc2x.h xref.h +checkdoc.o: checkdoc.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h allterm.h +alldoc2gih.o: doc2gih.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h allterm.h +doc2gih.o: doc2gih.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2hlp.o: doc2hlp.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2html.o: doc2html.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h allterm.h +doc2info.o: doc2info.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2ipf.o: doc2ipf.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2ms.o: doc2ms.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h allterm.h +doc2rnh.o: doc2rnh.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2rtf.o: doc2rtf.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h $(TERM_H) +doc2tex.o: doc2tex.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h allterm.h +termdoc.o: termdoc.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h +xref.o: xref.c ../config.h $(top_srcdir)/ansichek.h \ + $(top_srcdir)/stdfn.h doc2x.h xref.h #the end diff -urN gnuplot-3.7/docs/checkdoc.c gnuplot-3.7.1/docs/checkdoc.c --- gnuplot-3.7/docs/checkdoc.c Mon Oct 19 14:17:15 1998 +++ gnuplot-3.7.1/docs/checkdoc.c Mon Oct 19 14:17:15 1998 @@ -1,5 +1,5 @@ /* - * $Id: checkdoc.c,v 1.17 1998/04/14 00:16:57 drd Exp $ + * $Id: checkdoc.c,v 1.7 1998/10/19 13:17:15 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/doc2gih.c gnuplot-3.7.1/docs/doc2gih.c --- gnuplot-3.7/docs/doc2gih.c Mon Oct 19 14:17:28 1998 +++ gnuplot-3.7.1/docs/doc2gih.c Mon Oct 19 14:17:28 1998 @@ -1,5 +1,5 @@ /* - * $Id: doc2gih.c,v 1.16 1998/04/14 00:16:58 drd Exp $ + * $Id: doc2gih.c,v 1.7 1998/10/19 13:17:28 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/doc2hlp.c gnuplot-3.7.1/docs/doc2hlp.c --- gnuplot-3.7/docs/doc2hlp.c Mon Oct 19 14:17:32 1998 +++ gnuplot-3.7.1/docs/doc2hlp.c Mon Oct 19 14:17:32 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: doc2hlp.c,v 1.15 1998/04/14 00:16:58 drd Exp $"; +static char *RCSid = "$Id: doc2hlp.c,v 1.7 1998/10/19 13:17:32 lhecking Exp $"; #endif /* GNUPLOT - doc2hlp.c */ diff -urN gnuplot-3.7/docs/doc2html.c gnuplot-3.7.1/docs/doc2html.c --- gnuplot-3.7/docs/doc2html.c Wed Oct 28 21:04:09 1998 +++ gnuplot-3.7.1/docs/doc2html.c Wed Oct 28 21:04:09 1998 @@ -1,5 +1,5 @@ /* - * $Id: doc2html.c,v 1.10 1998/04/14 00:16:58 drd Exp $ + * $Id: doc2html.c,v 1.7 1998/10/28 21:04:09 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/doc2info.c gnuplot-3.7.1/docs/doc2info.c --- gnuplot-3.7/docs/doc2info.c Fri Dec 4 15:18:04 1998 +++ gnuplot-3.7.1/docs/doc2info.c Thu Aug 19 15:31:53 1999 @@ -1,5 +1,5 @@ /* - * $Id: doc2info.c,v 1.7 1998/04/14 00:16:59 drd Exp $ + * $Id: doc2info.c,v 1.9.2.1 1999/08/19 14:31:53 lhecking Exp $ * */ @@ -148,7 +148,13 @@ refhead->next = refhead->prev = NULL; /* Info header */ - fprintf(b, "This file is %s created by doc2info from %s.\n\n", ofile, ifile); + fprintf(b, "\ +This file is %s created by doc2info from %s.\n\ +\n\ +START-INFO-DIR-ENTRY\n\ +* Gnuplot: (gnuplot). Gnuplot plotting program\n\ +END-INFO-DIR-ENTRY\n\n", + ofile, ifile); /* and Top node */ node_head(NULL, NULL, head->next->string, NULL, b); diff -urN gnuplot-3.7/docs/doc2ipf.c gnuplot-3.7.1/docs/doc2ipf.c --- gnuplot-3.7/docs/doc2ipf.c Mon Oct 19 14:17:45 1998 +++ gnuplot-3.7.1/docs/doc2ipf.c Mon Oct 19 14:17:45 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: doc2ipf.c,v 1.20 1998/04/14 00:16:59 drd Exp $"; +static char *RCSid = "$Id: doc2ipf.c,v 1.7 1998/10/19 13:17:45 lhecking Exp $"; #endif /* GNUPLOT - doc2ipf.c */ diff -urN gnuplot-3.7/docs/doc2ms.c gnuplot-3.7.1/docs/doc2ms.c --- gnuplot-3.7/docs/doc2ms.c Mon Oct 19 14:17:49 1998 +++ gnuplot-3.7.1/docs/doc2ms.c Mon Oct 19 14:17:49 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: doc2ms.c,v 1.19 1998/06/18 14:59:11 ddenholm Exp $"; +static char *RCSid = "$Id: doc2ms.c,v 1.9 1998/10/19 13:17:49 lhecking Exp $"; #endif /* GNUPLOT - doc2ms.c */ diff -urN gnuplot-3.7/docs/doc2rnh.c gnuplot-3.7.1/docs/doc2rnh.c --- gnuplot-3.7/docs/doc2rnh.c Fri Nov 20 12:16:15 1998 +++ gnuplot-3.7.1/docs/doc2rnh.c Fri Nov 20 12:16:15 1998 @@ -1,5 +1,5 @@ #ifndef lint -static char *RCSid = "$Id: doc2rno.c,v 0.01 1997/03/09 21:00:00 lph Exp $"; +static char *RCSid = "$Id: doc2rnh.c,v 1.7 1998/11/20 12:16:15 lhecking Exp $"; #endif /* GNUPLOT - doc2rnh.c */ diff -urN gnuplot-3.7/docs/doc2rtf.c gnuplot-3.7.1/docs/doc2rtf.c --- gnuplot-3.7/docs/doc2rtf.c Mon Oct 19 14:17:56 1998 +++ gnuplot-3.7.1/docs/doc2rtf.c Mon Oct 19 14:17:56 1998 @@ -1,5 +1,5 @@ /* - * $Id: doc2rtf.c,v 1.16 1998/04/14 00:17:00 drd Exp $ + * $Id: doc2rtf.c,v 1.6 1998/10/19 13:17:56 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/doc2tex.c gnuplot-3.7.1/docs/doc2tex.c --- gnuplot-3.7/docs/doc2tex.c Mon Oct 19 14:18:05 1998 +++ gnuplot-3.7.1/docs/doc2tex.c Mon Oct 19 14:18:05 1998 @@ -1,5 +1,5 @@ /* - * $Id: doc2tex.c,v 1.21 1998/06/18 14:59:12 ddenholm Exp $ + * $Id: doc2tex.c,v 1.8 1998/10/19 13:18:05 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/doc2texi.el gnuplot-3.7.1/docs/doc2texi.el --- gnuplot-3.7/docs/doc2texi.el Thu Jan 1 01:00:00 1970 +++ gnuplot-3.7.1/docs/doc2texi.el Thu Oct 28 12:24:45 1999 @@ -0,0 +1,767 @@ +;;;; doc2texi.el -- generate a texinfo file from the gnuplot doc file + +;; Copyright (C) 1999 Bruce Ravel + +;; Author: Bruce Ravel +;; Maintainer: Bruce Ravel +;; Created: March 23 1999 +;; Updated: May 28 1999 +;; Version: 0.2 +;; Keywords: gnuplot, document, info + +;; This file is not part of GNU Emacs. + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; This lisp script is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +;; +;; Permission is granted to distribute copies of this lisp script +;; provided the copyright notice and this permission are preserved in +;; all copies. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; send bug reports to the author (ravel@phys.washington.edu) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Commentary: +;; +;; I suppose the most immediate question to ask is "Why do this in +;; emacs lisp???" While it is true that the gnuplot.doc file lends +;; itself to processing by a 1 pass filter, there are some aspects of +;; texinfo files that are a bit tricky and would require 2 or perhaps +;; three passes. Specifically, getting all of the cross references +;; made correctly is a lot of work. Fortunately, texinfo-mode has +;; functions for building menus and updating nodes. This saves a lot +;; of sweat and is the principle reason why I decided to write this is +;; emacs lisp. +;; +;; Everything else in gnuplot is written in C for the sake of +;; portability. Emacs lisp, of course, requires that you have emacs. +;; For many gnuplot users, that is not a good assumption. However, +;; the likelihood of needing info files in the absence of emacs is +;; very, very slim. I think it is safe to say that someone who needs +;; info files has emacs installed and thus will be able to use this +;; program. +;; +;; Since this is emacs, I am not treating the gnuplot.doc file as a +;; text stream. It seems much more efficient in this context to treat +;; it as a buffer. All of the work is done by the function +;; `d2t-doc-to-texi'. Each of the conversion chores is handled by an +;; individual function. Each of thse functions is very similar in +;; structure. They start at the top of the buffer, search forward for +;; a line matching the text element being converted, perform the +;; replacement in place, and move on until the end of the buffer. +;; These text manipulations are actually quite speedy. The slow part +;; of the process is using the texinfo-mode function to update the +;; nodes and menus. However, using these slow functions has one +;; advantage -- the texinfo-mode functions for doing menus and nodes +;; are certain to do the job correctly. Although rather slow, this +;; approach doesn't totally suck compared to the time cost of +;; compiling and running a C program. And the output from this is +;; much more useful than the output from the doc2info program. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Use: +;; +;; Customize the variables at the start of the executable code. Then +;; I intend that this be used from the command line or from a Makefile +;; like so: +;; +;; emacs -batch -l doc2texi.el -f d2t-doc-to-texi +;; +;; or +;; +;; emacs -batch -l doc2texi.el -f d2t-doc-to-texi-verbosely +;; +;; This will start emacs in batch mode, load this file, run the +;; converter, then quit. This takes about 30 seconds my 133 MHz +;; Pentium. It also sends a large number of mesages to stderr, so you +;; may want to redirect stderr to /dev/null or to a file. +;; +;; Then you can do +;; +;; makeinfo gnuplot.info +;; +;; You may want to use the --no-split option. +;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; History: +;; +;; 0.1 Mar 23 1999
Initial version +;; 0.2 May 28 1999
+;; 0.3 Jun 2 1999
Added terminal information, fixed uref problem. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Acknowledgements: +;; +;; Lars Hecking asked me to look into the doc -> info problem. Silly +;; me, I said "ok." This is what I came up with. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; To do: +;; +;; -- internal cross-references: these are not perfect due to +;; inconsistencies in the use of `` and case inconsistencies in +;; the text. The latter can be fixed. Also I need a way to not +;; make the @ref if point is currently in that region. +;; -- catch errors gracefully, particularly when looking for files. +;; -- are guesses about OS specific terminal information correct? +;; -- turn the lists in the "What's New" and "xlabel" sections into +;; proper lists. "^\\([0-9]\\)+\." finds the list items. If +;; (match-string 1) is "1" then insert "@enumerate\n@item\n", else +;; insert "@item\n". also use (replace-match ""). need to find +;; the end somehow. +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;;; Code: + +;;; You may need to customize these variables: +(defvar d2t-doc-file-name "gnuplot.doc" + "Name of the gnuplot.doc file.") +(defvar d2t-terminal-directory (expand-file-name "../term/") + "Location of .trm files in gnuplot source tree.") + + +;;; You should not need to touch anything below here ;;;;;;;;;;;;;;;;;;;;; + +(require 'cl) +(eval-and-compile ; need split-string to do xrefs + (if (fboundp 'split-string) + () + (defun split-string (string &optional pattern) + "Return a list of substrings of STRING which are separated by PATTERN. +If PATTERN is omitted, it defaults to \"[ \\f\\t\\n\\r\\v]+\"." + (or pattern + (setq pattern "[ \f\t\n\r\v]+")) + (let (parts (start 0)) + (while (string-match pattern string start) + (setq parts (cons (substring string start (match-beginning 0)) parts) + start (match-end 0))) + (nreverse (cons (substring string start) parts)))) )) + +(defconst d2t-work-buffer-name "*doc2texi*" + "Name of scratch buffer where the doc file will be converted into a + texi file.") +(defconst d2t-scratch-buffer-name "*doc2texi-output*") +(defconst d2t-terminal-buffer-name "*doc2texi-terminal*") +(defvar d2t-verbose nil) +(defconst d2t-texi-filename "gnuplot.texi") + +(defconst d2t-texi-header + "\\input texinfo @c -*-texinfo-*- + +@c %**start of header +@setfilename gnuplot.info +@settitle Gnuplot: An Interactive Plotting Program +@setchapternewpage odd +@c %**end of header + +@c define the command and options indeces +@defindex cm +@defindex op +@defindex tm + +@direntry +* GNUPLOT: (gnuplot). An Interactive Plotting Program +@end direntry + +@ifnottex +@node Top, gnuplot, (dir), (dir) +@top Master Menu +@end ifnottex + +@example + GNUPLOT + + An Interactive Plotting Program + Thomas Williams & Colin Kelley + Version 3.7 organized by: David Denholm + + Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley + + Mailing list for comments: info-gnuplot@@dartmouth.edu + Mailing list for bug reports: bug-gnuplot@@dartmouth.edu + + This manual was prepared by Dick Crawford + 3 December 1998 + + +Major contributors (alphabetic order): +@end example + +" + "Texinfo header.") + +(defconst d2t-main-menu + "@menu +@end menu" + "Main menu.") + +(defconst d2t-texi-footer + "@node Concept_Index, Command_Index, Bugs, Top +@unnumbered Concept Index +@printindex cp + +@node Command_Index, Option_Index, Concept_Index, Top +@unnumbered Command Index +@printindex cm + +@node Options_Index, Function_Index, Command_Index, Top +@unnumbered Options Index +@printindex op + +@node Function_Index, Terminal_Index, Options_Index, Top +@unnumbered Function Index +@printindex fn + +@node Terminal_Index, , Options_Index, Top +@unnumbered Terminal Index +@printindex tm + +@c @shortcontents +@contents +@bye +" + "Texinfo file terminator.") + +(defvar d2t-level-1-alist nil + "Alist of level 1 tags and markers.") +(defvar d2t-level-2-alist nil + "Alist of level 2 tags and markers.") +(defvar d2t-level-3-alist nil + "Alist of level 3 tags and markers.") +(defvar d2t-level-4-alist nil + "Alist of level 4 tags and markers.") +(defvar d2t-level-5-alist nil + "Alist of level 5 tags and markers.") +(defvar d2t-commands-alist nil + "Alist of commands and markers.") +(defvar d2t-set-show-alist nil + "Alist of options and markers.") +(defvar d2t-functions-alist nil + "Alist of functions and markers.") +(defvar d2t-terminals-alist nil + "Alist of terminal types and markers.") +(defvar d2t-node-list nil + "List of nodes.") + +(defvar d2t-terminal-list ()) +(setq d2t-terminal-list + '("ai" + "cgm" + "corel" + "dumb" + "dxf" + "eepic" + "epson" + "fig" + "gif" + "hp26" + "hp2648" + "hp500c" + "hpgl" + "hpljii" + "hppj" + "imagen" + "latex" + "metafont" + "mif" + "pbm" + "png" + "post" + "pslatex" + "pstricks" + "qms" + "table" + "tek" + "texdraw" + "tkcanvas" + "tpic")) + +(defun d2t-doc-to-texi-verbosely () + "Run `d2t-doc-to-texi' noisily" + (interactive) + (setq d2t-verbose t) + (d2t-doc-to-texi)) + +(defun d2t-doc-to-texi () + "This is the doc to texi converter function. +It calls a bunch of other functions, each of which handles one +particular conversion chore." + (interactive) + (setq d2t-level-1-alist nil ;; initialize variables + d2t-level-2-alist nil + d2t-level-3-alist nil + d2t-level-4-alist nil + d2t-level-5-alist nil + d2t-commands-alist nil + d2t-set-show-alist nil + d2t-functions-alist nil + d2t-terminals-alist nil + d2t-node-list nil) + ;; open the doc file and get some data about its contents + (d2t-prepare-workspace) + (message "Inserting help for terminals ...") + (d2t-get-terminals) + (message "Analyzing doc file ...") + (d2t-get-levels) + (d2t-get-commands) + (d2t-get-set-show) + (d2t-get-functions) + ;; convert the buffer from doc to texi, one element at a time + (message "Converting to texinfo ...") + (d2t-braces-atsigns) ;; this must be the first conversion function + (d2t-comments) ;; delete comments + (d2t-sectioning) ;; chapters, sections, etc + (d2t-indexing) ;; index markup + (d2t-tables) ;; fix up tables + (d2t-handle-html) ;; fix up html markup + (d2t-first-column) ;; left justify normal text + (d2t-enclose-examples) ;; turn indented text into @examples + (message "Menus, nodes, xrefs ...") + (d2t-make-refs) + ;(d2t-make-menus) + ;(d2t-set-nodes) + (save-excursion ;; fix a few more things explicitly + (goto-char (point-min)) + (insert d2t-texi-header) + (search-forward "@node") + ;; (beginning-of-line) + ;; (insert "\n\n" d2t-main-menu "\n\n") + (search-forward "@node Old_bugs") ; `texinfo-all-menus-update' seems + (beginning-of-line) ; to miss this one. how odd. + (insert "@menu\n* Old_bugs::\t\t\t\n@end menu\n\n") + (goto-char (point-max)) + (insert d2t-texi-footer)) + (load-library "texinfo") ;; now do the hard stuff with texinfo-mode + (texinfo-mode) + (let ((message-log-max 0) + (standard-output (get-buffer-create d2t-scratch-buffer-name))) + (message "Making texinfo nodes ...\n") + (texinfo-every-node-update) + (message "Making texinfo menus ...\n") + (texinfo-all-menus-update)) + (write-file d2t-texi-filename) ) ; save it and done! + +(defun d2t-prepare-workspace () + "Create a scratch buffer and populate it with gnuplot.doc." + (and d2t-verbose (message " Doing d2t-prepare-workspace ...")) + (if (get-buffer d2t-work-buffer-name) + (kill-buffer d2t-work-buffer-name)) + (if (get-buffer d2t-texi-filename) + (kill-buffer d2t-texi-filename)) + (if (get-buffer d2t-terminal-buffer-name) + (kill-buffer d2t-terminal-buffer-name)) + (get-buffer-create d2t-terminal-buffer-name) + (set-buffer (get-buffer-create d2t-work-buffer-name)) + (insert-file-contents d2t-doc-file-name) + (goto-char (point-min))) + + +(defun d2t-get-terminals () + "Insert all appropriate terminal help." + (let ((case-fold-search t)) + (if (string-match "linux" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("linux")))) + (if (string-match "amiga" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("amiga")))) + (if (string-match "atari" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("atarivdi" "multitos" "atariaes")))) + (if (string-match "mac" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("mac")))) + (if (string-match "beos" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("be")))) + (if (string-match "dos" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("emxvga" "djsvga" "fg" "pc")))) + (if (string-match "windows" (format "%s" system-type)) + (setq d2t-terminal-list (append d2t-terminal-list + '("win")))) + (if (string-match "next" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("next")))) + (if (string-match "os2" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("pm" "emxvga")))) + (if (string-match "irix" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("iris4d")))) + (if (string-match "sco" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("cgi")))) + (if (string-match "sun" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("sun")))) + (if (string-match "vms" system-configuration) + (setq d2t-terminal-list (append d2t-terminal-list + '("vws")))) + (unless (member* system-configuration '("dos" "windows" "atari" "amiga") + :test 'string-match) + (setq d2t-terminal-list + (append d2t-terminal-list + '("x11" "tgif" "gpic" "regis" "t410x" "tex" "xlib")))) ) + (setq d2t-terminal-list (sort d2t-terminal-list 'string<)) + (let ((list d2t-terminal-list) file node marker) + (save-excursion + (when (re-search-forward "^<4" (point-max) t) + (beginning-of-line) + (insert "@c ") + (forward-line 1) + (while list + (and d2t-verbose (message " %s ..." (car list))) + (setq file (concat d2t-terminal-directory (car list) ".trm")) + (when (file-exists-p file) + (set-buffer d2t-terminal-buffer-name) + (erase-buffer) + (insert-file-contents file) + ;; find the terminal help + (when (search-forward "START_HELP" (point-max) "to_end") + (forward-line 1) + (delete-region (point-min) (point-marker)) + (search-forward "END_HELP" (point-max) "to_end") + (beginning-of-line) + (delete-region (point-marker) (point-max)) + ;; tidy up the terminal help content + (goto-char (point-min)) + (while (re-search-forward "\",[ \t]*$" nil t) + (replace-match "" nil nil)) + (goto-char (point-min)) + (while (re-search-forward "^\"" nil t) + (replace-match "" nil nil)) + (goto-char (point-min)) + (while (re-search-forward "\\\\\"" nil t) + (replace-match "\"" nil nil)) + (goto-char (point-min)) + (while (re-search-forward "^1[ \t]+\\(.+\\)$" nil t) + (setq node (match-string 1) + marker (point-marker)) + (replace-match (concat "4 " node) nil nil)) + (goto-char (point-min)) + (while (re-search-forward "^2" nil t) + (replace-match "5 " nil nil)) + (goto-char (point-min)) + ;; set up terminals index + (while (re-search-forward "^\?\\([^ ]+\\)$" nil t) + (let ((word (match-string 1))) + (unless (string-match "_\\|command-line-options" word) + (setq d2t-terminals-alist + (append d2t-terminals-alist + (list (cons word (point-marker)))))))) + ;; and cram it into the doc buffer + (set-buffer d2t-work-buffer-name) + (insert-buffer-substring d2t-terminal-buffer-name) + )) + (setq list (cdr list)) + ))))) + +;;; functions for obtaining lists of nodes in the document + +(defun d2t-get-levels () + "Find positions of all nodes in the doc." + (and d2t-verbose (message " Doing d2t-get-levels ...")) + (let ((list '("1" "2" "3" "4" "5")) str) + (while list + (setq str (concat "d2t-level-" (car list) "-alist")) + (and d2t-verbose (message " %s ..." str)) + (save-excursion + (while (not (eobp)) + (when (re-search-forward (concat "^" (car list) " \\(.+\\)$") + (point-max) "to_end") + (beginning-of-line) + (set (intern str) + (append (eval (intern str)) + (list (cons (match-string 1) (point-marker))))) + (forward-line 1)))) + (setq list (cdr list))))) + + +(defun d2t-get-commands () + "Find all commands in the doc." + (and d2t-verbose (message " Doing d2t-get-commands ...")) + (save-excursion + (let ((alist d2t-level-1-alist) start end) + (while alist + (if (string= (caar alist) "Commands") + (setq start (cdar alist) ;; location of "1 Commands" + end (cdadr alist) ;; location of next level 1 heading + alist nil) + (setq alist (cdr alist)))) + ;;(message "%S %S" start end) + (goto-char start) + (while (< (point) end) + (when (re-search-forward "^2 \\(.+\\)$" (point-max) "to_end") + (beginning-of-line) + (unless (> (point) end) + (setq d2t-commands-alist + (append d2t-commands-alist + (list (cons (match-string 1) (point-marker)))))) + (forward-line 1))) ))) + +(defun d2t-get-set-show () + "Find all set-show options in the doc." + (and d2t-verbose (message " Doing d2t-get-set-show ...")) + (save-excursion + (let ((alist d2t-commands-alist) start end) + (while alist + (if (string= (caar alist) "set-show") + (setq start (cdar alist) ;; location of "1 set-show" + end (cdadr alist) ;; location of next level 2 heading + alist nil) + (setq alist (cdr alist)))) + ;;(message "%S %S" start end) + (goto-char start) + (while (< (point) end) + (when (re-search-forward "^3 \\(.+\\)$" (point-max) "to_end") + (beginning-of-line) + (unless (> (point) end) + (setq d2t-set-show-alist + (append d2t-set-show-alist + (list (cons (match-string 1) (point-marker)))))) + (forward-line 1))) ))) + + +(defun d2t-get-functions () + "Find all functions in the doc." + (and d2t-verbose (message " Doing d2t-get-functions ...")) + (let (begin end) + (save-excursion ; determine bounds of functions + (when (re-search-forward "^3 Functions" (point-max) "to_end") + (beginning-of-line) + (setq begin (point-marker)) + (forward-line 1) + (when (re-search-forward "^3 " (point-max) "to_end") + (beginning-of-line) + (setq end (point-marker)))) + (goto-char begin) + (while (< (point) end) + (when (re-search-forward "^4 \\(.+\\)$" (point-max) "to_end") + (beginning-of-line) + (unless (> (point) end) + (setq d2t-functions-alist + (append d2t-functions-alist + (list (cons (match-string 1) (point-marker)))))) + (forward-line 1))) ))) + +;; buffer manipulation functions + +;; this can probably be made faster using a let-scoped alist rather +;; than the big cons block +(defun d2t-sectioning () + "Find all lines starting with a number. +These are chapters, sections, etc. Delete these lines and insert the +appropriate sectioning and @node commands." + (and d2t-verbose (message " Doing d2t-sectioning ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "^\\([1-9]\\) +\\(.+\\)$" (point-max) "to_end") + (unless (eobp) + (let* ((number (match-string 1)) + (word (match-string 2)) + (node (substitute ?_ ? word :test 'char-equal)) + (eol (save-excursion (end-of-line) (point-marker)))) + ;; some node names appear twice. make the second one unique. + ;; this will fail to work if a third pops up in the future! + (if (member* node d2t-node-list :test 'string=) + (setq node (concat node "_"))) + (setq d2t-node-list (append d2t-node-list (list node))) + (beginning-of-line) + (delete-region (point-marker) eol) + (if (string-match "[1-4]" number) (insert "\n@node " node "\n")) + (cond ((string= number "1") + (insert "@chapter " word "\n")) + ((string= number "2") + (insert "@section " word "\n")) + ((string= number "3") + (insert "@subsection " word "\n")) + ((string= number "4") + (insert "@subsubsection " word "\n")) + (t + (insert "\n\n@noindent --- " (upcase word) " ---\n")) ) ))))) + +(defun d2t-indexing () + "Find all lines starting with a question mark. +These are index references. Delete these lines and insert the +appropriate indexing commands. Only index one word ? entries, +comment out the multi-word ? entries." + (and d2t-verbose (message " Doing d2t-indexing ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "^\\\?\\([^ \n]+\\) *$" (point-max) "to_end") + (unless (eobp) + (let ((word (match-string 1)) + (eol (save-excursion (end-of-line) (point-marker)))) + (beginning-of-line) + (delete-region (point-marker) eol) + (insert "@cindex " word "\n") + (cond ((assoc word d2t-commands-alist) + (insert "@cmindex " word "\n\n")) + ((assoc word d2t-set-show-alist) + (insert "@opindex " word "\n\n")) + ((assoc word d2t-terminals-alist) + (insert "@tmindex " word "\n\n")) + ((assoc word d2t-functions-alist) + (insert "@findex " word "\n\n"))) ))) + (goto-char (point-min)) + (while (not (eobp)) + (re-search-forward "^\\\?" (point-max) "to_end") + (unless (eobp) + (if (looking-at "functions? \\(tm_\\w+\\)") + (progn + (beginning-of-line) + (insert "@findex " (match-string 1) "\n@c ")) + (beginning-of-line) + (insert "@c ")))) )) + +(defun d2t-comments () + "Delete comments and lines beginning with # or %. +# and % lines are used in converting tables into various formats." + (and d2t-verbose (message " Doing d2t-comments ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "^[C#%]" (point-max) "to_end") + (unless (eobp) + (let ((eol (save-excursion (end-of-line) + (forward-char 1) + (point-marker)))) + (beginning-of-line) + (delete-region (point-marker) eol) ))))) + +(defun d2t-first-column () + "Justify normal text to the 0th column. +This must be run before `d2t-enclose-examples'. +This is rather slow since there are almost 9000 lines of text." + (and d2t-verbose (message " Doing d2t-first-column ...")) + (save-excursion + (while (not (eobp)) + (and (char-equal (char-after (point)) ? ) + (delete-char 1)) + (forward-line)))) + +(defun d2t-braces-atsigns () + "Prepend @ to @, {, or } everywhere in the doc. +This MUST be the first conversion function called in +`d2t-doc-to-texi'." + (and d2t-verbose (message " Doing d2t-braces-atsigns ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "[@{}]" (point-max) "to_end") + (unless (eobp) + (backward-char 1) + (insert "@") + (forward-char 1))))) + +(defun d2t-tables () + "Remove @start table and @end table tags. +These will be made into @example's by `d2t-enclose-examples'. +Thus, the plain text formatting already in the doc is used." + (and d2t-verbose (message " Doing d2t-tables ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "^ *@+start table" (point-max) "to_end") + (unless (eobp) + (let ((eol (save-excursion (end-of-line) (point-marker)))) + (beginning-of-line) + (delete-region (point-marker) eol)))) + ;;(insert "@example") + (goto-char (point-min)) + (while (not (eobp)) + (re-search-forward "^ *@+end table" (point-max) "to_end") + (unless (eobp) + (let ((eol (save-excursion (end-of-line) (point-marker)))) + (beginning-of-line) + (delete-region (point-marker) eol)))))) + ;;(insert "@end example") + + +(defun d2t-enclose-examples () + "Turn indented text in the doc into @examples. +This must be run after `d2t-first-column'." + (and d2t-verbose (message " Doing d2t-enclose-examples ...")) + (save-excursion + (while (not (eobp)) + (re-search-forward "^ +[^ \n]" (point-max) "to_end") + (unless (eobp) + (beginning-of-line) + (insert "@example\n") + (forward-line 1) + (re-search-forward "^[^ ]" (point-max) "to_end") + (beginning-of-line) + (insert "@end example\n\n") )))) + +(defun d2t-handle-html () + "Deal with all of the html markup in the doc." + (and d2t-verbose (message " Doing d2t-handle-html ...")) + (save-excursion + (while (not (eobp)) + (let ((rx (concat "^" (regexp-quote "^") + " *\\(\\s-*" ; url + "\\([^<]+\\)" ; text + "[ \t]*\\^?" ; closing tag + )) + (replace-match (concat "@uref{" + (match-string 1) + "," + (remove* ?^ (match-string 2) + :test 'char-equal) + "}")))) + ;; translate
to @itemize environment + ((and (string= bracket "<") (string-match "^ul" tag)) + (delete-region (point) eol) + (insert "\n@itemize @bullet")) + ((and (string= bracket "<") (string-match "/ul" tag)) + (delete-region (point) eol) + (insert "@end itemize\n")) + ;; list items + ((and (string= bracket "<") (string-match "^li" tag)) + (delete-char 5) + (delete-horizontal-space) + (insert "@item\n")) + ;; fix up a few miscellaneous things + (t ;;(looking-at ".*Terminal Types") + (insert "@c ")) ) + (forward-line))) )))) + + +(defvar d2t-dont-make-ref + "^fit f\(x\)\\|gnuplot\\|help\\s-+plotting") +(defun d2t-make-refs () + "Make cross-references in the text." + (and d2t-verbose (message " Doing d2t-make-refs ...")) + (let ((big-alist (append d2t-level-1-alist + d2t-level-2-alist + d2t-level-3-alist + d2t-level-4-alist))) + (save-excursion + (while (not (eobp)) + (re-search-forward "\\(`\\([^`]+\\)`\\)" (point-max) "to_end") + (unless (eobp) + (let* ((b (match-beginning 1)) + (e (match-end 1)) + (list (split-string (match-string 2))) + (last (car (reverse list))) + (text (concat "@ref{" last "}"))) + ;;(message "%s %s" (match-string 1) last) + (when (and (equal t (try-completion last big-alist)) + (not (string= last "gnuplot"))) + (delete-region b e) + (insert text)))) + )))) + +;;; doc2texi.el ends here diff -urN gnuplot-3.7/docs/doc2texi.pl gnuplot-3.7.1/docs/doc2texi.pl --- gnuplot-3.7/docs/doc2texi.pl Wed Apr 15 20:16:44 1998 +++ gnuplot-3.7.1/docs/doc2texi.pl Wed Apr 15 20:16:44 1998 @@ -1,6 +1,6 @@ #!/usr/local/bin/perl # -# $Id: doc2texi.pl,v 1.5 1996/12/08 12:29:25 drd Exp $ +# $Id: doc2texi.pl,v 1.1.1.1 1998/04/15 19:16:44 lhecking Exp $ # # doc2texi.pl : Converts Gnuplot .doc files to Texinfo format. # diff -urN gnuplot-3.7/docs/doc2x.h gnuplot-3.7.1/docs/doc2x.h --- gnuplot-3.7/docs/doc2x.h Tue Nov 3 12:47:36 1998 +++ gnuplot-3.7.1/docs/doc2x.h Tue Nov 3 12:47:36 1998 @@ -1,5 +1,5 @@ /* - * $Id: $ + * $Id: doc2x.h,v 1.3 1998/11/03 12:47:36 lhecking Exp $ * */ diff -urN gnuplot-3.7/docs/gnuplot.doc gnuplot-3.7.1/docs/gnuplot.doc --- gnuplot-3.7/docs/gnuplot.doc Tue Dec 22 19:43:00 1998 +++ gnuplot-3.7.1/docs/gnuplot.doc Wed Oct 27 11:10:16 1999 @@ -1,4 +1,4 @@ -C RCS $Id: gnuplot.doc,v 1.64 1998/06/18 14:59:14 ddenholm Exp $ +C RCS $Id: gnuplot.doc,v 1.20.2.3 1999/10/27 10:10:16 lhecking Exp $ C 3 December 1998 C Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley C @@ -129,7 +129,7 @@ The new `gnuplot` user should begin by reading about `plotting` (if on-line, type `help plotting`). -^ Simple Plots Demo +^ Simple Plots Demo 2 Seeking-assistance ?seeking-assistance There is a mailing list for `gnuplot` users. Note, however, that the @@ -158,12 +158,13 @@ ^ Before seeking help, please check the -^ +^ FAQ (Frequently Asked Questions) list. ^ If you do not have a copy of the FAQ, you may request a copy by email from the Majordomo address above, ftp a copy from - ftp://ftp.dartmouth.edu/pub/gnuplot + ftp://ftp.ucc.ie/pub/gnuplot/faq, + ftp://ftp.gnuplot.vt.edu/pub/gnuplot/faq, or see the WWW `gnuplot` page. When posting a question, please include full details of the version of @@ -184,7 +185,7 @@ 3. `set timefmt` allows for the use of dates as input and output for time series plots. See `Time/Date data` and -^ +^ timedat.dem. ^ @@ -529,8 +530,8 @@ #\mbox{imag}(x)^{2}}}$ \\ %abs(x)@any@absolute value of $x$, $|x|$; same type %abs(x)@complex@length of $x$, $sqrt{roman real (x) sup 2 + roman imag (x) sup 2}$ - The `abs` function returns the absolute value of its argument. The returned - value is of the same type as the argument. + The `abs(x)` function returns the absolute value of its argument. The + returned value is of the same type as the argument. For complex arguments, abs(x) is defined as the length of x in the complex plane [i.e., sqrt(real(x)**2 + imag(x)**2) ]. @@ -540,24 +541,24 @@ ?acos #acos(x) & any & $\cos^{-1} x$ (inverse cosine) \\ %acos(x)@any@$cos sup -1 x$ (inverse cosine) - The `acos` function returns the arc cosine (inverse cosine) of its argument. - `acos` returns its argument in radians or degrees, as selected by `set - angles`. + The `acos(x)` function returns the arc cosine (inverse cosine) of its + argument. `acos` returns its argument in radians or degrees, as selected by + `set angles`. 4 acosh ?expressions functions acosh ?functions acosh ?acosh #acosh(x) & any & $\cosh^{-1} x$ (inverse hyperbolic cosine) in radians \\ %acosh(x)@any@$cosh sup -1 x$ (inverse hyperbolic cosine) in radians - The `acosh` function returns the inverse hyperbolic cosine of its argument in - radians. + The `acosh(x)` function returns the inverse hyperbolic cosine of its argument + in radians. 4 arg ?expressions functions arg ?functions arg ?arg #arg(x) & complex & the phase of $x$ \\ %arg(x)@complex@the phase of $x$ - The `arg` function returns the phase of a complex number in radians or + The `arg(x)` function returns the phase of a complex number in radians or degrees, as selected by `set angles`. 4 asin ?expressions functions asin @@ -565,7 +566,7 @@ ?asin #asin(x) & any & $\sin^{-1} x$ (inverse sin) \\ %asin(x)@any@$sin sup -1 x$ (inverse sin) - The `asin` function returns the arc sin (inverse sin) of its argument. + The `asin(x)` function returns the arc sin (inverse sin) of its argument. `asin` returns its argument in radians or degrees, as selected by `set angles`. 4 asinh @@ -574,7 +575,7 @@ ?asinh #asinh(x) & any & $\sinh^{-1} x$ (inverse hyperbolic sin) in radians \\ %asinh(x)@any@$sinh sup -1 x$ (inverse hyperbolic sin) in radians - The `asinh` function returns the inverse hyperbolic sin of its argument in + The `asinh(x)` function returns the inverse hyperbolic sin of its argument in radians. 4 atan ?expressions functions atan @@ -582,7 +583,7 @@ ?atan #atan(x) & any & $\tan^{-1} x$ (inverse tangent) \\ %atan(x)@any@$tan sup -1 x$ (inverse tangent) - The `atan` function returns the arc tangent (inverse tangent) of its + The `atan(x)` function returns the arc tangent (inverse tangent) of its argument. `atan` returns its argument in radians or degrees, as selected by `set angles`. 4 atan2 @@ -591,24 +592,24 @@ ?atan2 #atan2(y,x) & int or real & $\tan^{-1} (y/x)$ (inverse tangent) \\ %atan2(y,x)@int or real@$tan sup -1 (y/x)$ (inverse tangent) - The `atan2` function returns the arc tangent (inverse tangent) of the ratio - of the real parts of its arguments. `atan2` returns its argument in radians - or degrees, as selected by `set angles`, in the correct quadrant. + The `atan2(y,x)` function returns the arc tangent (inverse tangent) of the + ratio of the real parts of its arguments. `atan2` returns its argument in + radians or degrees, as selected by `set angles`, in the correct quadrant. 4 atanh ?expressions functions atanh ?functions atanh -?atan +?atanh #atanh(x) & any & $\tanh^{-1} x$ (inverse hyperbolic tangent) in radians \\ %atanh(x)@any@$tanh sup -1 x$ (inverse hyperbolic tangent) in radians - The `atanh` function returns the inverse hyperbolic tangent of its argument - in radians. + The `atanh(x)` function returns the inverse hyperbolic tangent of its + argument in radians. 4 besj0 ?expressions functions besj0 ?functions besj0 ?besj0 #besj0(x) & int or real & $j_{0}$ Bessel function of $x$, in radians \\ %besj0(x)@int or real@$j sub 0$ Bessel function of $x$, in radians - The `besj0` function returns the j0th Bessel function of its argument. + The `besj0(x)` function returns the j0th Bessel function of its argument. `besj0` expects its argument to be in radians. 4 besj1 ?expressions functions besj1 @@ -616,7 +617,7 @@ ?besj1 #besj1(x) & int or real & $j_{1}$ Bessel function of $x$, in radians \\ %besj1(x)@int or real@$j sub 1$ Bessel function of $x$, in radians - The `besj1` function returns the j1st Bessel function of its argument. + The `besj1(x)` function returns the j1st Bessel function of its argument. `besj1` expects its argument to be in radians. 4 besy0 ?expressions functions besy0 @@ -632,7 +633,7 @@ ?besy1 #besy1(x) & int or real & $y_{1}$ Bessel function of $x$, in radians \\ %besy1(x)@int or real@$y sub 1$ Bessel function of $x$, in radians - The `besy1` function returns the y1st Bessel function of its argument. + The `besy1(x)` function returns the y1st Bessel function of its argument. `besy1` expects its argument to be in radians. 4 ceil ?expressions functions ceil @@ -641,7 +642,7 @@ #ceil(x) & any & $\lceil x \rceil$, smallest integer not less than $x$ #(real part) \\ %ceil(x)@any@$left ceiling x right ceiling$, smallest integer not less than $x$ (real part) - The `ceil` function returns the smallest integer that is not less than its + The `ceil(x)` function returns the smallest integer that is not less than its argument. For complex numbers, `ceil` returns the smallest integer not less than the real part of its argument. 4 cos @@ -650,7 +651,7 @@ ?cos #cos(x) & any & $\cos x$, cosine of $x$ \\ %cos(x)@radians@$cos~x$, cosine of $x$ - The `cos` function returns the cosine of its argument. `cos` accepts its + The `cos(x)` function returns the cosine of its argument. `cos` accepts its argument in radians or degrees, as selected by `set angles`. 4 cosh ?expressions functions cosh @@ -658,7 +659,7 @@ ?cosh #cosh(x) & any & $\cosh x$, hyperbolic cosine of $x$ in radians \\ %cosh(x)@any@$cosh~x$, hyperbolic cosine of $x$ in radians - The `cosh` function returns the hyperbolic cosine of its argument. `cosh` + The `cosh(x)` function returns the hyperbolic cosine of its argument. `cosh` expects its argument to be in radians. 4 erf ?expressions functions erf @@ -666,7 +667,7 @@ ?erf #erf(x) & any & $\mbox{erf}(\mbox{real}(x))$, error function of real($x$) \\ %erf(x)@any@$erf ( roman real (x))$, error function of real ($x$) - The `erf` function returns the error function of the real part of its + The `erf(x)` function returns the error function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. 4 erfc @@ -675,8 +676,8 @@ ?erfc #erfc(x) & any & $\mbox{erfc}(\mbox{real}(x))$, 1.0 - error function of real($x$) \\ %erfc(x)@any@$erfc ( roman real (x))$, 1.0 - error function of real ($x$) - The `erfc` function returns 1.0 - the error function of the real part of its - argument. If the argument is a complex value, the imaginary component is + The `erfc(x)` function returns 1.0 - the error function of the real part of + its argument. If the argument is a complex value, the imaginary component is ignored. 4 exp ?expressions functions exp @@ -684,7 +685,7 @@ ?exp #exp(x) & any & $e^{x}$, exponential function of $x$ \\ %exp(x)@any@$e sup x$, exponential function of $x$ - The `exp` function returns the exponential function of its argument (`e` + The `exp(x)` function returns the exponential function of its argument (`e` raised to the power of its argument). On some implementations (notably suns), exp(-x) returns undefined for very large x. A user-defined function like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases. @@ -695,7 +696,7 @@ #floor(x) & any & $\lfloor x \rfloor$, largest integer not greater #than $x$ (real part) \\ %floor(x)@any@$left floor x right floor$, largest integer not greater than $x$ (real part) - The `floor` function returns the largest integer not greater than its + The `floor(x)` function returns the largest integer not greater than its argument. For complex numbers, `floor` returns the largest integer not greater than the real part of its argument. 4 gamma @@ -704,7 +705,7 @@ ?gamma #gamma(x) & any & $\mbox{gamma}(\mbox{real}(x))$, gamma function of real($x$) \\ %gamma(x)@any@$GAMMA ( roman real (x))$, gamma function of real ($x$) - The `gamma` function returns the gamma function of the real part of its + The `gamma(x)` function returns the gamma function of the real part of its argument. For integer n, gamma(n+1) = n!. If the argument is a complex value, the imaginary component is ignored. 4 ibeta @@ -713,16 +714,16 @@ ?ibeta #ibeta(p,q,x) & any & $\mbox{ibeta}(\mbox{real}(p,q,x))$, ibeta function of real($p$,$q$,$x$) \\ %ibeta(p,q,x)@any@$ibeta ( roman real (p,q,x))$, ibeta function of real ($p$,$q$,$x$) - The `ibeta` function returns the incomplete beta function of the real parts - of its arguments. p, q > 0 and x in [0:1]. If the arguments are complex, - the imaginary components are ignored. + The `ibeta(p,q,x)` function returns the incomplete beta function of the real + parts of its arguments. p, q > 0 and x in [0:1]. If the arguments are + complex, the imaginary components are ignored. 4 inverf ?expressions functions inverf ?functions inverf ?inverf #inverf(x) & any & inverse error function of real($x$) \\ %inverf(x)@any@inverse error function real($x$) - The `inverf` function returns the inverse error function of the real part + The `inverf(x)` function returns the inverse error function of the real part of its argument. 4 igamma ?expressions functions igamma @@ -730,7 +731,7 @@ ?igamma #igamma(a,x) & any & $\mbox{igamma}(\mbox{real}(a,x))$, igamma function of real($a$,$x$) \\ %igamma(a,x)@any@$igamma ( roman real (a,x))$, igamma function of real ($a$,$x$) - The `igamma` function returns the incomplete gamma function of the real + The `igamma(a,x)` function returns the incomplete gamma function of the real parts of its arguments. a > 0 and x >= 0. If the arguments are complex, the imaginary components are ignored. 4 imag @@ -739,7 +740,7 @@ ?imag #imag(x) & complex & imaginary part of $x$ as a real number \\ %imag(x)@complex@imaginary part of $x$ as a real number - The `imag` function returns the imaginary part of its argument as a real + The `imag(x)` function returns the imaginary part of its argument as a real number. 4 invnorm ?expressions functions invnorm @@ -747,7 +748,7 @@ ?invnorm #invnorm(x) & any & inverse normal distribution function of real($x$) \\ %invnorm(x)@any@inverse normal distribution function real($x$) - The `invnorm` function returns the inverse normal distribution function of + The `invnorm(x)` function returns the inverse normal distribution function of the real part of its argument. 4 int ?expressions functions int @@ -755,7 +756,7 @@ ?int #int(x) & real & integer part of $x$, truncated toward zero \\ %int(x)@real@integer part of $x$, truncated toward zero - The `int` function returns the integer part of its argument, truncated + The `int(x)` function returns the integer part of its argument, truncated toward zero. 4 lgamma ?expressions functions lgamma @@ -763,7 +764,7 @@ ?lgamma #lgamma(x) & any & $\mbox{lgamma}(\mbox{real}(x))$, lgamma function of real($x$) \\ %lgamma(x)@any@$lgamma ( roman real (x))$, lgamma function of real ($x$) - The `lgamma` function returns the natural logarithm of the gamma function + The `lgamma(x)` function returns the natural logarithm of the gamma function of the real part of its argument. If the argument is a complex value, the imaginary component is ignored. 4 log @@ -772,21 +773,22 @@ ?log #log(x) & any & $\log_{e} x$, natural logarithm (base $e$) of $x$ \\ %log(x)@any@$ln~x$, natural logarithm (base $e$) of $x$ - The `log` function returns the natural logarithm (base `e`) of its argument. + The `log(x)` function returns the natural logarithm (base `e`) of its + argument. 4 log10 ?expressions functions log10 ?functions log10 ?log10 #log10(x) & any & $\log_{10} x$, logarithm (base $10$) of $x$ \\ %log10(x)@any@${log sub 10}~x$, logarithm (base $10$) of $x$ - The `log10` function returns the logarithm (base 10) of its argument. + The `log10(x)` function returns the logarithm (base 10) of its argument. 4 norm ?expressions functions norm ?functions norm ?norm #norm(x) & any & normal distribution (Gaussian) function of real($x$) \\ %norm(x)@any@$norm(x)$, normal distribution function of real($x$) - The `norm` function returns the normal distribution function (or Gaussian) + The `norm(x)` function returns the normal distribution function (or Gaussian) of the real part of its argument. 4 rand ?expressions functions rand @@ -794,7 +796,7 @@ ?rand #rand(x) & any & $\mbox{rand}(\mbox{real}(x))$, pseudo random number generator \\ %rand(x)@any@$rand ( roman real (x))$, pseudo random number generator - The `rand` function returns a pseudo random number in the interval [0:1] + The `rand(x)` function returns a pseudo random number in the interval [0:1] using the real part of its argument as a seed. If seed < 0, the sequence is (re)initialized. If the argument is a complex value, the imaginary component is ignored. @@ -804,23 +806,23 @@ ?real #real(x) & any & real part of $x$ \\ %real(x)@any@real part of $x$ - The `real` function returns the real part of its argument. + The `real(x)` function returns the real part of its argument. 4 sgn ?expressions functions sgn ?functions sgn ?sgn #sgn(x) & any & 1 if $x>0$, -1 if $x<0$, 0 if $x=0$. imag($x$) ignored \\ %sgn(x)@any@1 if $x > 0$, -1 if $x < 0$, 0 if $x = 0$. $roman imag (x)$ ignored - The `sgn` function returns 1 if its argument is positive, -1 if its argument - is negative, and 0 if its argument is 0. If the argument is a complex value, - the imaginary component is ignored. + The `sgn(x)` function returns 1 if its argument is positive, -1 if its + argument is negative, and 0 if its argument is 0. If the argument is a + complex value, the imaginary component is ignored. 4 sin ?expressions functions sin ?functions sin ?sin #sin(x) & any & $\sin x$, sine of $x$ \\ %sin(x)@any@$sin~x$, sine of $x$ - The `sin` function returns the sine of its argument. `sin` expects its + The `sin(x)` function returns the sine of its argument. `sin` expects its argument to be in radians or degrees, as selected by `set angles`. 4 sinh ?expressions functions sinh @@ -828,7 +830,7 @@ ?sinh #sinh(x) & any & $\sinh x$, hyperbolic sine $x$ in radians \\ %sinh(x)@any@$sinh~x$, hyperbolic sine $x$ in radians - The `sinh` function returns the hyperbolic sine of its argument. `sinh` + The `sinh(x)` function returns the hyperbolic sine of its argument. `sinh` expects its argument to be in radians. 4 sqrt ?expressions functions sqrt @@ -836,14 +838,14 @@ ?sqrt #sqrt(x) & any & $\sqrt{x}$, square root of $x$ \\ %sqrt(x)@any@$sqrt x $, square root of $x$ - The `sqrt` function returns the square root of its argument. + The `sqrt(x)` function returns the square root of its argument. 4 tan ?expressions functions tan ?functions tan ?tan #tan(x) & any & $\tan x$, tangent of $x$ \\ %tan(x)@any@$tan~x$, tangent of $x$ - The `tan` function returns the tangent of its argument. `tan` expects + The `tan(x)` function returns the tangent of its argument. `tan` expects its argument to be in radians or degrees, as selected by `set angles`. 4 tanh ?expressions functions tanh @@ -851,7 +853,7 @@ ?tanh #tanh(x) & any & $\tanh x$, hyperbolic tangent of $x$ in radians\\ %tanh(x)@any@$tanh~x$, hyperbolic tangent of $x$ in radians - The `tanh` function returns the hyperbolic tangent of its argument. `tanh` + The `tanh(x)` function returns the hyperbolic tangent of its argument. `tanh` expects its argument to be in radians. @end table @@ -940,7 +942,7 @@ `valid(x)` may be used only in expressions as part of `using` manipulations to fits or datafile plots. See `plot datafile using`. @end table -^ Use of functions and complex variables for airfoils +^ Use of functions and complex variables for airfoils 3 Operators ?expressions operators ?operators @@ -2202,7 +2204,7 @@ every :::::9 # selects the first 10 blocks every 2:2 # selects every other point in every other block every ::5::15 # selects points 5 through 15 in each block -^ Simple Plot Demos , +^ Simple Plot Demos , ^ Non-parametric splot demos , and ^ Parametric splot demos. 4 example datafile @@ -2250,7 +2252,7 @@ Example: plot 'file' index 4:5 -^ splot with indices demo. +^ splot with indices demo. 4 smooth ?commands plot datafile smooth ?plot datafile smooth @@ -2357,7 +2359,7 @@ The `unique` option makes the data monotonic in x; points with the same x-value are replaced by a single point having the average y-value. The resulting points are then connected by straight line segments. -^ See demos. +^ See demos. 4 special-filenames ?commands plot datafile special-filenames ?plot datafile special-filenames @@ -2570,7 +2572,7 @@ However, if you want to leave text in your data files, it is safer to put the comment character (#) in the first column of the text lines. -^ Feeble using demos. +^ Feeble using demos. 3 errorbars ?commands plot errorbars ?commands splot errorbars @@ -2642,7 +2644,7 @@ parametric function has been completed: plot sin(t),t**2 title 'Parametric example' with linespoints -^ Parametric Mode Demos. +^ Parametric Mode Demos. 3 ranges ?commands plot ranges ?commands splot ranges @@ -2939,7 +2941,7 @@ set explicitly to guarantee that the five separate graphs (drawn on top of each other in multiplot mode) will have exactly the same axes. The linetype must be specified; otherwise all the plots would be drawn with the same type. -^ Reread Animation Demo +^ Reread Animation Demo 2 reset ?commands reset ?reset @@ -3029,7 +3031,7 @@ y=sinh(x) print y #prints {1.16933, 0.154051} print asinh(y) #prints {57.29578, 5.729578} -^ Polar plot using `set angles`. +^ Polar plot using `set angles`. 3 arrow ?commands set arrow ?commands set noarrow @@ -3216,7 +3218,7 @@ Explicitly setting one or two ranges but not others may lead to unexpected results. -^ See polar demos +^ See polar demos 3 bar ?commands set bar ?commands show bar @@ -3292,7 +3294,10 @@ Using the optional , and specifiers, the way the border lines are drawn can be influenced - (limited by what the current terminal driver supports). + (limited by what the current terminal driver supports). By default, + the border is drawn with twice the usual linewidth. The + specifier scales this default value; for example, `set border 15 lw 2` + will produce a border with four times the usual linewidth. Various axes or combinations of axes may be added together in the command. @@ -3513,8 +3518,8 @@ See also `set contour` for control of where the contours are drawn, and `set clabel` for control of the format of the contour labels and linetypes. -^ Contours Demo and -^ contours with User Defined Levels. +^ Contours Demo and +^ contours with User Defined Levels. 3 contour ?commands set contour ?commands set nocontour @@ -3564,8 +3569,8 @@ If contours are desired from non-grid data, `set dgrid3d` can be used to create an appropriate grid. See `set dgrid3d` for more information. -^ Contours Demo and -^ contours with User Defined Levels. +^ Contours Demo and +^ contours with User Defined Levels. 3 data style ?commands set data style ?commands show data style @@ -3641,7 +3646,7 @@ The first specifies that a grid of size 10 by 10 is to be constructed using a norm value of 1 in the weight computation. The second only modifies the norm, changing it to 4. -^ Dgrid3d Demo. +^ Dgrid3d Demo. 3 dummy ?commands set dummy @@ -3727,7 +3732,7 @@ after each number. If you want "%" itself, double it: "%g %%". See also `set xtics` for more information about tic labels. -^ See demo. +^ See demo. 4 format specifiers ?commands set format specifiers ?set format specifiers @@ -3948,8 +3953,8 @@ For information about the definition and usage of functions in `gnuplot`, please see `expressions`. -^ Splines as User Defined Functions. -^ Use of functions and complex variables for airfoils +^ Splines as User Defined Functions. +^ Use of functions and complex variables for airfoils 3 grid ?commands set grid ?commands set nogrid @@ -3992,6 +3997,10 @@ If no linetype is specified for the minor gridlines, the same linetype as the major gridlines is used. The default polar angle is 30 degrees. + By default, grid lines are drawn with half the usual linewidth. The major and + minor linewidth specifiers scale this default value; for example, `set grid + lw .5` will draw grid lines with one quarter the usual linewidth. + Z grid lines are drawn on the back of the plot. This looks better if a partial box is drawn around the plot---see `set border`. 3 hidden3d @@ -4100,8 +4109,8 @@ normally, making the resulting display hard to understand. Therefore, the default option of `bentover` will turn it visible in this case. If you don't want that, you may choose `nobentover` instead. -^ Hidden Line Removal Demo and -^ Complex Hidden Line Demo. +^ Hidden Line Removal Demo and +^ Complex Hidden Line Demo. 3 isosamples ?commands set isosamples ?commands show isosamples @@ -4482,17 +4491,15 @@ necessary if the data in the file are not in the required order. `mapping` has no effect on `plot`. -^ Mapping Demos. +^ Mapping Demos. 3 margin ?commands set margin ?commands show margin ?set margin ?show margin ?margin - Normally the margins of a plot are automatically calculated based on tics - and axis labels (and the size of the graph correspondingly adjusted.) These - computed values can be overridden by the `set margin` commands. `show margin` - shows the current settings. + The computed margins can be overridden by the `set margin` commands. `show + margin` shows the current settings. Syntax: set bmargin {} @@ -4504,6 +4511,14 @@ The units of are character heights or widths, as appropriate. A positive value defines the absolute size of the margin. A negative value (or none) causes `gnuplot` to revert to the computed value. + + Normally the margins of a plot are automatically calculated based on tics, + tic labels, axis labels, the plot title, the timestamp and the size of the + key if it is outside the borders. If, however, tics are attached to the + axes (`set xtics axis`, for example), neither the tics themselves nor their + labels will be included in either the margin calculation or the calculation + of the positions of other text to be written in the margin. This can lead + to tic labels overwriting other text if the axis is very close to the border. 3 missing ?commands set missing ?set missing @@ -4583,7 +4598,7 @@ in character units, so the appearance of the graph in the remaining space will depend on the screen size of the display device, e.g., perhaps quite different on a video display and a printer. -^ See demo. +^ See demo. 3 mx2tics ?commands set mx2tics ?commands set nomx2tics @@ -4876,8 +4891,8 @@ You may want to `set size square` to have `gnuplot` try to make the aspect ratio equal to unity, so that circles look circular. -^ Polar demos -^ Polar Data Plot. +^ Polar demos +^ Polar Data Plot. 3 rmargin ?commands set rmargin ?set rmargin @@ -4975,7 +4990,7 @@ To make the graph twice as high as wide use: set size ratio 2 -^ See demo. +^ See demo. 3 style ?commands set function style ?commands show function style @@ -5126,7 +5141,7 @@ The `fsteps` style is only relevant to 2-d plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x1,y2) and the second from (x1,y2) to (x2,y2). -^ See demo. +^ See demo. 4 histeps ?commands set style histeps ?set style histeps @@ -5141,7 +5156,7 @@ If `autoscale` is in effect, it selects the xrange from the data rather than the steps, so the end points will appear only half as wide as the others. -^ See demo. +^ See demo. `histeps` is only a plotting style; `gnuplot` does not have the ability to create bins and determine their population from some data set. @@ -5189,7 +5204,7 @@ The `steps` style is only relevant to 2-d plotting. It connects consecutive points with two line segments: the first from (x1,y1) to (x2,y1) and the second from (x2,y1) to (x2,y2). -^ See demo. +^ See demo. 4 vector ?commands set style vector ?set style vector @@ -5474,7 +5489,7 @@ tells `gnuplot` to read date and time separated by tab. (But look closely at your data---what began as a tab may have been converted to spaces somewhere along the line; the format string must match what is actually in the file.) -^ Time Data Demo +^ Time Data Demo 3 title ?commands set title ?commands show title @@ -5903,20 +5918,26 @@ The same syntax applies to `ytics`, `ztics`, `x2tics` and `y2tics`. `axis` or `border` tells `gnuplot` to put the tics (both the tics themselves - and the accompanying labels) along the axis or the border, respectively. - `mirror` tells it to put unlabelled tics at the same positions on the - opposite border. `nomirror` does what you think it does. `rotate` asks - `gnuplot` to rotate the text through 90 degrees, if the underlying terminal - driver supports text rotation. `norotate` cancels this. The defaults are - `border mirror norotate` for tics on the x and y axes, and `border nomirror - norotate` for tics on the x2 and y2 axes. For the z axis, the the `{axis | - border}` option is not available and the default is `nomirror`. If you do - want to mirror the z-axis tics, you might want to create a bit more room for - them with `set border`. - - `set xtics` with no options restores the default border if xtics are not - being displayed; otherwise it has no effect. Any previously specified - tic frequency or position {and labels} are retained. + and the accompanying labels) along the axis or the border, respectively. If + the axis is very close to the border, the `axis` option can result in tic + labels overwriting other text written in the margin. + + `mirror` tells `gnuplot` to put unlabelled tics at the same positions on the + opposite border. `nomirror` does what you think it does. + + `rotate` asks `gnuplot` to rotate the text through 90 degrees, which will be + done if the terminal driver in use supports text rotation. `norotate` + cancels this. + + The defaults are `border mirror norotate` for tics on the x and y axes, and + `border nomirror norotate` for tics on the x2 and y2 axes. For the z axis, + the the `{axis | border}` option is not available and the default is + `nomirror`. If you do want to mirror the z-axis tics, you might want to + create a bit more room for them with `set border`. + + `set xtics` with no options restores the default border or axis if xtics are + being displayed; otherwise it has no effect. Any previously specified tic + frequency or position {and labels} are retained. Positions of the tics are calculated automatically by default or if the `autofreq` option is given; otherwise they may be specified in either of @@ -6384,7 +6405,7 @@ The `index` keyword is not supported, since the file format allows only one surface per file. The `every` and `using` filters are supported. `using` operates as if the data were read in the above triplet form. -^ Binary File Splot Demo. +^ Binary File Splot Demo. 4 example datafile ?commands splot datafile example ?splot datafile example diff -urN gnuplot-3.7/docs/gnuplot.texi gnuplot-3.7.1/docs/gnuplot.texi --- gnuplot-3.7/docs/gnuplot.texi Thu Jan 1 01:00:00 1970 +++ gnuplot-3.7.1/docs/gnuplot.texi Wed Oct 27 11:54:42 1999 @@ -0,0 +1,11148 @@ +\input texinfo @c -*-texinfo-*- + +@c %**start of header +@setfilename gnuplot.info +@settitle Gnuplot: An Interactive Plotting Program +@setchapternewpage odd +@c %**end of header + +@c define the command and options indeces +@defindex cm +@defindex op +@defindex tm + +@direntry +* GNUPLOT: (gnuplot). An Interactive Plotting Program +@end direntry + +@ifnottex +@node Top, gnuplot, (dir), (dir) +@top Master Menu +@end ifnottex + +@example + GNUPLOT + + An Interactive Plotting Program + Thomas Williams & Colin Kelley + Version 3.7 organized by: David Denholm + + Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley + + Mailing list for comments: info-gnuplot@@dartmouth.edu + Mailing list for bug reports: bug-gnuplot@@dartmouth.edu + + This manual was prepared by Dick Crawford + 3 December 1998 + + +Major contributors (alphabetic order): +@end example + +@c ^

An Interactive Plotting Program

+@c ^

Thomas Williams & Colin Kelley

+@c ^

Version 3.7 organized by: David Denholm

+@c ^

Major contributors (alphabetic order):

+ +@itemize @bullet +@item +Hans-Bernhard Broeker +@item +John Campbell +@item +Robert Cunningham +@item +David Denholm +@item +Gershon Elber +@item +Roger Fearick +@item +Carsten Grammes +@item +Lucas Hart +@item +Lars Hecking +@item +Thomas Koenig +@item +David Kotz +@item +Ed Kubaitis +@item +Russell Lang +@item +Alexander Lehmann +@item +Alexander Mai +@item +Carsten Steger +@item +Tom Tkacik +@item +Jos Van der Woude +@item +James R. Van Zandt +@item +Alex Woo +@end itemize + +@c ^

Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley

+@c ^ Mailing list for comments: info-gnuplot@@dartmouth.edu

+@c ^ Mailing list for bug reports: bug-gnuplot@@dartmouth.edu

+@c ^

+@c ^

This manual was prepared by Dick Crawford

+@c ^

3 December 1998

+@c ^


+ +@menu +* gnuplot:: +* Commands:: +* Graphical_User_Interfaces:: +* Bugs:: +* Concept_Index:: +* Command_Index:: +* Options_Index:: +* Function_Index:: +* Terminal_Index:: +@end menu + +@node gnuplot, Commands, Top, Top +@chapter gnuplot + + +@menu +* Copyright:: +* Introduction:: +* Seeking-assistance:: +* What's_New_in_version_3.7:: +* Batch/Interactive_Operation:: +* Command-line-editing:: +* Comments:: +* Coordinates:: +* Environment:: +* Expressions:: +* Glossary:: +* Plotting:: +* Start-up:: +* Substitution:: +* Syntax:: +* Time/Date_data:: +@end menu + +@node Copyright, Introduction, gnuplot, gnuplot +@section Copyright + +@cindex copyright + +@cindex license + +@example + Copyright (C) 1986 - 1993, 1998 Thomas Williams, Colin Kelley + +@end example + +Permission to use, copy, and distribute this software and its +documentation for any purpose with or without fee is hereby granted, +provided that the above copyright notice appear in all copies and +that both that copyright notice and this permission notice appear +in supporting documentation. + +Permission to modify the software is granted, but not the right to +distribute the complete modified source code. Modifications are to +be distributed as patches to the released version. Permission to +distribute binaries produced by compiling modified sources is granted, +provided you +@example + 1. distribute the corresponding source modifications from the + released version in the form of a patch file along with the binaries, + 2. add special version identification to distinguish your version + in addition to the base release version number, + 3. provide your name and address as the primary contact for the + support of your modified version, and + 4. retain our contact information in regard to use of the base + software. +@end example + +Permission to distribute the released version of the source code along +with corresponding source modifications in the form of a patch file is +granted with same provisions 2 through 4 for binary distributions. + +This software is provided "as is" without express or implied warranty +to the extent permitted by applicable law. + + +@example + AUTHORS + +@end example + +@example + Original Software: + Thomas Williams, Colin Kelley. + +@end example + +@example + Gnuplot 2.0 additions: + Russell Lang, Dave Kotz, John Campbell. + +@end example + +@example + Gnuplot 3.0 additions: + Gershon Elber and many others. + +@end example + +@node Introduction, Seeking-assistance, Copyright, gnuplot +@section Introduction + +@cindex introduction + +@c ? +`gnuplot` is a command-driven interactive function and data plotting program. +It is case sensitive (commands and function names written in lowercase are +not the same as those written in CAPS). All command names may be abbreviated +as long as the abbreviation is not ambiguous. Any number of commands may +appear on a line (with the exception that @ref{load} or @ref{call} must be the final +command), separated by semicolons (;). Strings are indicated with quotes. +They may be either single or double quotation marks, e.g., + +@example + load "filename" + cd 'dir' + +@end example + +although there are some subtle differences (see `syntax` for more details). + +Any command-line arguments are assumed to be names of files containing +`gnuplot` commands, with the exception of standard X11 arguments, which are +processed first. Each file is loaded with the @ref{load} command, in the order +specified. `gnuplot` exits after the last file is processed. When no load +files are named, `gnuplot` enters into an interactive mode. The special +filename "-" is used to denote standard input. See "help batch/interactive" +for more details. + +Many `gnuplot` commands have multiple options. These options must appear in +the proper order, although unwanted ones may be omitted in most cases. Thus +if the entire command is "command a b c", then "command a c" will probably +work, but "command c a" will fail. + +Commands may extend over several input lines by ending each line but the last +with a backslash (\). The backslash must be the _last_ character on each +line. The effect is as if the backslash and newline were not there. That +is, no white space is implied, nor is a comment terminated. Therefore, +commenting out a continued line comments out the entire command (see +`comment`). But note that if an error occurs somewhere on a multi-line +command, the parser may not be able to locate precisely where the error is +and in that case will not necessarily point to the correct line. + +In this document, curly braces (@{@}) denote optional arguments and a vertical +bar (|) separates mutually exclusive choices. `gnuplot` keywords or @ref{help} +topics are indicated by backquotes or `boldface` (where available). Angle +brackets (<>) are used to mark replaceable tokens. In many cases, a default +value of the token will be taken for optional arguments if the token is +omitted, but these cases are not always denoted with braces around the angle +brackets. + +For on-line help on any topic, type @ref{help} followed by the name of the topic +or just @ref{help} or `?` to get a menu of available topics. + +The new `gnuplot` user should begin by reading about `plotting` (if on-line, +type `help plotting`). +@uref{http://www.gnuplot.vt.edu/gnuplot/gpdocs/simple.html,Simple Plots Demo } + +@node Seeking-assistance, What's_New_in_version_3.7, Introduction, gnuplot +@section Seeking-assistance + +@cindex seeking-assistance + +There is a mailing list for `gnuplot` users. Note, however, that the +newsgroup +@example + comp.graphics.apps.gnuplot +@end example + +is identical to the mailing list (they both carry the same set of messages). +We prefer that you read the messages through the newsgroup rather than +subscribing to the mailing list. Administrative requests should be sent to +@example + majordomo@@dartmouth.edu +@end example + +Send a message with the body (not the subject) consisting of the single word +"help" (without the quotes) for more details. + +The address for mailing to list members is: +@example + info-gnuplot@@dartmouth.edu + +@end example + +Bug reports and code contributions should be mailed to: +@example + bug-gnuplot@@dartmouth.edu + +@end example + +The list of those interested in beta-test versions is: +@example + info-gnuplot-beta@@dartmouth.edu + +@end example + +There is also a World Wide Web page with up-to-date information, including +known bugs: +@uref{http://www.cs.dartmouth.edu/gnuplot_info.html,http://www.cs.dartmouth.edu/gnuplot_info.html +} + +Before seeking help, please check the +@uref{http://www.ucc.ie/gnuplot/gnuplot-faq.html,FAQ (Frequently Asked Questions) list. +} +If you do not have a copy of the FAQ, you may request a copy by email from +the Majordomo address above, ftp a copy from +@example + ftp://ftp.ucc.ie/pub/gnuplot/faq, + ftp://ftp.gnuplot.vt.edu/pub/gnuplot/faq, +@end example + +or see the WWW `gnuplot` page. + +When posting a question, please include full details of the version of +`gnuplot`, the machine, and operating system you are using. A _small_ script +demonstrating the problem may be useful. Function plots are preferable to +datafile plots. If email-ing to info-gnuplot, please state whether or not +you are subscribed to the list, so that users who use news will know to email +a reply to you. There is a form for such postings on the WWW site. + +@node What's_New_in_version_3.7, Batch/Interactive_Operation, Seeking-assistance, gnuplot +@section What's New in version 3.7 + +@cindex new-features + +Gnuplot version 3.7 contains many new features. This section gives a partial +list and links to the new items in no particular order. + +1. `fit f(x) 'file' via` uses the Marquardt-Levenberg method to fit data. +(This is only slightly different from the `gnufit` patch available for 3.5.) + +2. Greatly expanded @ref{using} command. See @ref{using}. + +3. @ref{timefmt} allows for the use of dates as input and output for time +series plots. See `Time/Date data` and +@uref{http://www.gnuplot.vt.edu/gnuplot/gpdocs/timedat.html,timedat.dem. +} + +4. Multiline labels and font selection in some drivers. + +5. Minor (unlabeled) tics. See @ref{mxtics}. + +6. @ref{key} options for moving the key box in the page (and even outside of the +plot), putting a title on it and a box around it, and more. See @ref{key}. + +7. Multiplots on a single logical page with @ref{multiplot}. + +8. Enhanced `postscript` driver with super/subscripts and font changes. +(This was a separate driver (`enhpost`) that was available as a patch for +3.5.) + +9. Second axes: use the top and right axes independently of the bottom and +left, both for plotting and labels. See @ref{plot}. + +10. Special datafile names `'-'` and `""`. See @ref{special-filenames}. + +11. Additional coordinate systems for labels and arrows. See `coordinates`. + +12. @ref{size} can try to plot with a specified aspect ratio. + +13. @ref{missing} now treats missing data correctly. + +14. The @ref{call} command: @ref{load} with arguments. + +15. More flexible `range` commands with `reverse` and `writeback` keywords. + +16. @ref{encoding} for multi-lingual encoding. + +17. New `x11` driver with persistent and multiple windows. + +18. New plotting styles: @ref{xerrorbars}, @ref{histeps}, @ref{financebars} and more. +See @ref{style}. + +19. New tic label formats, including `"%l %L"` which uses the mantissa and +exponents to a given base for labels. See `set format`. + +20. New drivers, including `cgm` for inclusion into MS-Office applications +and `gif` for serving plots to the WEB. + +21. Smoothing and spline-fitting options for @ref{plot}. See @ref{smooth}. + +22. @ref{margin} and @ref{origin} give much better control over where a +graph appears on the page. + +23. @ref{border} now controls each border individually. + +24. The new commands @ref{if} and @ref{reread} allow command loops. + +25. Point styles and sizes, line types and widths can be specified on the +@ref{plot} command. Line types and widths can also be specified for grids, +borders, tics and arrows. See @ref{with}. Furthermore these types may be +combined and stored for further use. See @ref{linestyle}. + +26. Text (labels, tic labels, and the time stamp) can be written vertically +by those terminals capable of doing so. + +@node Batch/Interactive_Operation, Command-line-editing, What's_New_in_version_3.7, gnuplot +@section Batch/Interactive Operation + +@cindex batch/interactive + +`gnuplot` may be executed in either batch or interactive modes, and the two +may even be mixed together on many systems. + +Any command-line arguments are assumed to be names of files containing +`gnuplot` commands (with the exception of standard X11 arguments, which are +processed first). Each file is loaded with the @ref{load} command, in the order +specified. `gnuplot` exits after the last file is processed. When no load +files are named, `gnuplot` enters into an interactive mode. The special +filename "-" is used to denote standard input. + +Both the @ref{exit} and @ref{quit} commands terminate the current command file and +@ref{load} the next one, until all have been processed. + +Examples: + +To launch an interactive session: +@example + gnuplot + +@end example + +To launch a batch session using two command files "input1" and "input2": +@example + gnuplot input1 input2 + +@end example + +To launch an interactive session after an initialization file "header" and +followed by another command file "trailer": +@example + gnuplot header - trailer + +@end example + +@node Command-line-editing, Comments, Batch/Interactive_Operation, gnuplot +@section Command-line-editing + +@cindex line-editing + +@cindex editing + +@cindex history + +@cindex command-line-editing + +Command-line editing is supported by the Unix, Atari, VMS, MS-DOS and OS/2 +versions of `gnuplot`. Also, a history mechanism allows previous commands to +be edited and re-executed. After the command line has been edited, a newline +or carriage return will enter the entire line without regard to where the +cursor is positioned. + +(The readline function in `gnuplot` is not the same as the readline used in +GNU Bash and GNU Emacs. If the GNU version is desired, it may be selected +instead of the `gnuplot` version at compile time.) + + +The editing commands are as follows: + + +@example + `Line-editing`: + +@end example + +@example + ^B moves back a single character. + ^F moves forward a single character. + ^A moves to the beginning of the line. + ^E moves to the end of the line. + ^H and DEL delete the previous character. + ^D deletes the current character. + ^K deletes from current position to the end of line. + ^L,^R redraws line in case it gets trashed. + ^U deletes the entire line. + ^W deletes the last word. + +@end example + +@example + `History`: + +@end example + +@example + ^P moves back through history. + ^N moves forward through history. + +@end example + + +On the IBM PC, the use of a TSR program such as DOSEDIT or CED may be desired +for line editing. The default makefile assumes that this is the case; by +default `gnuplot` will be compiled with no line-editing capability. If you +want to use `gnuplot`'s line editing, set READLINE in the makefile and add +readline.obj to the link file. The following arrow keys may be used on the +IBM PC and Atari versions if readline is used: + + +@example + Left Arrow - same as ^B. + Right Arrow - same as ^F. + Ctrl Left Arrow - same as ^A. + Ctrl Right Arrow - same as ^E. + Up Arrow - same as ^P. + Down Arrow - same as ^N. + +@end example + + +The Atari version of readline defines some additional key aliases: + + +@example + Undo - same as ^L. + Home - same as ^A. + Ctrl Home - same as ^E. + Esc - same as ^U. + Help - @ref{help} plus return. + Ctrl Help - `help `. + +@end example + + +@node Comments, Coordinates, Command-line-editing, gnuplot +@section Comments + +@cindex comments + +Comments are supported as follows: a `#` may appear in most places in a line +and `gnuplot` will ignore the rest of the line. It will not have this effect +inside quotes, inside numbers (including complex numbers), inside command +substitutions, etc. In short, it works anywhere it makes sense to work. + +@node Coordinates, Environment, Comments, gnuplot +@section Coordinates + +@cindex coordinates + +The commands @ref{arrow}, @ref{key}, and @ref{label} allow you to draw +something at an arbitrary position on the graph. This position is specified +by the syntax: + +@example + @{@} , @{@} @{,@{@} @} + +@end example + +Each can either be `first`, `second`, `graph` or `screen`. + +`first` places the x, y, or z coordinate in the system defined by the left +and bottom axes; `second` places it in the system defined by the second axes +(top and right); `graph` specifies the area within the axes---0,0 is bottom +left and 1,1 is top right (for splot, 0,0,0 is bottom left of plotting area; +use negative z to get to the base---see @ref{ticslevel}); and `screen` +specifies the screen area (the entire area---not just the portion selected by +@ref{size}), with 0,0 at bottom left and 1,1 at top right. + +If the coordinate system for x is not specified, `first` is used. If the +system for y is not specified, the one used for x is adopted. + +If one (or more) axis is timeseries, the appropriate coordinate should +be given as a quoted time string according to the @ref{timefmt} format string. +See @ref{xdata} and @ref{timefmt}. `gnuplot` will also accept an integer +expression, which will be interpreted as seconds from 1 January 2000. + +@node Environment, Expressions, Coordinates, gnuplot +@section Environment + +@cindex environment + +A number of shell environment variables are understood by `gnuplot`. None of +these are required, but may be useful. + +If GNUTERM is defined, it is used as the name of the terminal type to be +used. This overrides any terminal type sensed by `gnuplot` on start-up, but +is itself overridden by the .gnuplot (or equivalent) start-up file (see +`start-up`) and, of course, by later explicit changes. + +On Unix, AmigaOS, AtariTOS, MS-DOS and OS/2, GNUHELP may be defined to be the +pathname of the HELP file (gnuplot.gih). + +On VMS, the logical name GNUPLOT$HELP should be defined as the name of the +help library for `gnuplot`. The `gnuplot` help can be put inside any system +help library, allowing access to help from both within and outside `gnuplot` +if desired. + +On Unix, HOME is used as the name of a directory to search for a .gnuplot +file if none is found in the current directory. On AmigaOS, AtariTOS, +MS-DOS and OS/2, gnuplot is used. On VMS, SYS$LOGIN: is used. See `help +start-up`. + +On Unix, PAGER is used as an output filter for help messages. + +On Unix, AtariTOS and AmigaOS, SHELL is used for the @ref{shell} command. On +MS-DOS and OS/2, COMSPEC is used for the @ref{shell} command. + +On MS-DOS, if the BGI or Watcom interface is used, PCTRM is used to tell +the maximum resolution supported by your monitor by setting it to +S. E.g. if your monitor's maximum resolution is +800x600, then use: +@example + set PCTRM=S800 +@end example + +If PCTRM is not set, standard VGA is used. + +FIT_SCRIPT may be used to specify a `gnuplot` command to be executed when a +fit is interrupted---see `fit`. FIT_LOG specifies the filename of the +logfile maintained by fit. + +@node Expressions, Glossary, Environment, gnuplot +@section Expressions + +@cindex expressions + +In general, any mathematical expression accepted by C, FORTRAN, Pascal, or +BASIC is valid. The precedence of these operators is determined by the +specifications of the C programming language. White space (spaces and tabs) +is ignored inside expressions. + +Complex constants are expressed as @{,@}, where and +must be numerical constants. For example, @{3,2@} represents 3 + 2i; @{0,1@} +represents 'i' itself. The curly braces are explicitly required here. + +Note that gnuplot uses both "real" and "integer" arithmetic, like FORTRAN and +C. Integers are entered as "1", "-10", etc; reals as "1.0", "-10.0", "1e1", +3.5e-1, etc. The most important difference between the two forms is in +division: division of integers truncates: 5/2 = 2; division of reals does +not: 5.0/2.0 = 2.5. In mixed expressions, integers are "promoted" to reals +before evaluation: 5/2e0 = 2.5. The result of division of a negative integer +by a positive one may vary among compilers. Try a test like "print -5/2" to +determine if your system chooses -2 or -3 as the answer. + +The integer expression "1/0" may be used to generate an "undefined" flag, +which causes a point to ignored; the `ternary` operator gives an example. + +The real and imaginary parts of complex expressions are always real, whatever +the form in which they are entered: in @{3,2@} the "3" and "2" are reals, not +integers. + +@menu +* Functions:: +* Operators:: +* User-defined:: +@end menu + +@node Functions, Operators, Expressions, Expressions +@subsection Functions + +@c ?expressions functions +@cindex functions +@opindex functions + + +The functions in `gnuplot` are the same as the corresponding functions in +the Unix math library, except that all functions accept integer, real, and +complex arguments, unless otherwise noted. + +For those functions that accept or return angles that may be given in either +degrees or radians (sin(x), cos(x), tan(x), asin(x), acos(x), atan(x), +atan2(x) and arg(z)), the unit may be selected by @ref{angles}, which +defaults to radians. + + + +@menu +* abs:: +* acos:: +* acosh:: +* arg:: +* asin:: +* asinh:: +* atan:: +* atan2:: +* atanh:: +* besj0:: +* besj1:: +* besy0:: +* besy1:: +* ceil:: +* cos:: +* cosh:: +* erf:: +* erfc:: +* exp:: +* floor:: +* gamma:: +* ibeta:: +* inverf:: +* igamma:: +* imag:: +* invnorm:: +* int:: +* lgamma:: +* log:: +* log10:: +* norm:: +* rand:: +* real:: +* sgn:: +* sin:: +* sinh:: +* sqrt:: +* tan:: +* tanh:: +* column:: +* tm_hour:: +* tm_mday:: +* tm_min:: +* tm_mon:: +* tm_sec:: +* tm_wday:: +* tm_yday:: +* tm_year:: +* valid:: +@end menu + +@node abs, acos, Functions, Functions +@subsubsection abs + +@c ?expressions functions abs +@c ?functions abs +@cindex abs +@findex abs + + +The `abs(x)` function returns the absolute value of its argument. The +returned value is of the same type as the argument. + +For complex arguments, abs(x) is defined as the length of x in the complex +plane [i.e., sqrt(real(x)**2 + imag(x)**2) ]. + +@node acos, acosh, abs, Functions +@subsubsection acos + +@c ?expressions functions acos +@c ?functions acos +@cindex acos +@findex acos + + +The `acos(x)` function returns the arc cosine (inverse cosine) of its +argument. `acos` returns its argument in radians or degrees, as selected by +@ref{angles}. + +@node acosh, arg, acos, Functions +@subsubsection acosh + +@c ?expressions functions acosh +@c ?functions acosh +@cindex acosh +@findex acosh + + +The `acosh(x)` function returns the inverse hyperbolic cosine of its argument +in radians. + +@node arg, asin, acosh, Functions +@subsubsection arg + +@c ?expressions functions arg +@c ?functions arg +@cindex arg +@findex arg + + +The `arg(x)` function returns the phase of a complex number in radians or +degrees, as selected by @ref{angles}. + +@node asin, asinh, arg, Functions +@subsubsection asin + +@c ?expressions functions asin +@c ?functions asin +@cindex asin +@findex asin + + +The `asin(x)` function returns the arc sin (inverse sin) of its argument. +`asin` returns its argument in radians or degrees, as selected by @ref{angles}. + +@node asinh, atan, asin, Functions +@subsubsection asinh + +@c ?expressions functions asinh +@c ?functions asinh +@cindex asinh +@findex asinh + + +The `asinh(x)` function returns the inverse hyperbolic sin of its argument in +radians. + +@node atan, atan2, asinh, Functions +@subsubsection atan + +@c ?expressions functions atan +@c ?functions atan +@cindex atan +@findex atan + + +The `atan(x)` function returns the arc tangent (inverse tangent) of its +argument. `atan` returns its argument in radians or degrees, as selected by +@ref{angles}. + +@node atan2, atanh, atan, Functions +@subsubsection atan2 + +@c ?expressions functions atan2 +@c ?functions atan2 +@cindex atan2 +@findex atan2 + + +The `atan2(y,x)` function returns the arc tangent (inverse tangent) of the +ratio of the real parts of its arguments. @ref{atan2} returns its argument in +radians or degrees, as selected by @ref{angles}, in the correct quadrant. + +@node atanh, besj0, atan2, Functions +@subsubsection atanh + +@c ?expressions functions atanh +@c ?functions atanh +@cindex atanh +@findex atanh + + +The `atanh(x)` function returns the inverse hyperbolic tangent of its +argument in radians. + +@node besj0, besj1, atanh, Functions +@subsubsection besj0 + +@c ?expressions functions besj0 +@c ?functions besj0 +@cindex besj0 +@findex besj0 + + +The `besj0(x)` function returns the j0th Bessel function of its argument. +@ref{besj0} expects its argument to be in radians. + +@node besj1, besy0, besj0, Functions +@subsubsection besj1 + +@c ?expressions functions besj1 +@c ?functions besj1 +@cindex besj1 +@findex besj1 + + +The `besj1(x)` function returns the j1st Bessel function of its argument. +@ref{besj1} expects its argument to be in radians. + +@node besy0, besy1, besj1, Functions +@subsubsection besy0 + +@c ?expressions functions besy0 +@c ?functions besy0 +@cindex besy0 +@findex besy0 + + +The @ref{besy0} function returns the y0th Bessel function of its argument. +@ref{besy0} expects its argument to be in radians. + +@node besy1, ceil, besy0, Functions +@subsubsection besy1 + +@c ?expressions functions besy1 +@c ?functions besy1 +@cindex besy1 +@findex besy1 + + +The `besy1(x)` function returns the y1st Bessel function of its argument. +@ref{besy1} expects its argument to be in radians. + +@node ceil, cos, besy1, Functions +@subsubsection ceil + +@c ?expressions functions ceil +@c ?functions ceil +@cindex ceil +@findex ceil + + +The `ceil(x)` function returns the smallest integer that is not less than its +argument. For complex numbers, @ref{ceil} returns the smallest integer not less +than the real part of its argument. + +@node cos, cosh, ceil, Functions +@subsubsection cos + +@c ?expressions functions cos +@c ?functions cos +@cindex cos +@findex cos + + +The `cos(x)` function returns the cosine of its argument. `cos` accepts its +argument in radians or degrees, as selected by @ref{angles}. + +@node cosh, erf, cos, Functions +@subsubsection cosh + +@c ?expressions functions cosh +@c ?functions cosh +@cindex cosh +@findex cosh + + +The `cosh(x)` function returns the hyperbolic cosine of its argument. @ref{cosh} +expects its argument to be in radians. + +@node erf, erfc, cosh, Functions +@subsubsection erf + +@c ?expressions functions erf +@c ?functions erf +@cindex erf +@findex erf + + +The `erf(x)` function returns the error function of the real part of its +argument. If the argument is a complex value, the imaginary component is +ignored. + +@node erfc, exp, erf, Functions +@subsubsection erfc + +@c ?expressions functions erfc +@c ?functions erfc +@cindex erfc +@findex erfc + + +The `erfc(x)` function returns 1.0 - the error function of the real part of +its argument. If the argument is a complex value, the imaginary component is +ignored. + +@node exp, floor, erfc, Functions +@subsubsection exp + +@c ?expressions functions exp +@c ?functions exp +@cindex exp +@findex exp + + +The `exp(x)` function returns the exponential function of its argument (`e` +raised to the power of its argument). On some implementations (notably +suns), exp(-x) returns undefined for very large x. A user-defined function +like safe(x) = x<-100 ? 0 : exp(x) might prove useful in these cases. + +@node floor, gamma, exp, Functions +@subsubsection floor + +@c ?expressions functions floor +@c ?functions floor +@cindex floor +@findex floor + + +The `floor(x)` function returns the largest integer not greater than its +argument. For complex numbers, @ref{floor} returns the largest integer not +greater than the real part of its argument. + +@node gamma, ibeta, floor, Functions +@subsubsection gamma + +@c ?expressions functions gamma +@c ?functions gamma +@cindex gamma +@findex gamma + + +The `gamma(x)` function returns the gamma function of the real part of its +argument. For integer n, gamma(n+1) = n!. If the argument is a complex +value, the imaginary component is ignored. + +@node ibeta, inverf, gamma, Functions +@subsubsection ibeta + +@c ?expressions functions ibeta +@c ?functions ibeta +@cindex ibeta +@findex ibeta + + +The `ibeta(p,q,x)` function returns the incomplete beta function of the real +parts of its arguments. p, q > 0 and x in [0:1]. If the arguments are +complex, the imaginary components are ignored. + +@node inverf, igamma, ibeta, Functions +@subsubsection inverf + +@c ?expressions functions inverf +@c ?functions inverf +@cindex inverf +@findex inverf + + +The `inverf(x)` function returns the inverse error function of the real part +of its argument. + +@node igamma, imag, inverf, Functions +@subsubsection igamma + +@c ?expressions functions igamma +@c ?functions igamma +@cindex igamma +@findex igamma + + +The `igamma(a,x)` function returns the incomplete gamma function of the real +parts of its arguments. a > 0 and x >= 0. If the arguments are complex, +the imaginary components are ignored. + +@node imag, invnorm, igamma, Functions +@subsubsection imag + +@c ?expressions functions imag +@c ?functions imag +@cindex imag +@findex imag + + +The `imag(x)` function returns the imaginary part of its argument as a real +number. + +@node invnorm, int, imag, Functions +@subsubsection invnorm + +@c ?expressions functions invnorm +@c ?functions invnorm +@cindex invnorm +@findex invnorm + + +The `invnorm(x)` function returns the inverse normal distribution function of +the real part of its argument. + +@node int, lgamma, invnorm, Functions +@subsubsection int + +@c ?expressions functions int +@c ?functions int +@cindex int +@findex int + + +The `int(x)` function returns the integer part of its argument, truncated +toward zero. + +@node lgamma, log, int, Functions +@subsubsection lgamma + +@c ?expressions functions lgamma +@c ?functions lgamma +@cindex lgamma +@findex lgamma + + +The `lgamma(x)` function returns the natural logarithm of the gamma function +of the real part of its argument. If the argument is a complex value, the +imaginary component is ignored. + +@node log, log10, lgamma, Functions +@subsubsection log + +@c ?expressions functions log +@c ?functions log +@cindex log +@findex log + + +The `log(x)` function returns the natural logarithm (base `e`) of its +argument. + +@node log10, norm, log, Functions +@subsubsection log10 + +@c ?expressions functions log10 +@c ?functions log10 +@cindex log10 +@findex log10 + + +The `log10(x)` function returns the logarithm (base 10) of its argument. + +@node norm, rand, log10, Functions +@subsubsection norm + +@c ?expressions functions norm +@c ?functions norm +@cindex norm +@findex norm + + +The `norm(x)` function returns the normal distribution function (or Gaussian) +of the real part of its argument. + +@node rand, real, norm, Functions +@subsubsection rand + +@c ?expressions functions rand +@c ?functions rand +@cindex rand +@findex rand + + +The `rand(x)` function returns a pseudo random number in the interval [0:1] +using the real part of its argument as a seed. If seed < 0, the sequence +is (re)initialized. If the argument is a complex value, the imaginary +component is ignored. + +@node real, sgn, rand, Functions +@subsubsection real + +@c ?expressions functions real +@c ?functions real +@cindex real +@findex real + + +The `real(x)` function returns the real part of its argument. + +@node sgn, sin, real, Functions +@subsubsection sgn + +@c ?expressions functions sgn +@c ?functions sgn +@cindex sgn +@findex sgn + + +The `sgn(x)` function returns 1 if its argument is positive, -1 if its +argument is negative, and 0 if its argument is 0. If the argument is a +complex value, the imaginary component is ignored. + +@node sin, sinh, sgn, Functions +@subsubsection sin + +@c ?expressions functions sin +@c ?functions sin +@cindex sin +@findex sin + + +The `sin(x)` function returns the sine of its argument. `sin` expects its +argument to be in radians or degrees, as selected by @ref{angles}. + +@node sinh, sqrt, sin, Functions +@subsubsection sinh + +@c ?expressions functions sinh +@c ?functions sinh +@cindex sinh +@findex sinh + + +The `sinh(x)` function returns the hyperbolic sine of its argument. @ref{sinh} +expects its argument to be in radians. + +@node sqrt, tan, sinh, Functions +@subsubsection sqrt + +@c ?expressions functions sqrt +@c ?functions sqrt +@cindex sqrt +@findex sqrt + + +The `sqrt(x)` function returns the square root of its argument. + +@node tan, tanh, sqrt, Functions +@subsubsection tan + +@c ?expressions functions tan +@c ?functions tan +@cindex tan +@findex tan + + +The `tan(x)` function returns the tangent of its argument. `tan` expects +its argument to be in radians or degrees, as selected by @ref{angles}. + +@node tanh, column, tan, Functions +@subsubsection tanh + +@c ?expressions functions tanh +@c ?functions tanh +@cindex tanh +@findex tanh + + +The `tanh(x)` function returns the hyperbolic tangent of its argument. @ref{tanh} +expects its argument to be in radians. + + +A few additional functions are also available. + + + +@node column, tm_hour, tanh, Functions +@subsubsection column + +@c ?expressions functions column +@c ?functions column +@cindex column +@findex column + + +`column(x)` may be used only in expressions as part of @ref{using} manipulations +to fits or datafile plots. See @ref{using}. + +@node tm_hour, tm_mday, column, Functions +@subsubsection tm_hour + +@c ?expressions tm_hour +@findex tm_hour +@c ?functions tm_hour +The @ref{tm_hour} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the hour (an integer in the range 0--23) as a real. + +@node tm_mday, tm_min, tm_hour, Functions +@subsubsection tm_mday + +@c ?expressions tm_mday +@findex tm_mday +@c ?functions tm_mday +The @ref{tm_mday} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the day of the month (an integer in the range 1--31) +as a real. + +@node tm_min, tm_mon, tm_mday, Functions +@subsubsection tm_min + +@c ?expressions tm_min +@findex tm_min +@c ?functions tm_min +The @ref{tm_min} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the minute (an integer in the range 0--59) as a real. + +@node tm_mon, tm_sec, tm_min, Functions +@subsubsection tm_mon + +@c ?expressions tm_mon +@findex tm_mon +@c ?functions tm_mon +The @ref{tm_mon} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the month (an integer in the range 1--12) as a real. + +@node tm_sec, tm_wday, tm_mon, Functions +@subsubsection tm_sec + +@c ?expressions tm_sec +@findex tm_sec +@c ?functions tm_sec +The @ref{tm_sec} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the second (an integer in the range 0--59) as a real. + +@node tm_wday, tm_yday, tm_sec, Functions +@subsubsection tm_wday + +@c ?expressions tm_wday +@findex tm_wday +@c ?functions tm_wday +The @ref{tm_wday} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the day of the week (an integer in the range 1--7) as +a real. + +@node tm_yday, tm_year, tm_wday, Functions +@subsubsection tm_yday + +@c ?expressions tm_yday +@findex tm_yday +@c ?functions tm_yday +The @ref{tm_yday} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the day of the year (an integer in the range 1--366) +as a real. + +@node tm_year, valid, tm_yday, Functions +@subsubsection tm_year + +@c ?expressions tm_year +@findex tm_year +@c ?functions tm_year +The @ref{tm_year} function interprets its argument as a time, in seconds from +1 Jan 2000. It returns the year (an integer) as a real. + +@node valid, , tm_year, Functions +@subsubsection valid + +@c ?expressions functions valid +@c ?functions valid +@cindex valid +@findex valid + + +`valid(x)` may be used only in expressions as part of @ref{using} manipulations +to fits or datafile plots. See @ref{using}. + +@uref{http://www.gnuplot.vt.edu/gnuplot/gpdocs/airfoil.html,Use of functions and complex variables for airfoils } + +@node Operators, User-defined, Functions, Expressions +@subsection Operators + +@c ?expressions operators +@cindex operators + +The operators in `gnuplot` are the same as the corresponding operators in the +C programming language, except that all operators accept integer, real, and +complex arguments, unless otherwise noted. The ** operator (exponentiation) +is supported, as in FORTRAN. + +Parentheses may be used to change order of evaluation. + +@menu +* Unary:: +* Binary:: +* Ternary:: +@end menu + +@node Unary, Binary, Operators, Operators +@subsubsection Unary + +@c ?expressions operators unary +@c ?operators unary +@cindex unary + +The following is a list of all the unary operators and their usages: + + +@example + Symbol Example Explanation + - -a unary minus + + +a unary plus (no-operation) + ~ ~a * one's complement + ! !a * logical negation + ! a! * factorial + $ $3 * call arg/column during @ref{using} manipulation + +@end example + +(*) Starred explanations indicate that the operator requires an integer +argument. + +Operator precedence is the same as in Fortran and C. As in those languages, +parentheses may be used to change the order of operation. Thus -2**2 = -4, +but (-2)**2 = 4. + +The factorial operator returns a real number to allow a greater range. + +@node Binary, Ternary, Unary, Operators +@subsubsection Binary + +@c ?expressions operators binary +@c ?operators binary +@cindex binary + +The following is a list of all the binary operators and their usages: + + +@example + Symbol Example Explanation + ** a**b exponentiation + * a*b multiplication + / a/b division + % a%b * modulo + + a+b addition + - a-b subtraction + == a==b equality + != a!=b inequality + < a a>b greater than + >= a>=b greater than or equal to + & a&b * bitwise AND + ^ a^b * bitwise exclusive OR + | a|b * bitwise inclusive OR + && a&&b * logical AND + || a||b * logical OR + +@end example + + +(*) Starred explanations indicate that the operator requires integer +arguments. + +Logical AND (&&) and OR (||) short-circuit the way they do in C. That is, +the second `&&` operand is not evaluated if the first is false; the second +`||` operand is not evaluated if the first is true. + +@node Ternary, , Binary, Operators +@subsubsection Ternary + +@c ?expressions operators ternary +@c ?operators ternary +@cindex ternary + +There is a single ternary operator: + + +@example + Symbol Example Explanation + ?: a?b:c ternary operation + +@end example + + +The ternary operator behaves as it does in C. The first argument (a), which +must be an integer, is evaluated. If it is true (non-zero), the second +argument (b) is evaluated and returned; otherwise the third argument (c) is +evaluated and returned. + +The ternary operator is very useful both in constructing piecewise functions +and in plotting points only when certain conditions are met. + +Examples: + +Plot a function that is to equal sin(x) for 0 <= x < 1, 1/x for 1 <= x < 2, +and undefined elsewhere: +@example + f(x) = 0<=x && x<1 ? sin(x) : 1<=x && x<2 ? 1/x : 1/0 + plot f(x) +@end example + +@c ^ [ternary.gif] +Note that `gnuplot` quietly ignores undefined values, so the final branch of +the function (1/0) will produce no plottable points. Note also that f(x) +will be plotted as a continuous function across the discontinuity if a line +style is used. To plot it discontinuously, create separate functions for the +two pieces. (Parametric functions are also useful for this purpose.) + +For data in a file, plot the average of the data in columns 2 and 3 against +the datum in column 1, but only if the datum in column 4 is non-negative: + +@example + plot 'file' using 1:( $4<0 ? 1/0 : ($2+$3)/2 ) + +@end example + +Please see @ref{using} for an explanation of the @ref{using} syntax. + +@node User-defined, , Operators, Expressions +@subsection User-defined + +@c ?expressions user-defined +@cindex user-defined + +@cindex variables +@opindex variables + + +New user-defined variables and functions of one through five variables may +be declared and used anywhere, including on the @ref{plot} command itself. + +User-defined function syntax: +@example + ( @{,@} ... @{,@} ) = + +@end example + +where is defined in terms of through . + +User-defined variable syntax: +@example + = + +@end example + +Examples: +@example + w = 2 + q = floor(tan(pi/2 - 0.1)) + f(x) = sin(w*x) + sinc(x) = sin(pi*x)/(pi*x) + delta(t) = (t == 0) + ramp(t) = (t > 0) ? t : 0 + min(a,b) = (a < b) ? a : b + comb(n,k) = n!/(k!*(n-k)!) + len3d(x,y,z) = sqrt(x*x+y*y+z*z) + plot f(x) = sin(x*a), a = 0.2, f(x), a = 0.4, f(x) + +@end example + +@c ^ [userdefined.gif] +Note that the variable `pi` is already defined. But it is in no way magic; +you may redefine it to be whatever you like. + +Valid names are the same as in most programming languages: they must begin +with a letter, but subsequent characters may be letters, digits, "$", or "_". +Note, however, that the `fit` mechanism uses several variables with names +that begin "FIT_". It is safest to avoid using such names. "FIT_LIMIT", +however, is one that you may wish to redefine. See the documentation +on `fit` for details. + + +See @ref{functions}, @ref{variables}, and `fit`. + +@node Glossary, Plotting, Expressions, gnuplot +@section Glossary + +@cindex glossary + +Throughout this document an attempt has been made to maintain consistency of +nomenclature. This cannot be wholly successful because as `gnuplot` has +evolved over time, certain command and keyword names have been adopted that +preclude such perfection. This section contains explanations of the way +some of these terms are used. + +A "page" or "screen" is the entire area addressable by `gnuplot`. On a +monitor, it is the full screen; on a plotter, it is a single sheet of paper. + +A screen may contain one or more "plots". A plot is defined by an abscissa +and an ordinate, although these need not actually appear on it, as well as +the margins and any text written therein. + +A plot contains one "graph". A graph is defined by an abscissa and an +ordinate, although these need not actually appear on it. + +A graph may contain one or more "lines". A line is a single function or +data set. "Line" is also a plotting style. The word will also be used in +sense "a line of text". Presumably the context will remove any ambiguity. + +The lines on a graph may have individual names. These may be listed +together with a sample of the plotting style used to represent them in +the "key", sometimes also called the "legend". + +The word "title" occurs with multiple meanings in `gnuplot`. In this +document, it will always be preceded by the adjective "plot", "line", or +"key" to differentiate among them. + +A graph may have up to four labelled axes. Various commands have the name of +an axis built into their names, such as @ref{xlabel}. Other commands have +one or more axis names as options, such as `set logscale xy`. The names of +the four axes for these usages are "x" for the axis along the bottom border +of the plot, "y" for the left border, "x2" for the top border, and "y2" for +the right border. "z" also occurs in commands used with 3-d plotting. + +When discussing data files, the term "record" will be resurrected and used +to denote a single line of text in the file, that is, the characters between +newline or end-of-record characters. A "point" is the datum extracted from +a single record. A "datablock" is a set of points from consecutive records, +delimited by blank records. A line, when referred to in the context of a +data file, is a subset of a datablock. + +@node Plotting, Start-up, Glossary, gnuplot +@section Plotting + +@cindex plotting + +There are three `gnuplot` commands which actually create a plot: @ref{plot}, +`splot` and @ref{replot}. @ref{plot} generates 2-d plots, `splot` generates 3-d +plots (actually 2-d projections, of course), and @ref{replot} appends its +arguments to the previous @ref{plot} or `splot` and executes the modified +command. + +Much of the general information about plotting can be found in the discussion +of @ref{plot}; information specific to 3-d can be found in the `splot` section. + +@ref{plot} operates in either rectangular or polar coordinates -- see `set polar` +for details of the latter. `splot` operates only in rectangular coordinates, +but the @ref{mapping} command allows for a few other coordinate systems to be +treated. In addition, the @ref{using} option allows both @ref{plot} and `splot` to +treat almost any coordinate system you'd care to define. + +`splot` can plot surfaces and contours in addition to points and/or lines. +In addition to `splot`, see @ref{isosamples} for information about defining +the grid for a 3-d function; `splot datafile` for information about the +requisite file structure for 3-d data values; and @ref{contour} and @ref{cntrparam} for information about contours. + +@node Start-up, Substitution, Plotting, gnuplot +@section Start-up + +@cindex startup + +@cindex start + +@cindex .gnuplot + +When `gnuplot` is run, it looks for an initialization file to load. This +file is called `.gnuplot` on Unix and AmigaOS systems, and `GNUPLOT.INI` on +other systems. If this file is not found in the current directory, the +program will look for it in the home directory (under AmigaOS, +Atari(single)TOS, MS-DOS and OS/2, the environment variable `gnuplot` should +contain the name of this directory). Note: if NOCWDRC is defined during the +installation, `gnuplot` will not read from the current directory. + +If the initialization file is found, `gnuplot` executes the commands in it. +These may be any legal `gnuplot` commands, but typically they are limited to +setting the terminal and defining frequently-used functions or variables. + +@node Substitution, Syntax, Start-up, gnuplot +@section Substitution + +@cindex substitution + +Command-line substitution is specified by a system command enclosed in +backquotes. This command is spawned and the output it produces replaces +the name of the command (and backquotes) on the command line. Some +implementations also support pipes; see @ref{special-filenames}. + +Newlines in the output produced by the spawned command are replaced with +blanks. + +Command-line substitution can be used anywhere on the `gnuplot` command +line. + +Example: + +This will run the program `leastsq` and replace `leastsq` (including +backquotes) on the command line with its output: +@example + f(x) = `leastsq` + +@end example + +or, in VMS +@example + f(x) = `run leastsq` + +@end example + +@node Syntax, Time/Date_data, Substitution, gnuplot +@section Syntax + +@cindex syntax + +@cindex specify + +@cindex punctuation + +The general rules of syntax and punctuation in `gnuplot` are that keywords +and options are order-dependent. Options and any accompanying parameters are +separated by spaces whereas lists and coordinates are separated by commas. +Ranges are separated by colons and enclosed in brackets [], text and file +names are enclosed in quotes, and a few miscellaneous things are enclosed +in parentheses. Braces @{@} are used for a few special purposes. + +Commas are used to separate coordinates on the `set` commands @ref{arrow}, +@ref{key}, and @ref{label}; the list of variables being fitted (the list after the +`via` keyword on the `fit` command); lists of discrete contours or the loop +parameters which specify them on the @ref{cntrparam} command; the arguments +of the `set` commands @ref{dgrid3d}, @ref{dummy}, @ref{isosamples}, @ref{offsets}, @ref{origin}, +@ref{samples}, @ref{size}, `time`, and @ref{view}; lists of tics or the loop parameters +which specify them; the offsets for titles and axis labels; parametric +functions to be used to calculate the x, y, and z coordinates on the @ref{plot}, +@ref{replot} and `splot` commands; and the complete sets of keywords specifying +individual plots (data sets or functions) on the @ref{plot}, @ref{replot} and `splot` +commands. + +Parentheses are used to delimit sets of explicit tics (as opposed to loop +parameters) and to indicate computations in the @ref{using} filter of the `fit`, +@ref{plot}, @ref{replot} and `splot` commands. + +(Parentheses and commas are also used as usual in function notation.) + +Brackets are used to delimit ranges, whether they are given on `set`, @ref{plot} +or `splot` commands. + +Colons are used to separate extrema in `range` specifications (whether they +are given on `set`, @ref{plot} or `splot` commands) and to separate entries in +the @ref{using} filter of the @ref{plot}, @ref{replot}, `splot` and `fit` commands. + +Semicolons are used to separate commands given on a single command line. + +Braces are used in text to be specially processed by some terminals, like +`postscript`. They are also used to denote complex numbers: @{3,2@} = 3 + 2i. + +Text may be enclosed in single- or double-quotes. Backslash processing of +sequences like \n (newline) and \345 (octal character code) is performed for +double-quoted strings, but not for single-quoted strings. + +The justification is the same for each line of a multi-line string. Thus the +center-justified string +@example + "This is the first line of text.\nThis is the second line." +@end example + +will produce +@example + This is the first line of text. + This is the second line. +@end example + +but +@example + 'This is the first line of text.\nThis is the second line.' +@end example + +will produce +@example + This is the first line of text.\nThis is the second line. + +@end example + +Filenames may be entered with either single- or double-quotes. In this +manual the command examples generally single-quote filenames and double-quote +other string tokens for clarity. + +At present you should not embed \n inside @{@} when using the enhanced option +of the postscript terminal. + +The EEPIC, Imagen, Uniplex, LaTeX, and TPIC drivers allow a newline to be +specified by \\ in a single-quoted string or \\\\ in a double-quoted string. + +Back-quotes are used to enclose system commands for substitution. + +@node Time/Date_data, , Syntax, gnuplot +@section Time/Date data + +@cindex time/date + +`gnuplot` supports the use of time and/or date information as input data. +This feature is activated by the commands `set xdata time`, `set ydata time`, +etc. + +Internally all times and dates are converted to the number of seconds from +the year 2000. The command @ref{timefmt} defines the format for all inputs: +data files, ranges, tics, label positions---in short, anything that accepts a +data value must receive it in this format. Since only one input format can +be in force at a given time, all time/date quantities being input at the same +time must be presented in the same format. Thus if both x and y data in a +file are time/date, they must be in the same format. + +The conversion to and from seconds assumes Universal Time (which is the same +as Greenwich Standard Time). There is no provision for changing the time +zone or for daylight savings. If all your data refer to the same time zone +(and are all either daylight or standard) you don't need to worry about these +things. But if the absolute time is crucial for your application, you'll +need to convert to UT yourself. + +Commands like @ref{xrange} will re-interpret the integer according to +@ref{timefmt}. If you change @ref{timefmt}, and then `show` the quantity again, it +will be displayed in the new @ref{timefmt}. For that matter, if you give the +deactivation command (like @ref{xdata}), the quantity will be shown in its +numerical form. + +The command `set format` defines the format that will be used for tic labels, +whether or not the specified axis is time/date. + +If time/date information is to be plotted from a file, the @ref{using} option +_must_ be used on the @ref{plot} or `splot` command. These commands simply use +white space to separate columns, but white space may be embedded within the +time/date string. If you use tabs as a separator, some trial-and-error may +be necessary to discover how your system treats them. + +The following example demonstrates time/date plotting. + +Suppose the file "data" contains records like + +@example + 03/21/95 10:00 6.02e23 + +@end example + +This file can be plotted by + +@example + set xdata time + set timefmt "%m/%d/%y" + set xrange ["03/21/95":"03/22/95"] + set format x "%m/%d" + set timefmt "%m/%d/%y %H:%M" + plot "data" using 1:3 + +@end example + +which will produce xtic labels that look like "03/21". + +See the descriptions of each command for more details. + +@node Commands, Graphical_User_Interfaces, gnuplot, Top +@chapter Commands + +@cindex commands + +This section lists the commands acceptable to `gnuplot` in alphabetical +order. Printed versions of this document contain all commands; on-line +versions may not be complete. Indeed, on some systems there may be no +commands at all listed under this heading. + +Note that in most cases unambiguous abbreviations for command names and their +options are permissible, i.e., "`p f(x) w l`" instead of "`plot f(x) with +lines`". + +In the syntax descriptions, braces (@{@}) denote optional arguments and a +vertical bar (|) separates mutually exclusive choices. + +@menu +* cd:: +* call:: +* clear:: +* exit:: +* fit:: +* help:: +* if:: +* load:: +* pause:: +* plot:: +* print:: +* pwd:: +* quit:: +* replot:: +* reread:: +* reset:: +* save:: +* set-show:: +* shell:: +* splot:: +* test:: +* update:: +@end menu + +@node cd, call, Commands, Commands +@section cd + +@c ?commands cd +@cindex cd +@cmindex cd + + +The @ref{cd} command changes the working directory. + +Syntax: +@example + cd '' + +@end example + +The directory name must be enclosed in quotes. + +Examples: +@example + cd 'subdir' + cd ".." + +@end example + +DOS users _must_ use single-quotes---backslash [\] has special significance +inside double-quotes. For example, +@example + cd "c:\newdata" +@end example + +fails, but +@example + cd 'c:\newdata' +@end example + +works as expected. + +@node call, clear, cd, Commands +@section call + +@c ?commands call +@cindex call +@cmindex call + + +The @ref{call} command is identical to the load command with one exception: you +can have up to ten additional parameters to the command (delimited according +to the standard parser rules) which can be substituted into the lines read +from the file. As each line is read from the @ref{call}ed input file, it is +scanned for the sequence `$` (dollar-sign) followed by a digit (0--9). If +found, the sequence is replaced by the corresponding parameter from the +@ref{call} command line. If the parameter was specified as a string in the +@ref{call} line, it is substituted without its enclosing quotes. `$` followed by +any character other than a digit will be that character. E.g. use `$$` to +get a single `$`. Providing more than ten parameters on the @ref{call} command +line will cause an error. A parameter that was not provided substitutes as +nothing. Files being @ref{call}ed may themselves contain @ref{call} or @ref{load} +commands. + +The @ref{call} command _must_ be the last command on a multi-command line. + +Syntax: +@example + call "" ... + +@end example + +The name of the input file must be enclosed in quotes, and it is recommended +that parameters are similarly enclosed in quotes (future versions of gnuplot +may treat quoted and unquoted arguments differently). + +Example: + +If the file 'calltest.gp' contains the line: +@example + print "p0=$0 p1=$1 p2=$2 p3=$3 p4=$4 p5=$5 p6=$6 p7=x$7x" + +@end example + +entering the command: +@example + call 'calltest.gp' "abcd" 1.2 + "'quoted'" -- "$2" + +@end example + +will display: +@example + p0=abcd p1=1.2 p2=+ p3='quoted' p4=- p5=- p6=$2 p7=xx + +@end example + +NOTE: there is a clash in syntax with the datafile @ref{using} callback +operator. Use `$$n` or `column(n)` to access column n from a datafile inside +a @ref{call}ed datafile plot. + +@node clear, exit, call, Commands +@section clear + +@c ?commands clear +@cindex clear +@cmindex clear + + +The @ref{clear} command erases the current screen or output device as specified +by @ref{output}. This usually generates a formfeed on hardcopy devices. Use +@ref{terminal} to set the device type. + +For some terminals @ref{clear} erases only the portion of the plotting surface +defined by @ref{size}, so for these it can be used in conjunction with @ref{multiplot} to create an inset. + +Example: +@example + set multiplot + plot sin(x) + set origin 0.5,0.5 + set size 0.4,0.4 + clear + plot cos(x) + set nomultiplot + +@end example + +Please see @ref{multiplot}, @ref{size}, and @ref{origin} for details of these +commands. + +@node exit, fit, clear, Commands +@section exit + +@c ?commands exit +@cindex exit +@cmindex exit + + +The commands @ref{exit} and @ref{quit} and the END-OF-FILE character will exit the +current `gnuplot` command file and @ref{load} the next one. See "help +batch/interactive" for more details. + +Each of these commands will clear the output device (as does the @ref{clear} +command) before exiting. + +@node fit, help, exit, Commands +@section fit + +@c ?commands fit +@cindex fit +@cmindex fit + + +@cindex least-squares + +@cindex Marquardt + +The `fit` command can fit a user-defined function to a set of data points +(x,y) or (x,y,z), using an implementation of the nonlinear least-squares +(NLLS) Marquardt-Levenberg algorithm. Any user-defined variable occurring in +the function body may serve as a fit parameter, but the return type of the +function must be real. + +Syntax: +@example + fit @{[xrange] @{[yrange]@}@} '' + @{datafile-modifiers@} + via '' | @{,,...@} + +@end example + +Ranges may be specified to temporarily limit the data which is to be fitted; +any out-of-range data points are ignored. The syntax is +@example + [@{dummy_variable=@}@{@}@{:@}], +@end example + +analogous to @ref{plot}; see @ref{ranges}. + + is any valid `gnuplot` expression, although it is usual to use a +previously user-defined function of the form f(x) or f(x,y). + + is treated as in the @ref{plot} command. All the `plot datafile` +modifiers (@ref{using}, @ref{every},...) except @ref{smooth} are applicable to `fit`. +See `plot datafile`. + +The default data formats for fitting functions with a single independent +variable, y=f(x), are @{x:@}y or x:y:s; those formats can be changed with +the datafile @ref{using} qualifier. The third item, (a column number or an +expression), if present, is interpreted as the standard deviation of the +corresponding y value and is used to compute a weight for the datum, 1/s**2. +Otherwise, all data points are weighted equally, with a weight of one. + +To fit a function with two independent variables, z=f(x,y), the required +format is @ref{using} with four items, x:y:z:s. The complete format must be +given---no default columns are assumed for a missing token. Weights for +each data point are evaluated from 's' as above. If error estimates are +not available, a constant value can be specified as a constant expression +(see @ref{using}), e.g., `using 1:2:3:(1)`. + +Multiple datasets may be simultaneously fit with functions of one +independent variable by making y a 'pseudo-variable', e.g., the dataline +number, and fitting as two independent variables. See `fit multibranch`. + +The `via` qualifier specifies which parameters are to be adjusted, either +directly, or by referencing a parameter file. + +Examples: +@example + f(x) = a*x**2 + b*x + c + g(x,y) = a*x**2 + b*y**2 + c*x*y + FIT_LIMIT = 1e-6 + fit f(x) 'measured.dat' via 'start.par' + fit f(x) 'measured.dat' using 3:($7-5) via 'start.par' + fit f(x) './data/trash.dat' using 1:2:3 via a, b, c + fit g(x,y) 'surface.dat' using 1:2:3:(1) via a, b, c + +@end example + +After each iteration step, detailed information about the current state +of the fit is written to the display. The same information about the +initial and final states is written to a log file, "fit.log". This file +is always appended to, so as to not lose any previous fit history; it +should be deleted or renamed as desired. + +The fit may be interrupted by pressing Ctrl-C (any key but Ctrl-C under +MSDOS and Atari Multitasking Systems). After the current iteration +completes, you have the option to (1) stop the fit and accept the current +parameter values, (2) continue the fit, (3) execute a `gnuplot` command +as specified by the environment variable FIT_SCRIPT. The default for +FIT_SCRIPT is @ref{replot}, so if you had previously plotted both the data +and the fitting function in one graph, you can display the current state +of the fit. + +Once `fit` has finished, the @ref{update} command may be used to store final +values in a file for subsequent use as a parameter file. See @ref{update} +for details. + +@menu +* adjustable_parameters:: +* beginner's_guide:: +* error_estimates:: +* fit_controlling:: +* multi-branch:: +* starting_values:: +* tips:: +@end menu + +@node adjustable_parameters, beginner's_guide, fit, fit +@subsection adjustable parameters + +@c ?commands fit parameters +@c ?fit parameters +@c ?commands fit adjustable_parameters +@c ?fit adjustable_parameters +@cindex fit_parameters + +There are two ways that `via` can specify the parameters to be adjusted, +either directly on the command line or indirectly, by referencing a +parameter file. The two use different means to set initial values. + +Adjustable parameters can be specified by a comma-separated list of variable +names after the `via` keyword. Any variable that is not already defined is +is created with an initial value of 1.0. However, the fit is more likely +to converge rapidly if the variables have been previously declared with more +appropriate starting values. + +In a parameter file, each parameter to be varied and a corresponding initial +value are specified, one per line, in the form +@example + varname = value + +@end example + +Comments, marked by '#', and blank lines are permissible. The +special form +@example + varname = value # FIXED + +@end example + +means that the variable is treated as a 'fixed parameter', initialized by the +parameter file, but not adjusted by `fit`. For clarity, it may be useful to +designate variables as fixed parameters so that their values are reported by +`fit`. The keyword `# FIXED` has to appear in exactly this form. + + +@node beginner's_guide, error_estimates, adjustable_parameters, fit +@subsection beginner's guide + +@c ?commands fit beginners_guide +@c ?fit beginners_guide +@c ?fit guide +@cindex fitting + +`fit` is used to find a set of parameters that 'best' fits your data to your +user-defined function. The fit is judged on the basis of the the sum of the +squared differences or 'residuals' (SSR) between the input data points and +the function values, evaluated at the same places. This quantity is often +called 'chisquare' (i.e., the Greek letter chi, to the power of 2). The +algorithm attempts to minimize SSR, or more precisely, WSSR, as the residuals +are 'weighted' by the input data errors (or 1.0) before being squared; see +`fit error_estimates` for details. + +That's why it is called 'least-squares fitting'. Let's look at an example +to see what is meant by 'non-linear', but first we had better go over some +terms. Here it is convenient to use z as the dependent variable for +user-defined functions of either one independent variable, z=f(x), or two +independent variables, z=f(x,y). A parameter is a user-defined variable +that `fit` will adjust, i.e., an unknown quantity in the function +declaration. Linearity/non-linearity refers to the relationship of the +dependent variable, z, to the parameters which `fit` is adjusting, not of +z to the independent variables, x and/or y. (To be technical, the +second @{and higher@} derivatives of the fitting function with respect to +the parameters are zero for a linear least-squares problem). + +For linear least-squares (LLS), the user-defined function will be a sum of +simple functions, not involving any parameters, each multiplied by one +parameter. NLLS handles more complicated functions in which parameters can +be used in a large number of ways. An example that illustrates the +difference between linear and nonlinear least-squares is the Fourier series. +One member may be written as +@example + z=a*sin(c*x) + b*cos(c*x). +@end example + +If a and b are the unknown parameters and c is constant, then estimating +values of the parameters is a linear least-squares problem. However, if +c is an unknown parameter, the problem is nonlinear. + +In the linear case, parameter values can be determined by comparatively +simple linear algebra, in one direct step. However LLS is a special case +which is also solved along with more general NLLS problems by the iterative +procedure that `gnuplot` uses. `fit` attempts to find the minimum by doing +a search. Each step (iteration) calculates WSSR with a new set of parameter +values. The Marquardt-Levenberg algorithm selects the parameter values for +the next iteration. The process continues until a preset criterium is met, +either (1) the fit has "converged" (the relative change in WSSR is less than +FIT_LIMIT), or (2) it reaches a preset iteration count limit, FIT_MAXITER +(see @ref{variables}). The fit may also be interrupted +and subsequently halted from the keyboard (see `fit`). + +Often the function to be fitted will be based on a model (or theory) that +attempts to describe or predict the behaviour of the data. Then `fit` can +be used to find values for the free parameters of the model, to determine +how well the data fits the model, and to estimate an error range for each +parameter. See `fit error_estimates`. + +Alternatively, in curve-fitting, functions are selected independent of +a model (on the basis of experience as to which are likely to describe +the trend of the data with the desired resolution and a minimum number +of parameters*functions.) The `fit` solution then provides an analytic +representation of the curve. + +However, if all you really want is a smooth curve through your data points, +the @ref{smooth} option to @ref{plot} may be what you've been looking for rather +than `fit`. + +@node error_estimates, fit_controlling, beginner's_guide, fit +@subsection error estimates + +@c ?commands fit error_estimate +@c ?fit error_estimate +@c ?fit errors +In `fit`, the term "error" is used in two different contexts, data error +estimates and parameter error estimates. + +Data error estimates are used to calculate the relative weight of each data +point when determining the weighted sum of squared residuals, WSSR or +chisquare. They can affect the parameter estimates, since they determine +how much influence the deviation of each data point from the fitted function +has on the final values. Some of the `fit` output information, including +the parameter error estimates, is more meaningful if accurate data error +estimates have been provided. + +The 'statistical overview' describes some of the `fit` output and gives some +background for the 'practical guidelines'. + +@menu +* statistical_overview:: +* practical_guidelines:: +@end menu + +@node statistical_overview, practical_guidelines, error_estimates, error_estimates +@subsubsection statistical overview + +@c ?commands fit error statistical_overview +@c ?fit error statistical_overview +@cindex statistical_overview + +The theory of non-linear least-squares (NLLS) is generally described in terms +of a normal distribution of errors, that is, the input data is assumed to be +a sample from a population having a given mean and a Gaussian (normal) +distribution about the mean with a given standard deviation. For a sample of +sufficiently large size, and knowing the population standard deviation, one +can use the statistics of the chisquare distribution to describe a "goodness +of fit" by looking at the variable often called "chisquare". Here, it is +sufficient to say that a reduced chisquare (chisquare/degrees of freedom, +where degrees of freedom is the number of datapoints less the number of +parameters being fitted) of 1.0 is an indication that the weighted sum of +squared deviations between the fitted function and the data points is the +same as that expected for a random sample from a population characterized by +the function with the current value of the parameters and the given standard +deviations. + +If the standard deviation for the population is not constant, as in counting +statistics where variance = counts, then each point should be individually +weighted when comparing the observed sum of deviations and the expected sum +of deviations. + +At the conclusion `fit` reports 'stdfit', the standard deviation of the fit, +which is the rms of the residuals, and the variance of the residuals, also +called 'reduced chisquare' when the data points are weighted. The number of +degrees of freedom (the number of data points minus the number of fitted +parameters) is used in these estimates because the parameters used in +calculating the residuals of the datapoints were obtained from the same data. + +To estimate confidence levels for the parameters, one can use the minimum +chisquare obtained from the fit and chisquare statistics to determine the +value of chisquare corresponding to the desired confidence level, but +considerably more calculation is required to determine the combinations of +parameters which produce such values. + +Rather than determine confidence intervals, `fit` reports parameter error +estimates which are readily obtained from the variance-covariance matrix +after the final iteration. By convention, these estimates are called +"standard errors" or "asymptotic standard errors", since they are calculated +in the same way as the standard errors (standard deviation of each parameter) +of a linear least-squares problem, even though the statistical conditions for +designating the quantity calculated to be a standard deviation are not +generally valid for the NLLS problem. The asymptotic standard errors are +generally over-optimistic and should not be used for determining confidence +levels, but are useful for qualitative purposes. + +The final solution also produces a correlation matrix, which gives an +indication of the correlation of parameters in the region of the solution; +if one parameter is changed, increasing chisquare, does changing another +compensate? The main diagonal elements, autocorrelation, are all 1; if +all parameters were independent, all other elements would be nearly 0. Two +variables which completely compensate each other would have an off-diagonal +element of unit magnitude, with a sign depending on whether the relation is +proportional or inversely proportional. The smaller the magnitudes of the +off-diagonal elements, the closer the estimates of the standard deviation +of each parameter would be to the asymptotic standard error. + +@node practical_guidelines, , statistical_overview, error_estimates +@subsubsection practical guidelines + +@c ?commands fit error practical_guidelines +@c ?fit error practical_guidelines +@cindex practical_guidelines + +@cindex guidelines + +If you have a basis for assigning weights to each data point, doing so lets +you make use of additional knowledge about your measurements, e.g., take into +account that some points may be more reliable than others. That may affect +the final values of the parameters. + +Weighting the data provides a basis for interpreting the additional `fit` +output after the last iteration. Even if you weight each point equally, +estimating an average standard deviation rather than using a weight of 1 +makes WSSR a dimensionless variable, as chisquare is by definition. + +Each fit iteration will display information which can be used to evaluate +the progress of the fit. (An '*' indicates that it did not find a smaller +WSSR and is trying again.) The 'sum of squares of residuals', also called +'chisquare', is the WSSR between the data and your fitted function; `fit` +has minimized that. At this stage, with weighted data, chisquare is expected +to approach the number of degrees of freedom (data points minus parameters). +The WSSR can be used to calculate the reduced chisquare (WSSR/ndf) or stdfit, +the standard deviation of the fit, sqrt(WSSR/ndf). Both of these are +reported for the final WSSR. + +If the data are unweighted, stdfit is the rms value of the deviation of the +data from the fitted function, in user units. + +If you supplied valid data errors, the number of data points is large enough, +and the model is correct, the reduced chisquare should be about unity. (For +details, look up the 'chi-squared distribution' in your favourite statistics +reference.) If so, there are additional tests, beyond the scope of this +overview, for determining how well the model fits the data. + +A reduced chisquare much larger than 1.0 may be due to incorrect data error +estimates, data errors not normally distributed, systematic measurement +errors, 'outliers', or an incorrect model function. A plot of the residuals, +e.g., `plot 'datafile' using 1:($2-f($1))`, may help to show any systematic +trends. Plotting both the data points and the function may help to suggest +another model. + +Similarly, a reduced chisquare less than 1.0 indicates WSSR is less than that +expected for a random sample from the function with normally distributed +errors. The data error estimates may be too large, the statistical +assumptions may not be justified, or the model function may be too general, +fitting fluctuations in a particular sample in addition to the underlying +trends. In the latter case, a simpler function may be more appropriate. + +You'll have to get used to both `fit` and the kind of problems you apply it +to before you can relate the standard errors to some more practical estimates +of parameter uncertainties or evaluate the significance of the correlation +matrix. + +Note that `fit`, in common with most NLLS implementations, minimizes the +weighted sum of squared distances (y-f(x))**2. It does not provide any means +to account for "errors" in the values of x, only in y. Also, any "outliers" +(data points outside the normal distribution of the model) will have an +exaggerated effect on the solution. + +@node fit_controlling, multi-branch, error_estimates, fit +@subsection fit controlling + +@c ?commands fit_control +@cindex fit_control + +@c ?fit control +There are a number of `gnuplot` variables that can be defined to affect +`fit`. Those which can be defined once `gnuplot` is running are listed +under 'control_variables' while those defined before starting `gnuplot` +are listed under 'environment_variables'. + +@menu +* control_variables:: +* environment_variables:: +@end menu + +@node control_variables, environment_variables, fit_controlling, fit_controlling +@subsubsection control variables + +@c ?commands fit_control variables +@c ?fit_control variables +@c ?fit control variables +The default epsilon limit (1e-5) may be changed by declaring a value for +@example + FIT_LIMIT +@end example + +When the sum of squared residuals changes between two iteration steps by +a factor less than this number (epsilon), the fit is considered to have +'converged'. + +The maximum number of iterations may be limited by declaring a value for +@example + FIT_MAXITER +@end example + +A value of 0 (or not defining it at all) means that there is no limit. + +If you need even more control about the algorithm, and know the +Marquardt-Levenberg algorithm well, there are some more variables to +influence it. The startup value of `lambda` is normally calculated +automatically from the ML-matrix, but if you want to, you may provide +your own one with +@example + FIT_START_LAMBDA +@end example + +Specifying FIT_START_LAMBDA as zero or less will re-enable the automatic +selection. The variable +@example + FIT_LAMBDA_FACTOR +@end example + +gives the factor by which `lambda` is increased or decreased whenever +the chi-squared target function increased or decreased significantly. +Setting FIT_LAMBDA_FACTOR to zero re-enables the default factor of +10.0. + +Oher variables with the FIT_ prefix may be added to `fit`, so it is safer +not to use that prefix for user-defined variables. + +The variables FIT_SKIP and FIT_INDEX were used by earlier releases of +`gnuplot` with a 'fit' patch called `gnufit` and are no longer available. +The datafile @ref{every} modifier provides the functionality of FIT_SKIP. +FIT_INDEX was used for multi-branch fitting, but multi-branch fitting of +one independent variable is now done as a pseudo-3D fit in which the +second independent variable and @ref{using} are used to specify the branch. +See @ref{multi-branch}. + +@node environment_variables, , control_variables, fit_controlling +@subsubsection environment variables + +@c ?commands fit_control environment +@c ?fit_control environment +@c ?fit control environment +The environment variables must be defined before `gnuplot` is executed; how +to do so depends on your operating system. + +@example + FIT_LOG +@end example + +changes the name (and/or path) of the file to which the fit log will be +written from the default of "fit.log" in the working directory. + +@example + FIT_SCRIPT +@end example + +specifies a command that may be executed after an user interrupt. The default +is @ref{replot}, but a @ref{plot} or @ref{load} command may be useful to display a plot +customized to highlight the progress of the fit. + +@node multi-branch, starting_values, fit_controlling, fit +@subsection multi-branch + +@c ?commands fit multi-branch +@c ?fit multi-branch +@cindex multi-branch + +@cindex branch + +In multi-branch fitting, multiple data sets can be simultaneously fit with +functions of one independent variable having common parameters by minimizing +the total WSSR. The function and parameters (branch) for each data set are +selected by using a 'pseudo-variable', e.g., either the dataline number (a +'column' index of -1) or the datafile index (-2), as the second independent +variable. + +Example: Given two exponential decays of the form, z=f(x), each describing +a different data set but having a common decay time, estimate the values of +the parameters. If the datafile has the format x:z:s, then +@example + f(x,y) = (y==0) ? a*exp(-x/tau) : b*exp(-x/tau) + fit f(x,y) 'datafile' using 1:-1:2:3 via a, b, tau + +@end example + +For a more complicated example, see the file "hexa.fnc" used by the +"fit.dem" demo. + +Appropriate weighting may be required since unit weights may cause one +branch to predominate if there is a difference in the scale of the dependent +variable. Fitting each branch separately, using the multi-branch solution +as initial values, may give an indication as to the relative effect of each +branch on the joint solution. + +@node starting_values, tips, multi-branch, fit +@subsection starting values + +@c ?commands fit starting_values +@c ?fit starting_values +@cindex starting_values + +Nonlinear fitting is not guaranteed to converge to the global optimum (the +solution with the smallest sum of squared residuals, SSR), and can get stuck +at a local minimum. The routine has no way to determine that; it is up to +you to judge whether this has happened. + +`fit` may, and often will get "lost" if started far from a solution, where +SSR is large and changing slowly as the parameters are varied, or it may +reach a numerically unstable region (e.g., too large a number causing a +floating point overflow) which results in an "undefined value" message +or `gnuplot` halting. + +To improve the chances of finding the global optimum, you should set the +starting values at least roughly in the vicinity of the solution, e.g., +within an order of magnitude, if possible. The closer your starting values +are to the solution, the less chance of stopping at another minimum. One way +to find starting values is to plot data and the fitting function on the same +graph and change parameter values and @ref{replot} until reasonable similarity +is reached. The same plot is also useful to check whether the fit stopped at +a minimum with a poor fit. + +Of course, a reasonably good fit is not proof there is not a "better" fit (in +either a statistical sense, characterized by an improved goodness-of-fit +criterion, or a physical sense, with a solution more consistent with the +model.) Depending on the problem, it may be desirable to `fit` with various +sets of starting values, covering a reasonable range for each parameter. + +@node tips, , starting_values, fit +@subsection tips + +@c ?commands fit tips +@c ?fit tips +@cindex tips + +Here are some tips to keep in mind to get the most out of `fit`. They're not +very organized, so you'll have to read them several times until their essence +has sunk in. + +The two forms of the `via` argument to `fit` serve two largely distinct +purposes. The `via "file"` form is best used for (possibly unattended) batch +operation, where you just supply the startup values in a file and can later +use @ref{update} to copy the results back into another (or the same) parameter +file. + +The `via var1, var2, ...` form is best used interactively, where the command +history mechanism may be used to edit the list of parameters to be fitted or +to supply new startup values for the next try. This is particularly useful +for hard problems, where a direct fit to all parameters at once won't work +without good starting values. To find such, you can iterate several times, +fitting only some of the parameters, until the values are close enough to the +goal that the final fit to all parameters at once will work. + +Make sure that there is no mutual dependency among parameters of the function +you are fitting. For example, don't try to fit a*exp(x+b), because +a*exp(x+b)=a*exp(b)*exp(x). Instead, fit either a*exp(x) or exp(x+b). + +A technical issue: the parameters must not be too different in magnitude. +The larger the ratio of the largest and the smallest absolute parameter +values, the slower the fit will converge. If the ratio is close to or above +the inverse of the machine floating point precision, it may take next to +forever to converge, or refuse to converge at all. You will have to adapt +your function to avoid this, e.g., replace 'parameter' by '1e9*parameter' in +the function definition, and divide the starting value by 1e9. + +If you can write your function as a linear combination of simple functions +weighted by the parameters to be fitted, by all means do so. That helps a +lot, because the problem is no longer nonlinear and should converge with only +a small number of iterations, perhaps just one. + +Some prescriptions for analysing data, given in practical experimentation +courses, may have you first fit some functions to your data, perhaps in a +multi-step process of accounting for several aspects of the underlying +theory one by one, and then extract the information you really wanted from +the fitting parameters of those functions. With `fit`, this may often be +done in one step by writing the model function directly in terms of the +desired parameters. Transforming data can also quite often be avoided, +though sometimes at the cost of a more difficult fit problem. If you think +this contradicts the previous paragraph about simplifying the fit function, +you are correct. + +A "singular matrix" message indicates that this implementation of the +Marquardt-Levenberg algorithm can't calculate parameter values for the next +iteration. Try different starting values, writing the function in another +form, or a simpler function. + +Finally, a nice quote from the manual of another fitting package (fudgit), +that kind of summarizes all these issues: "Nonlinear fitting is an art!" + +@node help, if, fit, Commands +@section help + +@c ?commands help +@cindex help +@cmindex help + + +The @ref{help} command displays on-line help. To specify information on a +particular topic use the syntax: + +@example + help @{@} + +@end example + +If is not specified, a short message is printed about `gnuplot`. +After help for the requested topic is given, a menu of subtopics is given; +help for a subtopic may be requested by typing its name, extending the help +request. After that subtopic has been printed, the request may be extended +again or you may go back one level to the previous topic. Eventually, the +`gnuplot` command line will return. + +If a question mark (?) is given as the topic, the list of topics currently +available is printed on the screen. + +@node if, load, help, Commands +@section if + +@c ?commands if +@cindex if +@cmindex if + + +The @ref{if} command allows commands to be executed conditionally. + +Syntax: +@example + if () + +@end example + + will be evaluated. If it is true (non-zero), then the command(s) +of the will be executed. If is false (zero), then +the entire is ignored. Note that use of `;` to allow multiple +commands on the same line will _not_ end the conditionalized commands. + +Examples: +@example + pi=3 + if (pi!=acos(-1)) print "?Fixing pi!"; pi=acos(-1); print pi +@end example + +will display: +@example + ?Fixing pi! + 3.14159265358979 +@end example + +but +@example + if (1==2) print "Never see this"; print "Or this either" +@end example + +will not display anything. + +See @ref{reread} for an example of how @ref{if} and @ref{reread} can be used together to +perform a loop. + +@node load, pause, if, Commands +@section load + +@c ?commands load +@cindex load +@cmindex load + + +The @ref{load} command executes each line of the specified input file as if it +had been typed in interactively. Files created by the @ref{save} command can +later be @ref{load}ed. Any text file containing valid commands can be created +and then executed by the @ref{load} command. Files being @ref{load}ed may themselves +contain @ref{load} or @ref{call} commands. See `comment` for information about +comments in commands. To @ref{load} with arguments, see @ref{call}. + +The @ref{load} command _must_ be the last command on a multi-command line. + +Syntax: +@example + load "" + +@end example + +The name of the input file must be enclosed in quotes. + +The special filename "-" may be used to @ref{load} commands from standard input. +This allows a `gnuplot` command file to accept some commands from standard +input. Please see "help batch/interactive" for more details. + +Examples: +@example + load 'work.gnu' + load "func.dat" + +@end example + +The @ref{load} command is performed implicitly on any file names given as +arguments to `gnuplot`. These are loaded in the order specified, and +then `gnuplot` exits. + +@node pause, plot, load, Commands +@section pause + +@c ?commands pause +@cindex pause +@cmindex pause + + +The @ref{pause} command displays any text associated with the command and then +waits a specified amount of time or until the carriage return is pressed. +@ref{pause} is especially useful in conjunction with @ref{load} files. + +Syntax: +@example + pause