You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Apparently, there is a slot in edge attributes called "lwd" which controls the line width. It is documented on the AgEdge man page:
‘lwd’: Object of class ‘"numeric"’ The edge line width.
However, it is not possible to set it using edgeAttrs option to agopen() or plot():
simply specifying it in edgeAttrs (like you can specify the colors of the edges) throws an error, because getDefaultAttrs() doesn't return a default setting for lwd.
it is possible to provide a default value using the following syntax:
However, this one produces an incorrect graph. agopen() as a chunk of code at the end which ignores the names of the edges and simply copies the lwd's from first to last, resulting in an effectively random assignment to the edges.
Unfortunately, I cannot provide any patches. However, here is a little function I wrote that can set any attribute on the graph. Dangerous -- it does not check for correctness of the arguments, ignores directions of nodes (my graphs are all directionless), so it is not of general interest.
I am struggling with Rgraphviz to make it draw edges of different widths. You will find a more detailed description of the problem (along with example code) in this question:
http://stackoverflow.com/questions/29282522/setting-edge-width-in-rgraphviz
Apparently, there is a slot in edge attributes called "lwd" which controls the line width. It is documented on the AgEdge man page:
‘lwd’: Object of class ‘"numeric"’ The edge line width.
However, it is not possible to set it using edgeAttrs option to agopen() or plot():
simply specifying it in edgeAttrs (like you can specify the colors of the edges) throws an error, because getDefaultAttrs() doesn't return a default setting for lwd.
it is possible to provide a default value using the following syntax:
eAttrs <- list( lwd=list( "A
C"=5, "AB"=1 ) )rag <- agopen( graph, "", edgeAttrs=eAttrs, attrs= list(edge=list(lwd=2)) )
However, this one produces an incorrect graph. agopen() as a chunk of code at the end which ignores the names of the edges and simply copies the lwd's from first to last, resulting in an effectively random assignment to the edges.
Unfortunately, I cannot provide any patches. However, here is a little function I wrote that can set any attribute on the graph. Dangerous -- it does not check for correctness of the arguments, ignores directions of nodes (my graphs are all directionless), so it is not of general interest.
Example usage:
plot(rag)
Cheers,
j.
(submitted by January Weiner [email protected]
The text was updated successfully, but these errors were encountered: