2

enter image description here

Please, how do I rotate the following polar plot without rotating its grid lines and polar axis lines? To make it clearer, I just want to rotate the petals alone without rotating any axis or grid lines.

\usepgfplotslibrary{polar}
\pgfplotsset{compat=newest}

\begin{document}

 \begin{tikzpicture}
   \begin{polaraxis}[rotate=72]
     \addplot[mark=none,domain=0:360,samples=300] {cos(5*x)};
   \end{polaraxis}
 \end{tikzpicture}

\end{document}
2
  • 1
    This sounds like a math problem, not a TeX one: cos(5*x + 72)? Commented Nov 20, 2022 at 4:15
  • I just tried your suggestion and it didn’t work. It’s actually a TeX problem. I just want to use the rotate option in the polaraxis environment. Commented Nov 20, 2022 at 4:24

1 Answer 1

3

Try this:

\documentclass[10pt,a4paper]{article}
\usepackage{pgfplots}
    \usepgfplotslibrary{polar}
    \pgfplotsset{compat=newest}
    
    \begin{document}
        
        \begin{tikzpicture}
            \begin{polaraxis}
                \addplot[mark=none,domain=0:360,samples=300,rotate=30] {cos(5*x)};
            \end{polaraxis}
        \end{tikzpicture}
        
    \end{document}
\end{document}

Output:

enter image description here

Attention: The plot is invariant for rotations of 72°. So I used 30° to see the rotation.

1
  • Thanks for giving attention to my question. I was working with more than one domain but with this, I have been able to move forward. I tried your suggestion before posting, for one domain instead of all domains. Your answer prompted me to do the right thing. I really appreciate. Commented Nov 20, 2022 at 5:06

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .