[OS X TeX] How to plot functions with PGF and TeXShop ?

Franck Pastor pastor at fusl.ac.be
Sun Jan 15 12:37:37 EST 2006


I meant: same directory... and it doesn't work, anyway.

Franck Pastor

Le 15-janv.-06 à 18:30, Peter Lichtner a écrit :

> It worked fine for me with TeXShop---after I installed pgf in ~/ 
> Library/texmf/tex/latex.
> ...Peter
>
> On Jan 15, 2006, at 3:44 AM, Franck Pastor wrote:
>
>> Hello,
>>
>> I'm facing a strange problem with PGF (a package for drawings, by  
>> Till Tantau, that I am currently testing) and TeXShop. This  
>> package needs and calls Gnuplot to plot functions. To do this, you  
>> have to call pdflatex with the option "shell-escape". Here is an  
>> example:
>>
>> \documentclass{article}
>> \usepackage{tikz}
>> \begin{document}
>> \begin{tikzpicture}[domain=0:4]
>> \draw[very thin,color=gray] (-0.1,-1.1) grid (3.9,3.9);
>> \draw[->] (-0.2,0) -- (4.2,0) node[right] {$x$};
>> \draw[->] (0,-1.2) -- (0,4.2) node[above] {$f(x)$};
>> \draw[color=red] plot[id=x] function{x} node[right] {$f(x) =x$};
>> \draw[color=blue] plot[id=sin] function{sin(x)} node[right] {$f(x)  
>> = \sin x$};
>> \draw[color=orange] plot[id=exp] function{0.05*exp(x)} node[right]  
>> {$f(x) = \frac{1}{20} \mathrm e^x$};
>> \end{tikzpicture}
>> \end{document}
>>
>> If I name this program "pgf-test.tex", and if I enter in the  
>> Terminal:
>>
>> pdflatex --shell-escape pgf-test.tex
>>
>> everything works fine. But if I compile it with TeXShop (whose  
>> preferences are set to "--shell-escape", of course), the functions  
>> are not drawn ! And I can't understand why. It seems that TeXShop  
>> can't find Gnuplot, which is installed in /sw/bin via Fink.
>>
>> Any idea to help me understand this problem (and solve it if  
>> possible) ?
>>
>> Thanks,
>>
>> Franck Pastor
>> ------------------------- 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/
>>
>
> <><><><><><><><><><><><><><><><><><><><><>
> Peter C. Lichtner (lichtner at lanl.gov)
> LANL EES-6: MS D469
> (505) 667-3420 (o)
> (505) 665-3285 (fax)
> Los Alamos National Laboratory
> SM-30 Bikini Atoll Road
> Los Alamos, NM 87545
> <><><><><><><><><><><><><><><><><><><><><>
>
>
>
> ------------------------- 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/
>

------------------------- 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