I'm graphing a Markov process
mp = DiscreteMarkovProcess[{1, 0, 0}, ({
{0.6, 0.1, 0.3},
{0.2, 0.7, 0.1},
{0.3, 0.3, 0.4}
})];
and would like to have arrows whose thicknesses corresponds to the transition probabilities, with arrowheads of a different color in the exact center of each edge. But all my attempts end up a mess.
g = Graph[mp];
Scan[(PropertyValue[{g, #}, EdgeLabels] =
PropertyValue[{g, #}, "Probability"]) &, EdgeList[g]];
Scan[(PropertyValue[{g, #}, EdgeStyle] =
Directive[Arrowheads[{{.045, .575}}], GrayLevel[.7],
Thickness[PropertyValue[{g, #}, "Probability"]/20]]) &,
EdgeList[g]];
g
The thick edges leave gaps between their ends and the nodes of the graph, and I can't figure out how to change the color of the arrow heads so that they stand out against the color of the edges.
How can I change the color of the arrowheads in my figure. How can I avoid the gaps that appear between nodes and the ends of the edges?
EdgeShapeFunction
. $\endgroup$ – wxffles May 7 '14 at 22:47