2
$\begingroup$

I'm following this: http://www.wolfram.com/mathematica/new-in-9/markov-chains-and-queues/structural-properties-of-finite-markov-processes.html

When I try to graph the Markov chain with Graph[proc] I get the correct diagraph, but without the arrows pointing towards the appropriate states. I am literally copying and pasting the code from the above site. I'm using Mathematica 10.2.0.0 on Windows 10.

$\endgroup$
5
  • $\begingroup$ What I mean to say is that the arrowheads are missing, not the connecting edges themselves. $\endgroup$
    – Zelador
    Commented Sep 11, 2015 at 2:31
  • $\begingroup$ I guess it's the size of vertex is too large. Try use a smaller parameter like Graph[proc, GraphLayout -> "LayeredDrawing", VertexSize -> Small]. $\endgroup$
    – Silvia
    Commented Sep 11, 2015 at 6:07
  • $\begingroup$ I looked into the underlying Boxes again, it looks like the expression for graph visualization has changed, GraphComputation`NetworkGraphicsBox and DynamicLocation are no longer used. Maybe the new way will have a better performance. $\endgroup$
    – Silvia
    Commented Sep 11, 2015 at 6:28
  • $\begingroup$ @Silvia, both your and the accepted answer worked. Could you elaborate a little bit more on what you mean by the change in the graph visualization? $\endgroup$
    – Zelador
    Commented Sep 11, 2015 at 21:13
  • $\begingroup$ I think halmir's answer is great, you can safely forget about what I said above :) $\endgroup$
    – Silvia
    Commented Sep 12, 2015 at 5:11

1 Answer 1

3
$\begingroup$

You can set PerformanceGoal option to "Quality":

proc = DiscreteMarkovProcess[
   1, {{0, 1/3, 0, 2/3, 0}, {1/2, 0, 0, 0, 1/2}, {0, 0, 1/2, 1/2, 
     0}, {0, 0, 1/2, 1/2, 0}, {0, 0, 0, 0, 1}}];

gr = Graph[proc, GraphLayout -> "LayeredDrawing", 
  PerformanceGoal -> "Quality"]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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