MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Tooltip value for plots with units

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122951] Tooltip value for plots with units
  • From: Michelle A <hfvballgurl33 at gmail.com>
  • Date: Fri, 18 Nov 2011 06:22:53 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com

I am trying to use a tooltip to show the value at a point for a
ListLinePlot but it wont work for units.

list = {1, 7, 8, 5, 7, 3};
lista = {3, 5, 7, 2, 6, 2};

Show[
 ListLinePlot[
  Tooltip[list,
   Dynamic[{Round[#], list[[Round[#]]]} &@
     CurrentValue[{"MousePosition", "Graphics"}][[1]]]],
  PlotStyle -> Red],
 ListLinePlot[
  Tooltip[lista,
   Dynamic[{Round[#], lista[[Round[#]]]} &@
     CurrentValue[{"MousePosition", "Graphics"}][[1]]]],
  PlotStyle -> Orange]
 ]

But when i change the lists to be

list = {1 Foot, 7 Foot, 8 Foot, 5 Foot, 7 Foot, 3 Foot};
lista = {3 Foot, 5 Foot, 7 Foot, 2 Foot, 6 Foot, 2 Foot};

It no longer works.

Any thoughts?

Michelle




  • Prev by Date: EmpiricalDistribution bug
  • Next by Date: Re: Error in FullSimplify
  • Previous by thread: Re: EmpiricalDistribution bug
  • Next by thread: Re: Tooltip value for plots with units