Re: How to get Tooltip value
- To: mathgroup at smc.vnet.net
- Subject: [mg112903] Re: How to get Tooltip value
- From: Patrick Scheibe <pscheibe at trm.uni-leipzig.de>
- Date: Tue, 5 Oct 2010 05:35:43 -0400 (EDT)
Hi, take your example, check the InputForm of the resulting graphics, think about what you want and write it down: f[x_] := 1/x^2 Plot[f[x], {x, 0, 100}] /. Line[pts_] :> (Tooltip[Line[#], "Value of x is: " <> ToString@First@First@#] & /@ Partition[pts, 2, 1]) Cheers Patrick On Mon, 2010-10-04 at 06:04 -0400, James Brown wrote: > Is there a way to extract the value of a variable and display it with > Tooltip? > Example: > f[x_] := 1/x^2 > Plot[Tooltip[f[x],"Value of x is:" "(wish I knew)"],{x,0,100}] > > Thanks... Jim > >