Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12313
| From | "Nasser M. Abbasi" <nma@12000.org> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: How to add a Locator (Tooltip) to RootLocusPlot? |
| Date | 2012-11-11 06:30 +0000 |
| Message-ID | <k7ngm4$8j3$1@smc.vnet.net> (permalink) |
| References | <k7kuku$2aj$1@smc.vnet.net> |
| Organization | Time-Warner Telecom |
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
Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Find similar | Unroll thread
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
csiph-web