To established exactly what I mean, if you’ve ever pulled a graph on Wolfram|Alpha, you would notice on mouse over of the graph the cross hairs that pop up and a point that traces the graph and displays position data of the point. I have yet to figure out how to replicate that function, the point following a graph and displaying position data (I don’t care about the cross hair cosmetics).
Maybe i’m just bad at using the documentation center, and i’m still new with Mathmatica. Web searches did turn up a Mathmatica function called PlotTrace but apparently it was an old function or I don’t know what because that returns nothing in Mathmatica 9. Anyone have any ideas? I apologize if this has been asked before, my search turned up no posts related.
P.S. I’m not talking about locator graphics that you can drag where you want it, the idea is it traces the function graph (returning the location of its position X,Y coordinates).
This functionality is not available by default in Mathematica, but it is easy to implement a practical version of it. With a little more work you could implement the same thing W|A has, but since that version is mainly better in presentation only, I won’t bother with it.
First, you can use W|A directly form Mathematica. Try
== plot sin(x)
But I think this is not what you’re looking for.
Try right clicking any graphics object, and choosing Get Coordinates in Mathematica. It’ll show the coordinates of the point you hover. You can click several points to mark them, and copy their coordinates using Ctrl-C.
It is possible to customize this functionality using the CoordinatesToolOptions option.
There’s better ways to do a lot of what’s here but this will at least give you a few ideas. Mainly it is the usage of Show in combination with Dynamic and MousePosition[“Graphics”]. As always, it’s a good idea to F1 any symbol/function you’re unfamiliar with.