[OS X TeX] TKZplot2d for tikz/pgf problem.

Alain Matthes alain.matthes at mac.com
Mon May 14 18:30:36 CEST 2007


Le 14 mai 07 à 17:54, Frank STENGEL a écrit :

>
> Le 14 mai 07 à 16:19, Alain Matthes a écrit :
>
> <snip>
>
>> You need to make this
>> \tkzfctpt[type=$\bullet$]((-1),\tkzfcta){A}
>>
>> because -1 give an error (-1) is necessary
>
> As far as I know the problem stems from the fact that - is not seen  
> as a unary - when the need arises (see the readme in fp.sty) Why  
> not have
>
> \FPeval\x{(#2)}%

  it's a fine idea, I had tested but without success but now that  
works ??

>
> instead ? There will still be prblems with expressions like -(\x-exp 
> (\x)).

\tkztg[color=blue,lw=.8pt,kr=0.2,kl=0.2]{\tkzfcta}({1-1/exp(1)})

works fine but the problems are different between tkztg and tksfctpt

> By the way why alternate between \x and x in the examples?


the problem arrives if xstep is used when the values of x are   
between 2000 and 20000.
The values that gnuplot gives in its table are too large for
  tikz

I use \def\x{(x/\xunit)} \xunit depends on xstep.

I don't know how to make this without \x

example :

\begin{tikzpicture}[scale=1.5]
   \tkzinit[xmin=0,xmax=800,xstep=100,ymin=0,ymax=2000,ystep=400]
\tkzgrid[color=bistre,sub,subxstep=50,subystep=200](0,0)(800,2000)
   \tkzx
   \tkzy
   \tkzfct[color=red,label=false,samples=100,lw=0.8pt](0..800)%
     {(1./90000)*\x*\x*\x-(1./100)*\x*\x+(113./36)*\x}
   \tkzpt[coord](450,400){A}
   \tkzpt(800,1800){}
   \tkztg[color=blue,lw=.8pt,kr=300,kl=450]{\tkzfcta}(450)
   \tkztxt[style    = {draw},%
           color    = black,%
           bkgcolor = bistre!50,%
           opacity  = 0.8]%
        (300,1200)%
{$f(x)=\dfrac{1}{90000}x^3 -\dfrac{1}{{100}}x^2 +\dfrac{113}{36}x$}

\end{tikzpicture}

Alain 
------------------------- Helpful Info -------------------------
Mac-TeX Website: http://www.esm.psu.edu/mac-tex/
TeX FAQ: http://www.tex.ac.uk/faq
List Archive: http://tug.org/pipermail/macostex-archives/
List Reminders & Etiquette: http://www.esm.psu.edu/mac-tex/list/





More information about the macostex-archives mailing list