# Polar Plot of a two variable function

I am trying to make a polar plot of a two variable function, which has a radial and an angular part. For instance Y[r,φ]=r^2 Cos[φ].

I can make this plot using ContourPlot, but is there a way to do it using PolarPLot? My ContourPlot is

Y[r_, f_] := r^2 Cos[f]
ContourPlot[Y[Sqrt[x^2 + y^2], ArcTan[x, y]], {x, 0, 1}(*Radius till 1*), {y, 0, 60}(*Angle from 0 to 60*)]


• The argument of Cos, ArcTan etc. is assumed to be in radians, multiply by Degree to convert from degrees. – VLC Feb 22 '13 at 13:49
• Well, the help on PolarPlot[] states "Use ContourPlot and RegionPlot for implicit curves and regions:" – Dr. belisarius Feb 22 '13 at 14:13
• @VLC:Thank's for that! I didn't know it!!! – Thanos Feb 22 '13 at 14:16
• @belisarius: I've seen, but I would like to plot this two variable function in the most efficient way...and I am not sure on how to do it without polar plot... – Thanos Feb 22 '13 at 14:58
• Well, I just posted an answer :) – Dr. belisarius Feb 22 '13 at 14:59

PolarPlot[] is a handicapped plotting function (it doesn't support Filling, for example). Much easier with other functions:

h[r_, f_] := r^2 Cos[f]
Quiet@Show[
ContourPlot[h[Sqrt[x^2 + y^2], ArcTan[x, y]], {x, 0, 1}, {y, 0, 1},
RegionFunction -> Function[{x, y, f}, 0 < ArcTan[x, y] < Pi/3 && x^2 + y^2 < 1],
Contours -> 10,  AspectRatio -> 1],
Graphics@Circle[]]


Another possibility:

Plot3D[h[Sqrt[x^2 + y^2], ArcTan[x, y]],
{x, -1, 1},
{y, -1, 1},
AspectRatio -> 1,
ColorFunction -> "SunsetColors",
MeshFunctions -> {#3 &},
Mesh -> 7,
PlotStyle -> Directive[Specularity[White, 50], Opacity[0.8]]]


You may even draw your Pi/3 angle on the surface:

Plot3D[h[Sqrt[x^2 + y^2], ArcTan[x, y]],
{x, -1, 1},
{y, -1, 1},
AspectRatio -> 1,
ColorFunction -> "SunsetColors",
MeshFunctions -> {UnitBox@(ArcTan[#2, #1] - Pi/3) &},
Mesh -> 7,
PlotStyle -> Directive[Specularity[White, 50], Opacity[0.8]]]


• I believe the first plot should be fine!!! Thank you! – Thanos Feb 22 '13 at 15:33