Re: Listplot3D and Tooltip

• To: mathgroup at smc.vnet.net
• Subject: [mg126558] Re: Listplot3D and Tooltip
• From: "djmpark" <djmpark at comcast.net>
• Date: Sat, 19 May 2012 05:43:50 -0400 (EDT)
• Delivered-to: l-mathgroup@mail-archive0.wolfram.com
• References: <29066900.4045.1337333818232.JavaMail.root@m06>

```I don't think that that you can have individual Tooltips for points in
ListDraw3D. Perhaps someone else will show a simple way.

But you could superimpose a set of points on the 3D surface and have
Tooltips on those points.  Here is a case from one of the Help examples for
ListPlot3D. I'm using the Presentations application, which I think is more
natural, but you could do the same thing with ListPlot3D and Epilog. There
are several caveats. I used DataRange so the points and the 3D plot
correspond. The x-y ordering of the points for ListPlot3D is opposite of the
Point coordinates so the iterators are reversed in the two data sets.

data1 = Table[Sin[j^2 + i], {j, 0, Pi, Pi/5}, {i, 0, Pi, Pi/5}];

data2 = Flatten[
Table[{i, j, N@Sin[j^2 + i]}, {i, 0, Pi, Pi/5}, {j, 0, Pi, Pi/5}],
1];

<< Presentations`

Draw3DItems[
{(* Draw interpolated surface *)
{Opacity[0.7],
ListDraw3D[data1,
Mesh -> None,
InterpolationOrder -> 3,
ColorFunction -> "SouthwestColors",
DataRange -> {{0, \[Pi]}, {0, \[Pi]}}]},
(* Draw points with tooltips *)
AbsolutePointSize[5],
Tooltip[Point[# + {0, 0, 0.025}], #] & /@ data2},
NeutralLighting[0, 0.5, 0.1],
NiceRotation,
Axes -> True,
ImageSize -> 400]

The only problem I have with this is that it is sometimes difficult to
position the mouse so as to bring up the Tooltips. I think this is partly
poor design and partly not knowing the tricks to optimize it. If the points
are behind the surface the Tooltip will not be activated. In my plot I put
the points slightly above the surface to make them easier to access from
above. As Murray Eisenberg has pointed out on this group, the regular 3D
pointer is too large to accurately position. And the capture cross-section
is too small. Basically we need a method to specify the capture
cross-section.

David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/index.html

From: Fredob [mailto:fredrik.doberl at gmail.com]

Hi,

I am getting stuck with figuring out how to use Tooltip for a ListPlot3D.
Basically I have a list of values for the 3D plot (no table or a function)
and would like to have the Tooltip return the x, y and z coordinates for the
point.

Best regards

Fredrik

```

• Prev by Date: Re: export to .m using a cell command
• Next by Date: Re: Coefficient
• Previous by thread: Listplot3D and Tooltip
• Next by thread: clearing a variable with a dummy subscript