Can I attach a label to the red point in the attached notebook showing its coordinates without creating a third graphics image?
Context: I want to write a manipulate[] function (f2) that takes a real-value function (f1) of one variable and a domain interval as arguments, then puts a manipulatable point on f1’s plot with a label containing the point’s coordinates. And I’d like f2 to work with continuous and piecewise functions like the example f1 attached.
Alternate question: Has someone already done this? It seems like something other folks would want to do.
I used Epilog with Directives to set the style for the point and the text. I used PlotRangePadding to give extra room for the label as it moves around. I changed the animation from 1/2 to 0.5 because Mathematica tries to use fractions which do not turn into text very well (i.e. 5/2 vs 2.5). With Epilog you can pass a bunch of plot annotations.