If your data are for a curve in polar coordinates, $$a(t)+ib(t)=r(t)e^{iθ(t)},$$
then you probably want to trace
\begin{align}
r&=e^{-iθ}(a+ib)
\\
&=\bigl(\cos(θ)a+\sin(θ)b\bigr)+i\bigl(\cos(θ)b-\sin(θ)a\bigr).
\end{align}
If you compute $θ$ as the argument of $a+ib$, be sure to correct for the right quadrant when using the arcus tangent function, or use the often available argument function theta=atan2(b,a).
If your data are for a curve in polar coordinates, $$a(t)+ib(t)=r(t)e^{iθ(t)},$$ then you probably want to trace \begin{align} r&=e^{-iθ}(a+ib) \\ &=\bigl(\cos(θ)a+\sin(θ)b\bigr)+i\bigl(\cos(θ)b-\sin(θ)a\bigr). \end{align}
If you compute $θ$ as the argument of $a+ib$, be sure to correct for the right quadrant when using the arcus tangent function, or use the often available argument function
theta=atan2(b,a).