I tried to plot this graph using tikz and pgfplots. The code compiled just fine, but I got a peculiar result that I can't explain. My code.
\documentclass{article}
\usepackage{amsmath}
\usepackage{tikz}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[xlabel=$x$,ylabel=$y$,
xmin=-6,xmax=6,ymin=-6,ymax=6, axis lines=center, axis equal]
\addplot[domain=-6:6,color=blue,samples=400]({sin(\x^2+\y^2)},{cos(\x*\y r)});
\end{axis}
\end{tikzpicture}
\end{document}
This is the riddle I was presented with.
The shape my code produced (a line, strangely enough) perplexes me. I truly have no idea what I did wrong. Is there any internal process at fault? Can you please modify my code in such a way that the desired plot will actually show up? I'd be grateful if you (kind users who already mastered tikz and pgfplots) would help me. Thank you in advance.




pgfplotslike that. Try for example http://tex.stackexchange.com/questions/18359/plotting-an-implicit-function-using-pgfplots – Torbjørn T. Mar 30 '17 at 15:16pgfplots. – God bless Mar 30 '17 at 15:16pgfplotscannot, as far as I know, plot implicit functions they way you're trying. – Torbjørn T. Mar 30 '17 at 17:28pgfplotscan't do the desired work. I think you misunderstood me. – God bless Mar 30 '17 at 17:32splotline withsin(x^2+y^2)-cos(x*y), then you get an approximation, though the precision isn't good. – Torbjørn T. Mar 30 '17 at 17:33