python-igraph manual

Package igraph

License:
Copyright (C) 2006-2012 Tamás Nepusz <ntamas@gmail.com>
Pázmány Péter sétány 1/a, 1117 Budapest, Hungary
This program is free software; you can redistribute it and/or
modify
it under the terms of the GNU General Public License as published
by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA

autocurve(graph,
attribute='curved',
default=0)

Calculates curvature values for each of the edges in the graph to make
sure that multiple edges are shown properly on a graph plot.

This function checks the multiplicity of each edge in the graph and
assigns curvature values (numbers between -1 and 1, corresponding to CCW
(-1), straight (0) and CW (1) curved edges) to them. The assigned values
are either stored in an edge attribute or returned as a list, depending
on the value of the attribute argument.

Parameters:

graph - the graph on which the calculation will be run

attribute - the name of the edge attribute to save the curvature values to.
The default value is curved, which is the name of
the edge attribute the default graph plotter checks to decide
whether an edge should be curved on the plot or not. If
attribute is None, the result will not be
stored.

default - the default curvature for single edges. Zero means that single
edges will be straight. If you want single edges to be curved as
well, try passing 0.5 or -0.5 here.