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"]]]
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]
How can I Fix this?
Additional Data:
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? $\endgroup$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. $\endgroup$