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


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

Re: Tooltip value for plots with units

Started byBob Hanlon <hanlonr357@gmail.com>
First post2011-11-19 11:44 +0000
Last post2011-11-19 11:44 +0000
Articles 1 — 1 participant

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

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Tooltip value for plots with units Bob Hanlon <hanlonr357@gmail.com> - 2011-11-19 11:44 +0000

#6527 — Re: Tooltip value for plots with units

FromBob Hanlon <hanlonr357@gmail.com>
Date2011-11-19 11:44 +0000
SubjectRe: Tooltip value for plots with units
Message-ID<ja84qd$ibl$1@smc.vnet.net>
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};

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


Bob Hanlon

On Fri, Nov 18, 2011 at 6:22 AM, Michelle A <hfvballgurl33@gmail.com> wrote:
> 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
>

[toc] | [standalone]


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


csiph-web