Improvised Tooltip using Text
and Mouseover
Here's one way to improvise a tooltip for graphics objects--in this case,
a list of points. It emulates a tooltip but does not leave a a drop shadow, and as István notes, has a few graphical shortcomings that make it less than ideal (clipping, under axes layer). Also, the code would need to be tweaked for objects displayed through functions other than Graphics
.
[Edit: The present version makes use of Heike's suggestion to use the third parameter of Text
for the offset. As Heike notes, "The units of the third argument of Text are scaled with respect to the bounding box of the first argument where {0,0} corresponds to the centre, {-1,-1} to the lower left corner, {1,1} to the upper right corner etc."]
Graphics[{PointSize[Medium],
Table[Mouseover[Point[p], {Point[p],
Text[Framed[p, Background -> LightYellow], p, {1.25, 2}]}],
{p, RandomReal[1, {10, 2}]}]}, Frame -> True,
PlotRange -> {{0, 1}, {0, 1}}, ImagePadding -> {{100, 10}, {50, 5}}]
