Thursday, 19 September 2013

R programming - improving a minimal spanning tree plot using {ape}

R programming - improving a minimal spanning tree plot using {ape}

I tried the following codes to plot minimal spanning tree:
library(ape)
mstree <-mst(distmat) #distmat is a distance matrix
plot(mstree, x1 = xycoordinates[,1], x2 = xycoordinates[,2])
if I command the above lines, I do get a minimal spanning tree diagram
according to the distance matrix I specified, yet the graph looks bit
boring because everything is black....if I want to change the colour of
the tree "branches" into blue (i.e. from being black), how can I do that?
Thank you,

No comments:

Post a Comment