Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #12301 > unrolled thread

How to add a Locator (Tooltip) to RootLocusPlot?

Started byEduardo Mendes <emammendes@hotmail.com>
First post2012-11-10 07:10 +0000
Last post2012-11-11 06:30 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  How to add a Locator (Tooltip) to RootLocusPlot? Eduardo Mendes <emammendes@hotmail.com> - 2012-11-10 07:10 +0000
    Re: How to add a Locator (Tooltip) to RootLocusPlot? "Nasser M. Abbasi" <nma@12000.org> - 2012-11-11 06:30 +0000

#12301 — How to add a Locator (Tooltip) to RootLocusPlot?

FromEduardo Mendes <emammendes@hotmail.com>
Date2012-11-10 07:10 +0000
SubjectHow to add a Locator (Tooltip) to RootLocusPlot?
Message-ID<k7kuku$2aj$1@smc.vnet.net>
Hello

I wonder whether someone out there would know how to add a Locator or 
Tooltip or something else that allows me to see the values of the 
parameter k (See command below) when the mouse passes over the resulting 
curves? Unfortunately I have no idea on how to do it.


RootLocusPlot[k (s^2+2 s+4)/(s(s+4)(s+6)(s^2+1.4s+1)),{k,0,150}]

Many thanks

Ed


[toc] | [next] | [standalone]


#12313

From"Nasser M. Abbasi" <nma@12000.org>
Date2012-11-11 06:30 +0000
Message-ID<k7ngm4$8j3$1@smc.vnet.net>
In reply to#12301
On 11/10/2012 1:10 AM, Eduardo Mendes wrote:
> Hello
>
> I wonder whether someone out there would know how to add a Locator or
> Tooltip or something else that allows me to see the values of the
> parameter k (See command below) when the mouse passes over the resulting
> curves? Unfortunately I have no idea on how to do it.
>
>
> RootLocusPlot[k (s^2+2 s+4)/(s(s+4)(s+6)(s^2+1.4s+1)),{k,0,150}]
>
> Many thanks
>
> Ed
>

This should really be part of RootLocusPlot. May be in version 9?

In another system I use, starts with 'M' and ends with 'B', I
did the same plot as above, and the plot generated automatically has
this tooltip build-in, and much more information (Gain (k), pole,
damping, overshoot, frequency) about the system.

I typed

--------------------
s=tf('s');
sys=(s^2+2*s+4)/(s*(s+4)*(s+6)*(s^2+1.4*s+1));
rlocusplot(sys)
-----------

And now using the mouse, I point it to the plot and can
read all that information. Here is a screen shot:

http://12000.org/tmp/nov_11_2012/tooltip.png

You could get hold of the (x,y) coordinates of the plot easy enough,
but that does not answer your question ofcourse. To get the
coordinates as tooltip, do

-------------------------------
RootLocusPlot[
  k (s^2 + 2 s + 4)/(s (s + 4) (s + 6) (s^2 + 1.4 s + 1)), {k, 0, 150},
   CoordinatesToolOptions -> {"DisplayFunction" -> Function[pt, pt]}]
-------------------------------------------

and now click on the plot, then click '.' and now when you move
the mouse, you'll get the (x,y) coordinates.

--Nasser

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web