# Graphing an astroid - parametric curves in pgfplots

So I am trying to create a plot of an astroid in pgfplots which has the parameterization x = cos(t)^3 y= sin(t)^3 and tikz is giving me an error that it is giving up on a path and wondering if I forgot a semicolon, but I did not.

Any ideas of how I can fix this? Any help is appreciated.

MWE:

\documentclass{minimal}
\usepackage{pgfplots}
\usepackage{tikz}

\pgfplotsset{compat=1.10}

\begin{document}

\begin{tikzpicture}
\begin{axis}[axis x line =middle, axis y line = middle,thick, smooth]
\addplot[domain=0:2*pi](cos(deg(x)),x);  %this line works like a charm
\addplot[domain=0:2*pi](x,sin(deg(x)));  %this line does not work
\end{axis}
\end{tikzpicture}

\end{document}

-
use {} : \addplot[domain=0:2*pi]({cos(deg(x))^3},{sin(deg(x))^3}) ; –  Vincent Nivoliers Jun 3 at 15:44
@VincentNivoliers yes that worked exactly! why does it need braces here when other parameterizations don't? –  ian Jun 3 at 15:47
from the manual, page 53, it has to do with the fact that you use round braces in the expression, and that round braces are already used to enclose the list of coordinates. This is therefore probably due the the parser used for mathematical expressions. –  Vincent Nivoliers Jun 3 at 15:55
@VincentNivoliers, please convert your comment to an answer if it has resolved OP's problem. –  Pouya Jun 3 at 20:36

You should use {} : \addplot[domain=0:2*pi]({cos(deg(x))^3},{sin(deg(x))^3}) ;