Bug introduced in 10.0.0 and persisting through 11.2.0

The coordinates of a point in a three dimensional graph can be shown in a tooltip:

ListPointPlot3D[Tooltip[RandomReal[{0, 1}, {50, 3}]], PlotStyle -> {PointSize[.02]}]

This works fine in Mathematica 9, but in Mathematica 10 the tooltip now shows for all points the same list with a.o. the Point expression with the coordinates of all points. (Mathematica 10.0.1 on both Windows 7 and Windows 8). That seems at least undesirable behaviour to me.

This is a workaround:

ListPointPlot3D[RandomReal[{0, 1}, {50, 3}], PlotStyle -> {PointSize[.02]}] /. 
  Point[x_] :> {Tooltip[Point[#], #] &  /@ x}
  • 5
    $\begingroup$ This looks like a bug. Also Tooltip /@ RandomReal[{0, 1}, {50, 3}] does not work when I believe it should, as it does in ListPlot. $\endgroup$ – Mr.Wizard Oct 20 '14 at 21:12
  • $\begingroup$ @Mr.Wizard I'd argue that the OPs behavior is correct as Tooltip wraps the entire data set. The behavior you mention is clearly a bug, and is known. $\endgroup$ – rcollyer Jul 15 '15 at 13:05
  • $\begingroup$ @rcollyer Pardon me, what is a bug and what is not a bug? $\endgroup$ – Mr.Wizard Jul 15 '15 at 13:08
  • $\begingroup$ @Mr.Wizard The OPs version ListPointPlot3D[Tooltip[...]] is not a bug as Tooltip surrounds the entire data set. The v9 behavior was incorrect. However, ListPointPlot3D[Tooltip /@ {...}] throwing all sorts of fun messages is a bug. $\endgroup$ – rcollyer Jul 15 '15 at 13:10
  • 1
    $\begingroup$ @Mr.Wizard I'd say it is surprising as from the docs "Tooltip[expr] is equivalent to Tooltip[expr,expr]", and yet Plot[Tooltip[{Sin[x], Cos[x]}], {x, 0, 10}] is given as an example ... How about we chalk this up to sleep deprivation (newborn at home), and forget the whole thing? $\endgroup$ – rcollyer Jul 15 '15 at 13:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.