Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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

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

2 Answers 2

up vote 4 down vote accepted

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

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

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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