Question: Rgraphviz multiline edge label
6.2 years ago by
Guest User • 12k
Guest User • 12k wrote:
Hello, I am plotting a graph using Rgraphviz and I would like some long edge labels to be written in more than one line. However, when using \n to insert newline character, only the first line is displayed as edge label. In this example code: library("graph") library("Rgraphviz") g<-new("graphNEL", nodes=c("node1","node2"), edgemode="directed") g <- addEdge("node1","node2",g) eAttrs <- list() eAttrs$label=c("node1~node2"="First\nlong\nlabel") plot(g, edgeAttrs=eAttrs) The edge label plotted is just "First". Does anyone has a clue on how to plot multiline edge labels with Rgraphviz? Thank you -- output of sessionInfo(): > sessionInfo() R version 2.15.1 (2012-06-22) Platform: x86_64-pc-linux-gnu (64-bit) locale:  LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US  LC_COLLATE=en_US LC_MONETARY=en_US LC_MESSAGES=en_US  LC_PAPER=C LC_NAME=C LC_ADDRESS=C  LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C attached base packages:  grid stats graphics grDevices utils datasets methods  base other attached packages:  Rgraphviz_2.2.1 graph_1.36.2 loaded via a namespace (and not attached):  BiocGenerics_0.4.0 stats4_2.15.1 tools_2.15.1 -- Sent via the guest posting facility at bioconductor.org.
ADD COMMENT • link •