Am 06.11.2010 10:12, schrieb Stefan Pinnow:
> Hello Christian,
>
>    
>>>> \documentclass[10pt]{article}
>>>> \usepackage{tikz}
>>>> \pagestyle{empty}
>>>>
>>>> \begin{document}
>>>> \begin{tikzpicture}
>>>> \draw[->,color=black] (0,-5) -- (0,5); \draw[->,color=black] (-8,0)
>>>> -- (8,0);
>>>>
>>>> %\draw[color=blue,samples=200,domain=0.001:8] plot
>>>> (\x,{exp(1.0/3*ln(\x)}); \draw[color=green,smooth,samples=100]
>>>> plot[domain=0.01:8.0] (\x,{\x^(1./3)}); %
>>>> \draw[color=red,samples=400,domain=0.0001:8] plot function
>>>> {x**(1./3)}; \end{tikzpicture} \end{document}
>>>>
>>>> \x^(1/3) gives a bad result
>>>>
>>>> correct is the syntax with exp and ln or with gnuplot
>>>>
>>>> correct also but very slow
>>>>
>>>> \documentclass[10pt]{article}
>>>> \usepackage{fp,tikz}
>>>> \usetikzlibrary{fixedpointarithmetic}
>>>> \pagestyle{empty}
>>>>
>>>> \begin{document}
>>>> \begin{tikzpicture}
>>>> \draw[->,color=black] (0,-5) -- (0,5); \draw[->,color=black] (-8,0)
>>>> -- (8,0);
>>>>
>>>> %\draw[color=blue,samples=200,domain=0.001:8] plot
>>>> (\x,{exp(1.0/3*ln(\x)}); \pgfkeys{/pgf/fixed point arithmetic}
>>>> \draw[color=green,smooth,samples=100] plot[domain=0.01:8.0]
>>>> (\x,{\x^(1./3)}); % \draw[color=red,samples=400,domain=0.0001:8] plot
>>>> function {x**(1./3)}; \end{tikzpicture} \end{document}
>>>>
>>>>          
>>> also interesting is, that pgfplots brings the correct graph. Is the
>>> fp/fpu library used by default there?
>>>
>>> \documentclass{article}
>>>       \usepackage{tikz}
>>>       \usepackage{pgfplots}
>>> \begin{document}
>>> \begin{tikzpicture}
>>>       \begin{axis}
>>>           \addplot [domain=0.01:4,samples=100] {x^(1.0/3)};
>>>       \end{axis}
>>> \end{tikzpicture}
>>>
>>> \end{document}
>>>
>>>
>>>
>>> Best regards,
>>> Stefan
>>>
>>>        
>> Hello,
>>
>> I fear the '\x'  macro in pgf can be considered as a bug... I think that
>> using '(\x)' instead of '\x' will fix those problems. Note that your
>> pgfplots example doesn't use '\x' -- it uses 'x' only which is a
>> different feature.
>>      
> uups. It seems that I have responded to the wrong mailing list ... Sorry.
>
> Ok, good to know that this is another feature. Anyway, will this be fixed in
> the next version or is it too hard to track down?
>    
Hello Stefan,

I considerer this to be a bug (or maybe missing feature) in pgf which 
should be fixed in the next pgf release.

It occured as side-effect of a bugfix in the pgf math parser: in pgf 
2.00,  -2^2 was 4 instead of -4;  and \x^2 for '\x=-2' expanded to -2^2. 
Now, -2^2 is -4 --- and the \x macro should be changed to contain '(-2)' 
such that constructions like \x^2 are always positive, I guess.

@Mark I would be glad if you could look into this issue... I fear I am 
quite short on time this month.

Best regards

Christian

------------------------------------------------------------------------------
The Next 800 Companies to Lead America's Growth: New Video Whitepaper
David G. Thomson, author of the best-selling book "Blueprint to a 
Billion" shares his insights and actions to help propel your 
business during the next growth cycle. Listen Now!
http://p.sf.net/sfu/SAP-dev2dev
_______________________________________________
Pgfplots-features mailing list
Pgfplots-features@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pgfplots-features

Reply via email to