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


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

Re: Listplot3D and Tooltip

Started by"djmpark" <djmpark@comcast.net>
First post2012-05-19 09:45 +0000
Last post2012-05-19 09:45 +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: Listplot3D and Tooltip "djmpark" <djmpark@comcast.net> - 2012-05-19 09:45 +0000

#10151 — Re: Listplot3D and Tooltip

From"djmpark" <djmpark@comcast.net>
Date2012-05-19 09:45 +0000
SubjectRe: Listplot3D and Tooltip
Message-ID<jp7q3u$qei$1@smc.vnet.net>
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@comcast.net 
http://home.comcast.net/~djmpark/index.html 


From: Fredob [mailto:fredrik.doberl@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

[toc] | [standalone]


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


csiph-web