I deal with two functions f[r,a], where r and a represent modulus and phase of complex number, i.e. z=r*Exp[I*a].
I obtain 2D array in the following way,
lst=Table[Abs[f[r,a]], {a,0,2*Pi,2*Pi/100}, {r,0,1,0.01}]
I would like to see for which values of a and r the value of Abs[f[r,a]] is close to 1. To do it, I use ListContourPlot function and obtain
But I have a vague feeling that in my set up it is more appropriate to visualize in polar coordinates. To do it, I perform
values = Table[{r*Cos[a], r*Sin[a], Abs[f[r,a]},
{a, 0, 2*Pi, 2*Pi/100}, {r, 0, 1.0, 0.01}]
and then ListContourPlot for obtained values array.
However, resulting plot seems wrong,
To be honest, I do not understand what did I wrong. I try to find something about ListContourPlot in polar coordinates but it was unsuccessful (for instance, see this).
Let me clarify my point of concern. For simplicity, consider the function
f[r_, a_] := Cos[a]/(1 + r^2).
Having cells evaluated, I obtain
Now, it seems correct to use TransformField
tf = TransformedField["Polar" -> "Cartesian",
f[r, a], {r, a} -> {x, y}]
and then use ContourListPlot, which results
The last two pictures are plotted for the same function f but they are different





values = Table[Table[{r*Cos[a], r*Sin[a], Abs[f[r, a]}, {a, 0, 2*Pi, 2*Pi/100}, {r, 0, 1.0, 0.01}]is syntactically incorrect. The brackets are pink in the notebook so you should be able to tell they are unmatched. Also Table[Table is unnecessary, as a single Table can already take multiple iterators at the end. The reason it's looking bad is because you need to interpolate those points into a grid for ListContourPlot. AlsoAbs[f[r,a]is missing a bracket and you need to give a definition offor at least a simple example one. – flinty Jan 07 '22 at 12:41f, so most of your issues are syntax related:f[r_, a_] := Cos[a]/(1 + r^2); values = Flatten[Table[ {r*Cos[a], r*Sin[a], Abs[f[r, a]]} , {a, 0, 2*Pi, 2*Pi/100}, {r, 0, 1.0, 0.01} ], 1]; ListContourPlot[values]– flinty Jan 07 '22 at 12:45Flatten[..., 1]like in my example above to remove the extra lists. – flinty Jan 07 '22 at 12:47Flattentat the first level of list. If not, I would not obtain the 2nd plot from my question – Artem Alexandrov Jan 07 '22 at 12:49Table[{r*Cos[a], r*Sin[a], Abs[f[r, a]]}, {a, 0, 2*Pi, 2*Pi/100}, {r, 0, 1.0, 0.01}], 1]; ListContourPlot[values]``` This should work - but I cannot tell because you haven't provided your `f`– flinty Jan 07 '22 at 12:51