Entering edit mode
Guest User
★
13k
@guest-user-4897
Last seen 10.2 years ago
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:
[1] LC_CTYPE=en_US LC_NUMERIC=C LC_TIME=en_US
[4] LC_COLLATE=en_US LC_MONETARY=en_US LC_MESSAGES=en_US
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US LC_IDENTIFICATION=C
attached base packages:
[1] grid stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] Rgraphviz_2.2.1 graph_1.36.2
loaded via a namespace (and not attached):
[1] BiocGenerics_0.4.0 stats4_2.15.1 tools_2.15.1
--
Sent via the guest posting facility at bioconductor.org.