[R] Resize edge's label fontsize

Hardi sky_drake at yahoo.com
Tue Feb 10 02:58:51 CET 2009


 Hi,

I'm trying to create a connectivity diagram using
RgraphViz library. I want to increase the edge's label fontsize, but
the size did not change.
Did I do something wrong ?

M <- matrix(nrow=5,ncol=5,byrow=TRUE,data=mytable)
colnames(M) <- levels(pf$agent)

A <- new("graphAM", M, "directed", values = list(weight=M))
eAttrs <- list()
ew <- as.character(unlist(edgeWeights(A)))
names(ew) <- edgeNames(A, recipEdges = "distinct")
eAttrs$label <- ew

fs2 <- rep(c(72), length(ew))
names(fs2) <-  edgeNames(A, recipEdges = "distinct")
eAttrs$labelfontsize <- fs2

plot(A,
attrs = list(node = list(label = "foo", fillcolor = "lightblue"), edge
= list(color = "red")), edgeAttrs = eAttrs,recipEdges="distinct")


Thanks.




More information about the R-help mailing list