0
$\begingroup$

I am trying to draw a curve and set a special point based on the logarithmic abscissa, as shown in the following example. The function is 1/(1+(RCw)^2)^0.5.

f[w_, RC_] := 1/(1 + (RC*w)^2)^(1/2);
Manipulate[
 Plot[f[w, RC], {w, 0.001  RC, 1000 RC}, 
  AxesLabel -> {"w/RC", "|H(jw)|"}, 
  PlotLabel -> "RC Circuit Frequency Curve", 
  ScalingFunctions -> {"Log", None}, PlotRange -> All, 
  Epilog -> {Red, PointSize[Large], Point[{1/RC, f[1/RC, RC]}], 
    Dashed, Line[{{1/RC, 0}, {1/RC, f[1/RC, RC]}}]}], {RC, 1, 10}]

The graph is as follows

enter image description here

You can see that the point (RC, 1/√ 2) is far away from its actual position(even I set point (1, 1/√ 2) like Point[{1, 1/(2^0.5)}]). How can I display the correct point? Any reply is much appreciated

$\endgroup$
2
  • $\begingroup$ The ScalingFunctions option does not affect the Epilog option. You must explicitly take the Log in the Epilog $\endgroup$
    – Bob Hanlon
    Commented Apr 16 at 3:21
  • $\begingroup$ Similar 268080 $\endgroup$
    – Syed
    Commented Apr 16 at 3:28

1 Answer 1

3
$\begingroup$

Try

f[w_, RC_] := 1/(1 + (RC*w)^2)^(1/2);
Manipulate[
  LogLinearPlot[f[w, RC], {w, 0.001  RC, 1000 RC}, 
    AxesLabel -> {"w/RC", "|H(jw)|"}, 
    PlotLabel -> "RC Circuit Frequency Curve", 
    PlotRange -> All, 
    Epilog -> {Red, PointSize[Large], Point[{Log[1/RC], f[1/RC, RC]}], 
      Dashed, Line[{{Log[1/RC], 0}, {Log[1/RC], f[1/RC, RC]}}]}], {RC, 1, 10}]
$\endgroup$
1
  • $\begingroup$ thank you so much. Really appreciate $\endgroup$
    – Yao Li
    Commented Apr 18 at 13:59

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.