5
$\begingroup$

I'm having problems with getting coordinates out ofa ListLogLogPlot

I basically plotted a list, then selected data points on the graph, moved these points around, and now I need to get the coordinates of the moved points.

Any ideas?

http://i.stack.imgur.com/5fhai.png enter image description here

$\endgroup$
  • 2
    $\begingroup$ Something like : Cases[ListPlot[{{0, Pi}, {1, E}}], Point[pts__] :> pts, Infinity] ? $\endgroup$ – b.gates.you.know.what Feb 7 '13 at 9:24
  • $\begingroup$ please see screenshot I added $\endgroup$ – Luke Feb 7 '13 at 9:42
  • 4
    $\begingroup$ You can do newPlot= copy/paste here and then the above on newPlot. $\endgroup$ – b.gates.you.know.what Feb 7 '13 at 10:01
  • 3
    $\begingroup$ @Luke, you'll need to do Cases[(paste plot here), Point[pts__] :> Exp[pts], -1]. $\endgroup$ – Simon Woods Feb 7 '13 at 12:29
  • 1
    $\begingroup$ @SimonWoods it works!! Thank you so much!! $\endgroup$ – Luke Feb 7 '13 at 12:52
5
$\begingroup$

This one works for both Log and LogLog Plots. Create your plot:

ListLogLogPlot[Table[{n, n}, {n, 50}]]

Edit it. Then paste it here

ListLogLogPlot@ Cases[#, (Point[x__] :> ("CopiedValueFunction" /. (CoordinatesToolOptions /. 
                      Options[#, CoordinatesToolOptions])) /@ x), Infinity] &@ (---Paste HERE ---)

Mathematica graphics

$\endgroup$
  • 1
    $\begingroup$ It works great, however Cases[(paste plot here), Point[pts__] :> Exp[pts], -1] works as well, thanks anyway $\endgroup$ – Luke Feb 7 '13 at 13:32
  • $\begingroup$ @Luke The difference is that this one works for both Log and LogLog Plots :) $\endgroup$ – Dr. belisarius Feb 7 '13 at 13:37
  • 2
    $\begingroup$ +1 Grrrrrrrreat $\endgroup$ – Rojo Feb 7 '13 at 17:29
  • $\begingroup$ @Rojo Thanks :). I think there is a cleaner way to get sub-options. Anyway ... $\endgroup$ – Dr. belisarius Feb 7 '13 at 18:07
  • $\begingroup$ Well, it's a matter of taste, but you could do OptionValue[Options@gr, CoordinatesToolOptions -> "CopiedValueFunction"] $\endgroup$ – Rojo Feb 7 '13 at 20:19
0
$\begingroup$

The simple way is as follows. Take your new plot as it is in the notebook after you introduced the changes, mark it by clicking and copy it. Then type FullForm[] in a new cell and insert the copied graphics between the square brackets. Evaluate it. The result will be rather lengthily. However you will be able to find there a Line statement somewhere inside this lengthily expression. The Line statement is wrapped around a list. Copy this list. Done.

$\endgroup$

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.