Displaying 4 results from an estimated 4 matches for "randomegraph".
2006 Aug 28
1
Rgraphviz - neato layout - edge weights do not have an effect
.... The weight of the edge is the
strength of the spring. However, I was not able to find any influence of
edge weight on the layout. In the
http://www.graphviz.org/Documentation/neatoguide.pdf the attribute "len"
is another parameter of the neato layout.
set.seed(31)
V=letters[1:5]
g2=randomEGraph(V,0.5)
plot(g2,"neato",main="All weights 1")
# change and edge weight
edgeData(g2, from = "d", to = "e", attr = "weight") <- 20
plot(g2,"neato",main="Nothing changed!")
#try out length attribute change
edgeDataDefaults(g2,&q...
2007 Apr 24
2
Error in clusterApply(): recursive default argument reference
...}
)
}
parNullDistribIntersection <- function(g1, g2, perm=1000, cl=cl)
{
n1 <- nodes(g1)
parSapply(cl, 1:perm,
function(i)
{
nodes(g1) <- sample(n1)
numEdges(intersection(g1,g2))
}
)
}
## initialize the graph and the rand seed
set.seed(123)
g <- randomEGraph(LETTERS[1:15], edges = 100)
## compute a distribution of the intersection of the graph
## and a 'randomized' graph induced by the permutations of
## node labels (to preserve the graph topology)
cat("1CPU sys time:",
system.time(
dist <- nullDistribInterse...
2007 Oct 04
1
linewidth in Rgraphviz
I'm an Rgraphviz newbie trying to figure out how to do some things/whether
they are possible.
Apparently graphviz does allow you to modify line widths of edges: see
https://mailman.research.att.com/pipermail/graphviz-interest/2001q2/000051.html
(although it looks a little obscure even in graphviz). [As discussed in the
thread
above, the "weight" parameter in Rgraphviz sets the
2008 Feb 12
0
[Fwd: Re: controlling the edge linewidth in Rgraphviz]
Hi Adrian,
even better would be this:
1.) Install the latest Rgraphviz devel version
2.) Use the new API for graph rendering:
library(Rgraphviz)
example(randomEGraph)
x <- layoutGraph(g1)
graph.par(list(edges=list(lwd=2))) # if you want to set lwd=2 for the
whole session
# or if you just want to change this for your one graph:
renderGraph(x, graph.pars=list(edges=list(lwd=2)))
There is a Vignette that explains all the new stuff.
Florian
> http://finzi.p...