I am trying to get buttons to work simultaneously with tooltips in 3D plots. Button
has a Tooltip
option, but it doesn't seem to work.
Consider code that creates a red point that turns green when clicked, and the point works with a tooltip.
In the following, Button
works , but its Tooltip
option does not.
DynamicModule[{b = 1}, Graphics[
Dynamic@Button[Style[Point[{0, 0}],
{Red, Green}[[Mod[b, 2, 1]]],
PointSize[0.1]], b++, Tooltip -> "hi"],
ImageSize -> Small]]
Thankfully, we can add the Tooltip
function to make it work. Both Tooltip[Button[
and Button[Tooltip[
work. For example...
DynamicModule[{b = 1}, Graphics[
Dynamic@Tooltip[Button[Style[Point[{0, 0}],
{Red, Green}[[Mod[b, 2, 1]]],
PointSize[0.1]], b++], "hi"],
ImageSize -> Small]]
However, all three fail in some 3D plots.
We can see the button works, but its Tooltip
option still fails.
DynamicModule[{b = 1},
Dynamic@ListLinePlot3D[
{{2.1,
Button[Style[2.9, {Red, Green}[[Mod[b, 2, 1]]]], b++,
Tooltip -> "hi"], 2.8, 1.9}, {2.2, 2.7, 1.1, 2.2}},
PlotMarkers -> {Automatic, 0.05}]]
With Tooltip[Button[
, Tooltip
works but Button
does not.
DynamicModule[{b = 1}, Dynamic@ListLinePlot3D[
{{2.1,
Tooltip[Button[Style[2.9, {Red, Green}[[Mod[b, 2, 1]]]], b++]],
2.8, 1.9}, {2.2, 2.7, 1.1, 2.2}},
PlotMarkers -> {Automatic, 0.05}]]
With Button[Tooltip[
, Button
works but Tooltip
does not.
How can I get such a button to work with a tooltip in ListLinePlot3D
?