# Placing Graph vertexLabels into the vertexes

The DiscreteMarkovProcess defined in Mathematica can be passed to Graph to visualize it. It is exactly what I have done.

Graph[hmm];


Which is almost fine except that I want to put characters from "A" to "U" instead of numbers from 1 to 21 inside the vertexes. I tried using

Graph[hmm, VertexLabels -> Thread[Range[21]->CharacterRange["A","U"]]]


This outputs

I want the letters back into the center of vertexes, According to documentation I can use Placed, however doing

Graph[hmm, VertexLabels -> Placed[Thread[Range[21]->CharacterRange["A","U"]]],Center]


outputs

How can I Fix this?

You can create hmm using

p= Table[1/21//N,{21}];
tm = Table[If[j == i + 2, 0.9, If[j == i + 1, 0.1, 0]], {i, 1, 21}, {j, 1, 21}];
hmm = DiscreteMarkovProcess[p,tm];

• Graph[hmm, VertexLabels -> Thread[Range[ 21] -> (Placed[#, Center] & /@ CharacterRange["A", "U"])]] is your after?Could I vote to colse it as a mistake? – yode May 1 '17 at 14:32
• Yes, thank you. I see now the that the issue was that Placed is not Listable? Then why would something like VertexLables->Placed["Name",Center] work? Also how could I understand the black thingines inside the graph of my version? I'd appreciate it if you post explanations to those questions as well as your solution as an asnwer. – Vahagn Tumanyan May 1 '17 at 14:34

Graph[hmm,

VertexReplace[Graph[hmm, GraphLayout -> {"LayeredEmbedding", "Orientation" -> Left}],