0
$\begingroup$

I have a function that plots properly in PolarPlot, but I'd like to plot it in ParametricPlot and then switch the y and x values, or ordinate and abscissa. It doesn't work for my function, but I'm not sure if it's just my function or some other subtle problem:

r[phi_] := (6*(Cos[phi]^5)/(2*Pi))^0.5;
PolarPlot[r[phi], {phi, 0, Pi}]
new[x_] := CoordinateTransform["Polar" -> "Cartesian", {Re[r[x]], x}];
ParametricPlot[{new[x], x}, {x, 0, Pi}]
ParametricPlot[{x, new[x]}, {x, 0, Pi}]

Generates:

enter image description here

enter image description here

enter image description here

The final plot doesn't contain anything, and no errors or warnings are output.

$\endgroup$

1 Answer 1

3
$\begingroup$

Your function new[x] returns an ordered pair, which you're then placing in a list to make a new ordered pair. Try this instead:

ParametricPlot[new[x], {x, 0, Pi}]
ParametricPlot[Reverse@new[x], {x, 0, Pi}]
$\endgroup$
2
  • $\begingroup$ Thanks! I don't know why {new[x], x} worked in the first place, but I don't actually care now... $\endgroup$
    – user8454
    Jun 4, 2014 at 21:48
  • 1
    $\begingroup$ It worked because your list effectively requested two parametric plots (new[x] and x), though the second parametric plot was underspecified and thus ignored by MMA. $\endgroup$
    – Cassini
    Jun 4, 2014 at 21:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.