r/LaTeX•
tennispro81

Shade the area inside a polar curve.

I am trying to plot a Limacon y=1-2sinx, which is not a problem, but trying to figure out how to shade the area is proving challening. I have been able to shade a petal for a rose, but can't find much on how to shade my limacon. I want to shade all but the inner loop of the following graph.

\begin{tikzpicture}



  \begin{axis}[

xmin=-2, xmax=2,

ymin=-4, ymax=2,

axis lines = center,

]

    \addplot[very thick,domain=0:360,samples=300,color=red,data cs=polar] (x,{1-2*sin(x)});        

  \end{axis}



\end{tikzpicture}

I have tried a fill command, and addplot, without any success. Any help would be appreciated.

Posted Mar 8, 2025, 12:45 PM UTC

23
Loading comments…