[TetrahedralGraph] - mathematica

  • Context: Mathematica 
  • Thread starter Thread starter jemma
  • Start date Start date
  • Tags Tags
    Mathematica
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
jemma
Messages
35
Reaction score
0
Using the following code in mathematica:

<< DiscreteMath`Combinatorica`
ShowGraph[TetrahedralGraph]

Produces a regular Tetrahedral Graph. I would like to show data points on this tetrahedral graph with specific coordinates relating to the four points of the tetrahedron. Is this possible?

Thanks if you can help.
 
Physics news on Phys.org
Haven't been able to get it perfect for the layering or rotation, I know you can use "Rotate[blah,pi/2]" for each to turn it, and then the whole thing. But the coordinates are in the graphdata:
Code:
labels = Table[Graphics[Text[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]], GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][[i]]]], {i, 1, Length[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]]]}]

Show[labels]

or

labels = Table[Graphics[Text[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][], GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]][]]], {i, 1, Length[GraphData["TetrahedralGraph", "AllVertexCoordinates"][[1]]]}]
Show[labels]
ill work for a few more minutes on it