Change the size of the arrowheads in the mark chain section

I built a chain of marks in R, but I don't like the pretty hugh arrows that the graphic function draws. Is there a way to make heads smaller?

library( markovchain ) transition.matrix <- matrix( data = c( 0.5, 0, 0, 0.5, 0.2, 0, 0, 0.8, 1 ), nrow = 3, ncol = 3, dimnames = list( c( "A", "B", "C" ), c( "A", "B", "C" ) ) ) transition.matrix <- new( "markovchain", transitionMatrix = transition.matrix ) print( transition.matrix ) plot( transition.matrix ) 
+5
source share
1 answer

markovchain uses the igraph package to build transition matrices, so you can use the parameters from this package to configure the graph. For example, to set the arrow size:

 plot(transition.matrix, edge.arrow.size=0.5) 

For more information on customization, see the igraph .

enter image description here

+5
source

Source: https://habr.com/ru/post/1233419/


All Articles