Entering edit mode
Chris Knight
▴
10
@chris-knight-4476
Last seen 10.2 years ago
Dear all,
I'm trying to plot star-shaped graphs via Rgraphviz (see example
below). However, having adjusted node and label sizes to make things
legible (the default has undue overlap), the ends of the edges go
nowhere near the nodes, making interpretation difficult (they look as
though they're going to the edge of the default sized node).
I suspect I'm missing something fundamental about the 'actual' size of
the nodes versus the size of their polygons, but have so far been
unable to figure it out.
'headclip=FALSE' I might have expected to sort this out, but that is
unimplemented and doesn't tackle the real problem
In the example below I've included several of the other edge
attributes I'm setting, in case there are any interactions there.
apologies if I've missed something obvious (either in the approach or
the archive)
any help gratefully received,
Chris
testNet<-ftM2graphNEL(cbind(rep("centre",100),paste("outer",1:100)),
edgemode="directed")
cols<-rainbow(100)
wdth<-runif(100,min=0,max=10)
heads<-sample(c("open","none","tee"),100,replace=TRUE)
tails<-sample(c("open","none","tee"),100,replace=TRUE)
names(cols) <- names(wdth) <- names(heads) <- names(tails) <-
paste(rep("centre",100),paste("outer",1:100),sep="~")
testNetL<-layoutGraph(testNet, layoutType="neato")
edgeRenderInfo(testNetL)<-list(col=cols, arrowhead=heads,
arrowtail=tails,dir="both", lwd=wdth, headclip=hclip, tailclip=tclip)
nodeRenderInfo(testNetL) <- list(cex=0.7,width=20, height=20)
renderGraph(testNetL)
sessionInfo()
R version 2.12.1 (2010-12-16)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_GB.UTF-8/en_GB.UTF-8/C/C/en_GB.UTF-8/en_GB.UTF-8
attached base packages:
[1] grid stats graphics grDevices utils datasets
methods
[8] base
other attached packages:
[1] Rgraphviz_1.28.0 graph_1.28.0
loaded via a namespace (and not attached):
[1] tools_2.12.1
>
I hope it doesn't come down to this (which hasn't caused obvious
problems beforeĀ this was the available version for download):
Warning message:
In fun(...) : Rgraphviz built with Graphviz version 2.24.0.
Found installed Graphviz version 2.26.3. This _may_ cause problems.
[[alternative HTML version deleted]]