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 have this output for my graph.

In[85]:= PropertyList[{g, 1}]

Out[85]= {"TerminalsCoordinates", VertexCoordinates, VertexShape, VertexShapeFunction, VertexSize, VertexStyle}`

How can I extract the vertices info separately to different sets?

share|improve this question
1  
Did you click on the "show complete Mathematica input" button, for starters? –  J. M. Apr 24 '13 at 2:45
    
Sorry I am new here and don't know how to ask the questions?Could you please tell me how to ask that kind of questions?? –  Alex Apr 24 '13 at 6:39
1  
Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by (answering questions) in your area of expertise. 2) Read the FAQs! 3) When you see good Q&A, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. ALSO, remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign (I stole this text from Vitaly) –  Jacob Akkerboom Apr 24 '13 at 9:43
    
Thats great!!!I didn't know that.Many thanks for advices!! –  Alex Apr 24 '13 at 9:52
1  
In v9, GraphEmbedding[g] will give the vertex coordinates. –  Szabolcs Apr 24 '13 at 10:08

1 Answer 1

up vote 1 down vote accepted

To extract first coordinates of TerminalsCoordinates for each node:

(PropertyValue[{g,#}, "TerminalsCoordinates"]& /@ VertexList[g])[[All,1]]
share|improve this answer
    
Thanks Halmir!!! –  Alex Apr 24 '13 at 15:11

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.