0
$\begingroup$

I have a question about face adjacency graphs. Suppose that I have an adjacency matrix

enter image description here

How can I plot something like this?? I tried and it looks too messy. What may be the resulting graphic?

Thank you in advance

$\endgroup$

closed as off-topic by Bob Hanlon, bbgodfrey, Szabolcs, C. E., Michael E2 May 3 '15 at 20:06

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, bbgodfrey, C. E., Michael E2
If this question can be reworded to fit the rules in the help center, please edit the question.

3
$\begingroup$

Use AdjacencyGraph:

myMatrix = {{0, 0, 1, 1, 1, 1, 0, 1},
            {1, 0, 0, 1, 0, 0, 1, 0},
            {1, 1, 1, 1, 0, 0, 0, 1},
            {1, 0, 1, 0, 1, 0, 1, 0},
            {0, 1, 0, 1, 1, 0, 1, 1},
            {0, 1, 1, 0, 1, 0, 0, 1},
            {0, 0, 0, 1, 1, 1, 1, 0},
            {1, 1, 0, 0, 0, 0, 0, 1}};

AdjacencyGraph[myMatrix, VertexLabels -> "Name"]

graph from adjacency matrix

For your data, a CircularEmbedding with your vertex labels might be more revealing:

AdjacencyGraph[CharacterRange["a", "h"], myMatrix,
               VertexLabels -> "Name", GraphLayout -> "CircularEmbedding"]

circular embedding of adjacency graph

$\endgroup$
  • 2
    $\begingroup$ Like in the comment above ? $\endgroup$ – Sektor May 3 '15 at 6:50
  • $\begingroup$ Hi David, thank you for your answer it was very useful. Now I'm totally new to this site, could you tell me what program did you use to get that graph and where can I get it? $\endgroup$ – Isaac May 3 '15 at 18:01
  • $\begingroup$ Ummm.... Isaac.... I'm astounded. This site is devoted entirely to the computer language Mathematica and I posted the explicit code necessary to create the figures I displayed. "What program...?" indeed! $\endgroup$ – David G. Stork May 3 '15 at 18:18

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