[Tex/LaTex] Semantics for parametric plots with pgfplots


I wasn't able to find in the pgfplots manual the exact semantics for pairwise mathematical expressions. Could you clarify the following variations?

% Assume x(t) is parametrized by t in [0,1] and consider f(x) and g(x)
% two arbitrary functions of x. What is the semantics for a), b) and c)?
\addplot[domain=0:1] ({f(x)},{g(x)});             % a)
\addplot[domain=0:1,variable=\t] ({f(t)},{g(t)}); % b)
\addplot[domain=0:1,variable=\t] ({f(t)},{g(x)}); % c)

Best Answer

The following trivial experiment answers the question:


\begin{axis}[legend entries={foo,bar,baz}]
\addplot[blue,mark=+,domain=0:1] ({x+1},{x^2});
\addplot[red,domain=0:1,variable=\t] ({t+1},{t^2});
\addplot[yellow,domain=0:1,variable=\t] ({t+1},{x^2});


a) cross-plot of f(x) and g(x) varying x from 0 to 1

b) the same as a), replacing x by t

c) t varies from 0 to 1, f(t) is computed to produce x, and finally g(x) is computed

Related Question