0
$\begingroup$

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?

$\endgroup$
  • 1
    $\begingroup$ Did you click on the "show complete Mathematica input" button, for starters? $\endgroup$ – J. M.'s discontentment Apr 24 '13 at 2:45
  • $\begingroup$ 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?? $\endgroup$ – Alex Apr 24 '13 at 6:39
  • 1
    $\begingroup$ 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) $\endgroup$ – Jacob Akkerboom Apr 24 '13 at 9:43
  • $\begingroup$ Thats great!!!I didn't know that.Many thanks for advices!! $\endgroup$ – Alex Apr 24 '13 at 9:52
  • 1
    $\begingroup$ In v9, GraphEmbedding[g] will give the vertex coordinates. $\endgroup$ – Szabolcs Apr 24 '13 at 10:08
1
$\begingroup$

To extract first coordinates of TerminalsCoordinates for each node:

(PropertyValue[{g,#}, "TerminalsCoordinates"]& /@ VertexList[g])[[All,1]]
| improve this answer | |
$\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.