[OS X TeX] [Sort-of Off]: Plotting Software

markus bongard markus.bongard at umh.es
Wed Mar 8 15:37:13 EST 2006


gentle persons,

On 8 Mar 2006, at 20:17, Alain Schremmer wrote:

>
> Given:
>
>    10.3.9 with X11 installed from the Panther Disk.
>    Aquaterm 1.0
>    Gnuplot 4.0.0 installed from the dmg in "/usr/loc" (?????) with no
>    comment from the Installer
>
> (1) How do I find "the folder which contains gnuplot"? The Finder  
> doesn's seem to know. It is not in alainschremmer/Applications, it  
> is not in alainschremmer/Library (where texmf is). I imagine the  
> terminal would tell me, but
>
> (2) I open the Terminal. What do I type?

first try to see wether the path to gnuplot is know by the system by  
typing into the terminal ("[alainscomputer:~] alain%" marks the  
terminal prompt in the following):

[alainscomputer:~] alain%   which gnuplot

should give you:

/usr/local/bin/gnuplot

as output. If not, check wether gnuplot is located in /usr/local/bin  
by typing:

[alainscomputer:~] alain%   ls /usr/local/bin/gnu*

if it is there, you have to extend the system path to include /usr/ 
local/bin  *I'm not sure wether MacOSX is automatically looking there?*
Please type:

[alainscomputer:~] alain%   echo $PATH

in your shell. The output should be someting like:

/usr/local/bin:/sw/bin:/Users/slarti/bin:/opt/root/bin:/usr/local/ 
mysql/bin/:/opt/local/bin/port:/bin:/sbin:/usr/bin:/usr/sbin:/usr/ 
local/teTeX/bin/powerpc-apple-darwin-current

*I simply don't know what is assigned on a vanilla system, but taken  
in account that you're subscribed to a TeX-list, some path at leaast  
to TeX will presumably show up*

Then you have to find out which shell you are running. You can get  
this information for example via the menu of Terminal. Choose  
terminal -> Windows Settings , the "Terminal Inspector" should open  
up. Select "Window" from the pop-up menu in the upper part of the  
inspector, and activate the "Shell Command Name" checkbox. This  
should put the name of the shell you use into the terminal window  
title bar.

Now in principle - when you are using the tcsh shell (terminal   
window title says something like "tcsh …)) -  with this knowledge you  
can extend the path in which the system looks for executables by  
typing into the terminal window:

[alainscomputer:~] alain% setenv PATH /usr/local/bin:$PATH

if you are on bash, type:

alainscomputer:~] alain%  export PATH=/usr/local/bin:$PATH

after the path assignment (wether in tcsh or bash) try to start  
gnuplot within the terminal by typing:

alainscomputer:~] alain%  gnuplot

gnuplot should start and you should see some information displayed in  
the terminal window like:


alainscomputer:~] alain%  gnuplot

        G N U P L O T
         Version 4.0 patchlevel 0
         last modified Thu Apr 15 14:44:22 CEST 2004
         System: Darwin 8.5.0

         Copyright (C) 1986 - 1993, 1998, 2004
         Thomas Williams, Colin Kelley and many others

         This is gnuplot version 4.0.  Please refer to the documentation
         for command syntax changes.  The old syntax will be accepted
         throughout the 4.0 series, but all save files use the new  
syntax.

         Type `help` to access the on-line reference manual.
         The gnuplot FAQ is available from
                 http://www.gnuplot.info/faq/

         Send comments and requests for help to
                 <gnuplot-info at lists.sourceforge.net>
         Send bugs, suggestions and mods to
                 <gnuplot-bugs at lists.sourceforge.net>


Terminal type set to 'aqua'


(The last info might be "Terminal type set to 'unknown'" (instead of  
'aqua'). ) You started successfully gnuplot! Now for a few gnuplot  
commands - the terminal input prompt has changed, because we're  
inside a running gnuplot session. Just type:

gnuplot>  set terminal aqua

you will see something like:

gnuplot> set terminal aqua
Terminal type set to 'aqua'
Options are '0 title 'Figure 0' size 846 594 fname 'Times-Roman'   
fsize 14'

this is the notification by gnuplot that now the "aqua"-terminal (and  
therefore the external Aquaterm) is used to display any plot.  
Additionally some information about the size of the plot windows taht  
will open and their title is given.

type:

gnuplot> plot sin(x)

gnuplot will start aquaterm, a Figure 0" titled window will open,  
displaying the function in 2D.

type:

gnuplot> splot sin(x)

this should change the window content to a 3D display of the  
function. At this point it is the right time to look for some gnuplot  
information. form within gnuplot you can just type:

gnuplot> help

this displays the online-help.  Get the official tutorial from here - 
 > http://www.gnuplot.info/docs/tutorial.pdf . The official online- 
manual is here -> http://www.gnuplot.info/docs/gnuplot.html. While  
this is in the beginning probly quite "scary", there are ways to  
"ease the pain":

The offical manual for example has a "GUI-section" which is  
referencing (between others) to Xgfe, which is the X11-based  
original, of the previously here mentioned GUI Qgfe (of course, if  
you like to stay with X11, one can install Xgfe using for example  
fink). Using Qgfe you don't have to remember most of the gnuplot  
commands precisely, just provide the required input via the GUI and  
click the "plot"-button. Qgfe does not provide access to all possible  
options of gnuplot, but to many of them - and from my experience it  
relieves the user, because you just have to remember the "gnuplot  
way" of plotting as a work flow, the required commands are simply put  
together by Qgfe. IMHO, if one gets used to it, gnuplot provides a  
fast and efficient way to produce plots with a more or less unmatched  
flexibility in output. Of course there are other packages which  
provide for example much more sophisticated lightning effects on  
surfaces, etc., but on broad application gnuplot is something like  
the gimp-of-the-plotting programs. On the free programs side I use  
gnuplot for something which one can call "rapid prototyping of plots"  
- gnuplot allows me to see how it looks, and maybe using another or  
additional software, it is possible to make it up. Last not least  
there are modules which allow you to use gnuplot from a variety of  
programming languages.

Well, maybe it's time time to collect some more input here and then  
start writing some nicely layouted synopsis?

cheers,

Markus Bongard





------------------------- Info --------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
          & FAQ: http://latex.yauh.de/faq/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/




More information about the MacOSX-TeX mailing list