1
$\begingroup$

I'm using PolarPlot to plot a function in [0, 1] in a log scale plot, capped at -40 dB, as in the following example:

logscale[x_, minDb_] =
  If[ x < 10^(minDb/ 10), minDb, 10 Log10[x] ]/(-minDb) + 1 ;

PolarPlot[
 logscale[Abs[Cos[t]], -40],
 {t, 0, Pi},
 PolarAxesOrigin -> {0, 1 },
 PolarGridLines -> Automatic,
 PolarAxes -> True,
 PlotStyle -> Thick,
 PolarTicks -> {Table[{N[Pi/6 i],
     ToString[30 i] <> "\[Degree]"}, {i, -5, 6}], Automatic}
 ]

log plot polar

I'd like to know how to make it so that there are three concentric circles marking the radial depth in the interior (instead of 4), and would like the radial tick numbers (from the outside) to be 0, -10, -20, -30, and -40 at the origin, instead of the automatic values 1, 0.8, ...

$\endgroup$

1 Answer 1

3
$\begingroup$

How about this?

PolarPlot[
  logscale[Abs[Cos[t]], -40],
  {t, 0, Pi},
  PolarAxesOrigin -> {0, 1},
  PolarGridLines -> {Automatic, {1/4, 2/4, 3/4}},
  PolarAxes -> True,
  PlotStyle -> Thick,
  PolarTicks -> {
    Table[{N[Pi/6 i], ToString[30 i] <> "\[Degree]"}, {i, -5, 6}],
    {{1, 0}, {3/4, -10}, {2/4, -20}, {1/4, -30}, {0, -40}}
  }
]

polar plot

$\endgroup$
2
  • $\begingroup$ Much better now :) $\endgroup$ Apr 9, 2015 at 4:28
  • $\begingroup$ My code for the ticks was wrong at first. Now corrected. $\endgroup$
    – Taiki
    Apr 9, 2015 at 4:29

Your Answer

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

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