[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [igraph] plot: edges cross vertexes

From: Tamás Nepusz
Subject: Re: [igraph] plot: edges cross vertexes
Date: Sat, 13 Oct 2012 16:30:42 +0200

Hi Sam, 

The primary purpose of supporting curved edges is to ensure that multiple edges 
between the same node pairs are all visible. igraph does not try to set the 
curvature of edges to avoid other nodes (and I guess it would be quite 
complicated anyway if you take into account that nodes may have different 
shapes). However, you may supply a vector of numbers to edge.curved instead of 
a single boolean and control the curvature of each edge individually. 
edge.curved=TRUE is equivalent to specifying a curvature of 0.5 for every edge, 
so a good starting point would be to construct a vector consisting of 0.5 only 
and then modifying the curvature of individual edges that cause problems. You 
can use get.edge.ids to find the indices of specific edges in your graph in 
order to figure out which element of the curvature vector should be adjusted. 


On Friday, 12 October 2012 at 18:51, Sam Steingold wrote:

> I plot a graph using:
> plot(small, vertex.label=V(small)$name, edge.width=E(small)$weight,
> vertex.size=sqrt(sqrt((V(small)$share + V(small)$click))), edge.curved=TRUE,
> main=paste(mydate,what,"(",length(V(small)),"; share or click > 1%)"))
> and get this:
> note that the edge EG<-->SA curves to hit vertex NL,
> and the edge SA<-->JO curves to hit vertexes FR, GB, BR.
> It would be nice if the edges curved to __avoid__ vertexes, not to hit
> them.
> Thanks!
> -- 
> Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 
> 11.0.11103000
> http://www.childpsy.net/ http://memri.org http://iris.org.il http://pmw.org.il
> http://mideasttruth.com http://openvotingconsortium.org http://www.memritv.org
> There are two ways to write error-free programs; only the third one works.
> _______________________________________________
> igraph-help mailing list
> address@hidden (mailto:address@hidden)
> https://lists.nongnu.org/mailman/listinfo/igraph-help
> Attachments: 
> - country-graph.png

reply via email to

[Prev in Thread] Current Thread [Next in Thread]