2
$\begingroup$

I'm trying to plot the root locus for the function below. Is there any way to make it display the value of 'k' when I move the cursor along the curve, similar to a tooltip?

RootLocusPlot[k/((s + 10) (s - 4)), {k, 0, 80}]
$\endgroup$

2 Answers 2

4
$\begingroup$
Clear["Global`*"];

RootLocusPlot[k/((s + 10) (s - 4))
 , {k, 0, 80}
 , PlotStyle -> Thick
 , LabelStyle -> Directive[Gray, Small]
 , PoleZeroMarkers -> {Style["x", 16, Black], 
   Style["\[FilledCircle]", Red, 6], "", 
   "ParameterValues" -> {Range[10, 80, 10]}}
 ]
$\endgroup$
3
$\begingroup$

Using ColorFunction

$Version

(* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *)

Clear["Global`*"]

RootLocusPlot[k/((s + 10) (s - 4)), {k, 0, 80},
 ColorFunction -> Function[{x, y, k}, ColorData["Rainbow"][k]],
 PlotLegends -> BarLegend[{"Rainbow", {0, 80}},
   LegendLabel -> Style["k", 14]]]

enter image description here

$\endgroup$

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.