For using igraph from Python
Home  Trees  Indices  Help 



object +  GraphBase +  Graph
Generic graph.
This class is built on top of GraphBase, so the order of the methods in the Epydoc
documentation is a little bit obscure: inherited methods come after the
ones implemented directly in the subclass. Graph provides many
functions that GraphBase does not, mostly because these functions are
not speed critical and they were easier to implement in Python than in
pure C. An example is the attribute handling in the constructor: the
constructor of Graph
accepts three dictionaries corresponding to the graph, vertex and edge
attributes while the constructor of GraphBase does not. This extension was needed to make Graph serializable
through the pickle
module. Graph also overrides some functions from GraphBase to provide
a more convenient interface; e.g., layout functions return a Layout instance
from Graph instead of
a list of coordinate pairs.
Graphs can also be indexed by strings or pairs of vertex indices or vertex names. When a graph is indexed by a string, the operation translates to the retrieval, creation, modification or deletion of a graph attribute:
>>> g = Graph.Full(3) >>> g["name"] = "Triangle graph" >>> g["name"] 'Triangle graph' >>> del g["name"]
When a graph is indexed by a pair of vertex indices or names, the graph itself is treated as an adjacency matrix and the corresponding cell of the matrix is returned:
>>> g = Graph.Full(3) >>> g.vs["name"] = ["A", "B", "C"] >>> g[1, 2] 1 >>> g["A", "B"] 1 >>> g["A", "B"] = 0 >>> g.ecount() 2
Assigning values different from zero or one to the adjacency matrix will be translated to one, unless the graph is weighted, in which case the numbers will be treated as weights:
>>> g.is_weighted() False >>> g["A", "B"] = 2 >>> g["A", "B"] 1 >>> g.es["weight"] = 1.0 >>> g.is_weighted() True >>> g["A", "B"] = 2 >>> g["A", "B"] 2 >>> g.es["weight"] [1.0, 1.0, 2]




















































































































































































































Inherited from Inherited from Inherited from 





































_format_mapping =


_layout_mapping =



vs The vertex sequence of the graph 

es The edge sequence of the graph 

_as_parameter_  
Inherited from 

Returns the clique number of the graph. The clique number of the graph is the size of the largest clique. See Also: largest_cliques() for the largest cliques. 
Returns the independence number of the graph. The independence number of the graph is the size of the largest independent vertex set. See Also: largest_independent_vertex_sets() for the largest independent vertex sets 
Finds the coreness (shell index) of the vertices of the network. The kcore of a graph is a maximal subgraph in which each vertex has at least degree k. (Degree here means the degree in the subgraph of course). The coreness of a vertex is k if it is a member of the kcore but not a member of the k+1core.
Reference: Vladimir Batagelj, Matjaz Zaversnik: An O(m) Algorithm for Core Decomposition of Networks. 
Returns the list of articulation points in the graph. A vertex is an articulation point if its removal increases the number of connected components in the graph. 
Calculates the eigenvector centralities of the vertices in a graph.

Calculates the vertex connectivity of the graph or between some vertices. The vertex connectivity between two given vertices is the number of vertices that have to be removed in order to disconnect the two vertices into two separate components. This is also the number of vertex disjoint directed paths between the vertices (apart from the source and target vertices of course). The vertex connectivity of the graph is the minimal vertex connectivity over all vertex pairs. This method calculates the vertex connectivity of a given vertex pair if both the source and target vertices are given. If none of them is given (or they are both negative), the overall vertex connectivity is returned.

Calculates the edge connectivity of the graph or between some vertices. The edge connectivity between two given vertices is the number of edges that have to be removed in order to disconnect the two vertices into two separate components. This is also the number of edge disjoint directed paths between the vertices. The edge connectivity of the graph is the minimal edge connectivity over all vertex pairs. This method calculates the edge connectivity of a given vertex pair if both the source and target vertices are given. If none of them is given (or they are both negative), the overall edge connectivity is returned.

Calculates the vertex connectivity of the graph or between some vertices. The vertex connectivity between two given vertices is the number of vertices that have to be removed in order to disconnect the two vertices into two separate components. This is also the number of vertex disjoint directed paths between the vertices (apart from the source and target vertices of course). The vertex connectivity of the graph is the minimal vertex connectivity over all vertex pairs. This method calculates the vertex connectivity of a given vertex pair if both the source and target vertices are given. If none of them is given (or they are both negative), the overall vertex connectivity is returned.

Calculates the edge connectivity of the graph or between some vertices. The edge connectivity between two given vertices is the number of edges that have to be removed in order to disconnect the two vertices into two separate components. This is also the number of edge disjoint directed paths between the vertices. The edge connectivity of the graph is the minimal edge connectivity over all vertex pairs. This method calculates the edge connectivity of a given vertex pair if both the source and target vertices are given. If none of them is given (or they are both negative), the overall edge connectivity is returned.

Calculates shortest path lengths for given vertices in a graph. The algorithm used for the calculations is selected automatically: a simple BFS is used for unweighted graphs, Dijkstra's algorithm is used when all the weights are positive. Otherwise, the BellmanFord algorithm is used if the number of requested source vertices is larger than 100 and Johnson's algorithm is used otherwise.

Returns a subgraph spanned by the given vertices.

Constructs a graph from scratch.

Adds a single edge to the graph. Keyword arguments (except the source and target arguments) will be assigned to the edge as attributes.

Adds some edges to the graph.

Adds a single vertex to the graph. Keyword arguments will be assigned
as vertex attributes. Note that 
Adds some vertices to the graph.

Returns the edges a given vertex is incident on. Deprecated: replaced by Graph.incident() since igraph 0.6 
Returns a directed copy of this graph. Arguments are passed on to Graph.to_directed() that is invoked on the copy. 
Returns an undirected copy of this graph. Arguments are passed on to Graph.to_undirected() that is invoked on the copy. 
Deletes some edges from the graph. The set of edges to be deleted is determined by the positional and keyword arguments. If any keyword argument is present, or the first positional argument is callable, an edge sequence is derived by calling EdgeSeq.select with the same positional and keyword arguments. Edges in the derived edge sequence will be removed. Otherwise the first positional argument is considered as follows:

Returns the indegrees in a list. See degree for possible arguments. 
Returns the outdegrees in a list. See degree for possible arguments. 
Returns all the cuts between the source and target vertices in a directed graph. This function lists all edgecuts between a source and a target vertex. Every cut is listed exactly once.
Reference: JS Provan and DR Shier: A paradigm for listing (s,t)cuts in graphs. Algorithmica 15, 351372, 1996. 
Returns all the mincuts between the source and target vertices in a directed graph. This function lists all minimum edgecuts between a source and a target vertex.
Reference: JS Provan and DR Shier: A paradigm for listing (s,t)cuts in graphs. Algorithmica 15, 351372, 1996. 
Calculates the biconnected components of the graph.

Calculates the biconnected components of the graph.

Calculates the cohesive block structure of the graph. Cohesive blocking is a method of determining hierarchical subsets of graph vertices based on their structural cohesion (i.e. vertex connectivity). For a given graph G, a subset of its vertices S is said to be maximally kcohesive if there is no superset of S with vertex connectivity greater than or equal to k. Cohesive blocking is a process through which, given a kcohesive set of vertices, maximally lcohesive subsets are recursively identified with l > k. Thus a hierarchy of vertex subsets is obtained in the end, with the entire graph G at its root.
See Also: CohesiveBlocks 
Calculates the (strong or weak) clusters (connected components) for a given graph.

Calculates the (strong or weak) clusters (connected components) for a given graph.

Calculates the degree distribution of the graph. Unknown keyword arguments are directly passed to degree().

Calculates the dyad census of the graph. Dyad census means classifying each pair of vertices of a directed graph into three categories: mutual (there is an edge from a to b and also from b to a), asymmetric (there is an edge from a to b or from b to a but not the other way round) and null (there is no connection between a and b).
Reference: Holland, P.W. and Leinhardt, S. (1970). A Method for Detecting Structure in Sociometric Data. American Journal of Sociology, 70, 492513. 
Returns the adjacency matrix of a graph.

Returns the adjacency list representation of the graph. The adjacency list representation is a list of lists. Each item of the outer list belongs to a single vertex of the graph. The inner list contains the neighbors of the given vertex. 
Returns the incidence list representation of the graph. Deprecated: replaced by Graph.get_inclist() since igraph 0.6 See Also: Graph.get_inclist() 
Returns the incidence list representation of the graph. The incidence list representation is a list of lists. Each item of the outer list belongs to a single vertex of the graph. The inner list contains the IDs of the incident edges of the given vertex. 
Calculates the GomoryHu tree of an undirected graph with optional edge capacities. The GomoryHu tree is a concise representation of the value of all the maximum flows (or minimum cuts) in a graph. The vertices of the tree correspond exactly to the vertices of the original graph in the same order. Edges of the GomoryHu tree are annotated by flow values. The value of the maximum flow (or minimum cut) between an arbitrary (u,v) vertex pair in the original graph is then given by the minimum flow value (i.e. edge annotation) along the shortest path between u and v in the GomoryHu tree.

Returns whether the graph is named, i.e. whether it has a "name" vertex attribute. 
Returns whether the graph is weighted, i.e. whether it has a "weight" edge attribute. 
Returns a maximum flow between the given source and target vertices in a graph. A maximum flow from source to target is an assignment of nonnegative real numbers to the edges of the graph, satisfying two properties:
The value of the flow is the incoming flow of the target or the outgoing flow of the source (which are equal). The maximum flow is the maximum possible such value.

Calculates the minimum cut between the given source and target vertices or within the whole graph. The minimum cut is the minimum set of edges that needs to be removed to separate the source and the target (if they are given) or to disconnect the graph (if neither the source nor the target are given). The minimum is calculated using the weights (capacities) of the edges, so the cut with the minimum total capacity is calculated. For undirected graphs and no source and target, the method uses the StoerWagner algorithm. For a given source and target, the method uses the pushrelabel algorithm; see the references below.

Calculates the minimum cut between the source and target vertices in a graph.

Calculates the modularity score of the graph with respect to a given clustering. The modularity of a graph w.r.t. some division measures how good the
division is, or how separated are the different vertex types from each
other. It's defined as Q=1/(2m)*sum(Aijki*kj/(2m)delta(ci,cj),i,j). m is the number of edges, Aij is the
element of the A adjacency matrix in row i and column j, ki is the degree of node i, kj is the degree of node j, and Ci and If edge weights are given, the definition of modularity is modified as follows: Aij becomes the weight of the corresponding edge, ki is the total weight of edges adjacent to vertex i, kj is the total weight of edges adjacent to vertex j and m is the total edge weight in the graph.
Reference: MEJ Newman and M Girvan: Finding and evaluating community structure in networks. Phys Rev E 69 026113, 2004. 
Returns the path length histogram of the graph

Calculates the Google PageRank values of a graph.

Calculates a minimum spanning tree for a graph.
Reference: Prim, R.C.: Shortest connection networks and some generalizations. Bell System Technical Journal 36:13891401, 1957. 
Calculates the average of the vertex transitivities of the graph. In the unweighted case, the transitivity measures the probability that two neighbors of a vertex are connected. In case of the average local transitivity, this probability is calculated for each vertex and then the average is taken. Vertices with less than two neighbors require special treatment, they will either be left out from the calculation or they will be considered as having zero transitivity, depending on the mode parameter. The calculation is slightly more involved for weighted graphs; in this case, weights are taken into account according to the formula of Barrat et al (see the references). Note that this measure is different from the global transitivity measure (see transitivity_undirected()) as it simply takes the average local transitivity across the whole network.
See Also: transitivity_undirected(), transitivity_local_undirected() Reference:

Calculates the triad census of the graph.
Reference: Davis, J.A. and Leinhardt, S. (1972). The Structure of Positive Interpersonal Relations in Small Groups. In: J. Berger (Ed.), Sociological Theories in Progress, Volume 2, 218251. Boston: Houghton Mifflin. 
Returns the number of automorphisms of the graph. This function simply calls
See Also: Graph.count_isomorphisms_vf2 
Returns all the automorphisms of the graph This function simply calls
See Also: Graph.get_isomorphisms_vf2 
Community structure based on the greedy optimization of modularity. This algorithm merges individual nodes into communities in a way that greedily maximizes the modularity score of the graph. It can be proven that if no merge can increase the current modularity score, the algorithm can be stopped since no further increase can be achieved. This algorithm is said to run almost in linear time on sparse graphs.
Reference: A Clauset, MEJ Newman and C Moore: Finding community structure in very large networks. Phys Rev E 70, 066111 (2004). 
Finds the community structure of the network according to the Infomap method of Martin Rosvall and Carl T. Bergstrom.
Reference:

A naive implementation of Newman's eigenvector community structure detection. This function splits the network into two components according to the leading eigenvector of the modularity matrix and then recursively takes the given number of steps by splitting the communities as individual networks. This is not the correct way, however, see the reference for explanation. Consider using the correct community_leading_eigenvector method instead.
Reference: MEJ Newman: Finding community structure in networks using the eigenvectors of matrices, arXiv:physics/0605087 
Newman's leading eigenvector method for detecting community structure. This is the proper implementation of the recursive, divisive algorithm: each split is done by maximizing the modularity regarding the original network.
Reference: MEJ Newman: Finding community structure in networks using the eigenvectors of matrices, arXiv:physics/0605087 
Finds the community structure of the graph according to the label propagation method of Raghavan et al. Initially, each vertex is assigned a different label. After that, each vertex chooses the dominant label in its neighbourhood in each iteration. Ties are broken randomly and the order in which the vertices are updated is randomized before every iteration. The algorithm ends when vertices reach a consensus. Note that since ties are broken randomly, there is no guarantee that the algorithm returns the same community structure after each run. In fact, they frequently differ. See the paper of Raghavan et al on how to come up with an aggregated community structure.
Reference: Raghavan, U.N. and Albert, R. and Kumara, S. Near linear time algorithm to detect community structures in largescale networks. Phys Rev E 76:036106, 2007. http://arxiv.org/abs/0709.2938. 
Community structure based on the multilevel algorithm of Blondel et al. This is a bottomup algorithm: initially every vertex belongs to a separate community, and vertices are moved between communities iteratively in a way that maximizes the vertices' local contribution to the overall modularity score. When a consensus is reached (i.e. no single move would increase the modularity score), every community in the original graph is shrank to a single vertex (while keeping the total weight of the adjacent edges) and the process continues on the next level. The algorithm stops when it is not possible to increase the modularity any more after shrinking the communities to vertices. This algorithm is said to run almost in linear time on sparse graphs.
Reference: VD Blondel, JL Guillaume, R Lambiotte and E Lefebvre: Fast unfolding of community hierarchies in large networks, J Stat Mech P10008 (2008), http://arxiv.org/abs/0803.0476 
Calculates the optimal modularity score of the graph and the corresponding community structure. This function uses the GNU Linear Programming Kit to solve a large integer optimization problem in order to find the optimal modularity score and the corresponding community structure, therefore it is unlikely to work for graphs larger than a few (less than a hundred) vertices. Consider using one of the heuristic approaches instead if you have such a large graph.

Community structure based on the betweenness of the edges in the network. The idea is that the betweenness of the edges connecting two communities is typically high, as many of the shortest paths between nodes in separate communities go through them. So we gradually remove the edge with the highest betweenness and recalculate the betweennesses after every removal. This way sooner or later the network falls of to separate components. The result of the clustering will be represented by a dendrogram.

Finds the community structure of the graph according to the spinglass community detection method of Reichardt & Bornholdt.
Reference:

Community detection algorithm of Latapy & Pons, based on random walks. The basic idea of the algorithm is that short random walks tend to stay in the same community. The result of the clustering will be represented as a dendrogram.
Reference: Pascal Pons, Matthieu Latapy: Computing communities in large networks using random walks, http://arxiv.org/abs/physics/0512106. 
Returns some kcores of the graph. The method accepts an arbitrary number of arguments representing the desired indices of the kcores to be returned. The arguments can also be lists or tuples. The result is a single Graph object if an only integer argument was given, otherwise the result is a list of Graph objects representing the desired kcores in the order the arguments were specified. If no argument is given, returns all kcores in increasing order of k. 
Returns the layout of the graph according to a layout algorithm. Parameters and keyword arguments not specified here are passed to the layout algorithm directly. See the documentation of the layout algorithms for the explanation of these parameters. Registered layout names understood by this method are:

Chooses and runs a suitable layout function based on simple topological properties of the graph. This function tries to choose an appropriate layout function for the graph using the following rules:
All the arguments of this function except

Compatibility alias to the FruchtermanReingold layout with the grid option turned on. See Also: Graph.layout_fruchterman_reingold() 
Places the vertices using a layered Sugiyama layout. This is a layered layout that is most suitable for directed acyclic graphs, although it works on undirected or cyclic graphs as well. Each vertex is assigned to a layer and each layer is placed on a horizontal line. Vertices within the same layer are then permuted using the barycenter heuristic that tries to minimize edge crossings. Dummy vertices will be added on edges that span more than one layer. The returned layout therefore contains more rows than the number of nodes in the original graph; the extra rows correspond to the dummy vertices.
Reference:

Finds a maximum matching in a bipartite graph. A maximum matching is a set of edges such that each vertex is incident on at most one matched edge and the number (or weight) of such edges in the set is as large as possible.

Writes the adjacency matrix of the graph to the given file All the remaining arguments not mentioned here are passed intact to Graph.get_adjacency.

Constructs a graph based on an adjacency matrix from the given file Additional positional and keyword arguments not mentioned here are passed intact to Graph.Adjacency.

Writes the graph in DIMACS format to the given file.

Writes the graph to a zipped GraphML file. The library uses the gzip compression algorithm, so the resulting file
can be unzipped with regular gzip uncompression (like Uses a temporary file to store intermediate GraphML data, so make sure you have enough free space to store the unzipped GraphML file as well.

Reads a graph from a file conforming to the DIMACS minimumcost flow file format. For the exact definition of the format, see http://lpsolve.sourceforge.net/5.5/DIMACS.htm. Restrictions compared to the official description of the format are as follows:

Reads a graph from a zipped GraphML file.

Saves the graph in Python pickled format

Saves the graph in Python pickled format, compressed with gzip. Saving in this format is a bit slower than saving in a Python pickle without compression, but the final file takes up much less space on the hard drive.

Reads a graph from Python pickled format

Reads a graph from compressed Python pickled format, uncompressing it onthefly.

Saves the graph as an SVG (Scalable Vector Graphics) file The file will be Inkscape (http://inkscape.org) compatible. In Inkscape, as nodes are rearranged, the edges autoupdate.

Tries to identify the format of the graph stored in the file with the given filename. It identifies most file formats based on the extension of the file (and not on syntactic evaluation). The only exception is the adjacency matrix format and the edge list format: the first few lines of the file are evaluated to decide between the two.
Note: Internal function, should not be called directly. 
Unified reading function for graphs. This method tries to identify the format of the graph given in the first parameter and calls the corresponding reader method. The remaining arguments are passed to the reader method without any changes.

Unified reading function for graphs. This method tries to identify the format of the graph given in the first parameter and calls the corresponding reader method. The remaining arguments are passed to the reader method without any changes.

Unified writing function for graphs. This method tries to identify the format of the graph given in the first parameter (based on extension) and calls the corresponding writer method. The remaining arguments are passed to the writer method without any changes.

Unified writing function for graphs. This method tries to identify the format of the graph given in the first parameter (based on extension) and calls the corresponding writer method. The remaining arguments are passed to the writer method without any changes.

Constructs a graph from a listofdictionaries representation. This representation assumes that vertices and edges are encoded in two lists, each list containing a Python dict for each vertex and each edge, respectively. A distinguished element of the vertex dicts contain a vertex ID which is used in the edge dicts to refer to source and target vertices. All the remaining elements of the dict are considered vertex and edge attributes. Note that the implementation does not assume that the objects passed to this method are indeed lists of dicts, but they should be iterable and they should yield objects that behave as dicts. So, for instance, a database query result is likely to be fit as long as it's iterable and yields dictlike objects with every iteration.

Constructs a graph from a listoftuples representation. This representation assumes that the edges of the graph are encoded in
a list of tuples (or lists). Each item in the list must have at least two
elements, which specify the source and the target vertices of the edge.
The remaining elements (if any) specify the edge attributes of that edge,
where the names of the edge attributes originate from the
The default parameters of this function are suitable for creating
unweighted graphs from lists where each item contains the source vertex
and the target vertex. If you have a weighted graph, you can use items
where the third item contains the weight of the edge by setting

Generates a graph from a graph formula A graph formula is a simple string representation of a graph. It is
very handy for creating small graphs quickly. The string consists of
vertex names separated by edge operators. An edge operator is a sequence
of dashes (
If you only use the undirected edge operator ( Some simple examples: >>> from igraph import Graph >>> print Graph.Formula() # empty graph IGRAPH UN 0 0  + attr: name (v) >>> g = Graph.Formula("AB") # undirected graph >>> g.vs["name"] ['A', 'B'] >>> print g IGRAPH UN 2 1  + attr: name (v) + edges (vertex names): AB >>> g.get_edgelist() [(0, 1)] >>> g2 = Graph.Formula("AB") >>> g2.isomorphic(g) True >>> g = Graph.Formula("A > B") # directed graph >>> g.vs["name"] ['A', 'B'] >>> print g IGRAPH DN 2 1  + attr: name (v) + edges (vertex names): A>B If you have may disconnected componnets, you can separate them with commas. You can also specify isolated vertices: >>> g = Graph.Formula("AB, CD, EF, GH, I, J, K") >>> print ", ".join(g.vs["name"]) A, B, C, D, E, F, G, H, I, J, K >>> g.clusters().membership [0, 0, 1, 1, 2, 2, 3, 3, 4, 5, 6] The colon ( >>> g = Graph.Formula("A:B:C:D  E:F:G") >>> g.isomorphic(Graph.Full_Bipartite(4, 3)) True Note that you have to quote vertex names if they include spaces or special characters: >>> g = Graph.Formula('"this is" + "a silly" + "graph here"') >>> g.vs["name"] ['this is', 'a silly', 'graph here']

Creates a bipartite graph with the given vertex types and edges. This
is similar to the default constructor of the graph, the only difference
is that it checks whether all the edges go between the two vertex classes
and it assigns the type vector to a Examples: >>> g = Graph.Bipartite([0, 1, 0, 1], [(0, 1), (2, 3), (0, 3)]) >>> g.is_bipartite() True >>> g.vs["type"] [False, True, False, True]

Generates a full bipartite graph (directed or undirected, with or without loops). >>> g = Graph.Full_Bipartite(2, 3) >>> g.is_bipartite() True >>> g.vs["type"] [False, False, True, True, True]

Generates a random bipartite graph with the given number of vertices and edges (if m is given), or with the given number of vertices and the given connection probability (if p is given). If m is given but p is not, the generated graph will have n1 vertices of type 1, n2 vertices of type 2 and m randomly selected edges between them. If p is given but m is not, the generated graph will have n1 vertices of type 1 and n2 vertices of type 2, and each edge will exist between them with probability p.

Generates a random geometric graph. The algorithm drops the vertices randomly on the 2D unit square and
connects them if they are closer to each other than the given radius. The
coordinates of the vertices are stored in the vertex attributes

Creates a bipartite graph from an incidence matrix. Example: >>> g = Graph.Incidence([[0, 1, 1], [1, 1, 0]])

Projects a bipartite graph into two onemode graphs. Edge directions are ignored while projecting. Examples: >>> g = Graph.Full_Bipartite(10, 5) >>> g1, g2 = g.bipartite_projection() >>> g1.isomorphic(Graph.Full(10)) True >>> g2.isomorphic(Graph.Full(5)) True

Calculates the number of vertices and edges in the bipartite projections of this graph according to the specified vertex types. This is useful if you have a bipartite graph and you want to estimate the amount of memory you would need to calculate the projections themselves.

Returns the incidence matrix of a bipartite graph. The incidence matrix is an n times m matrix, where n and m are the number of vertices in the two vertex classes.

Inplace addition (disjoint union). See Also: __add__ 
Copies the graph and extends the copy depending on the type of the other object given.

Inplace subtraction (difference). See Also: __sub__ 
Removes the given object(s) from the graph

Copies exact replicas of the original graph an arbitrary number of times.

Coercion rules. This method is needed to allow the graph to react to additions with lists, tuples, integers, strings, vertices, edges and so on. 
Reconstructs a Graph object from Python's pickled format. This method is for internal use only, it should not be called directly. 
Support for pickling.

Plots the graph to the given Cairo context in the given bounding box The visual style of vertices and edges can be modified at three places in the following order of precedence (lower indices override higher indices):
E.g., if the Besides the usual selfexplanatory plotting parameters
(

Returns a string representation of the graph. Behind the scenes, this method constructs a GraphSummary instance and invokes its
See the documentation of GraphSummary for more details about the output.

Returns the summary of the graph. The output of this method is similar to the output of the
Behind the scenes, this method constructs a GraphSummary object and invokes its

Alias for layout_fruchterman_reingold() with dim=3. See Also: Graph.layout_fruchterman_reingold() 
Alias for layout_kamada_kawai() with dim=3. See Also: Graph.layout_kamada_kawai() 
Alias for layout_random() with dim=3. See Also: Graph.layout_random() 
Alias for layout_grid() with dim=3. See Also: Graph.layout_grid() 
Alias for layout_circle() with dim=3. See Also: Graph.layout_circle() 
Place the vertices of a bipartite graph in two layers. The layout is created by placing the vertices in two rows, according to their types. The positions of the vertices within the rows are then optimized to minimize the number of edge crossings using the heuristic used by the Sugiyama layout algorithm.

Places the vertices of the graph uniformly on a circle or a sphere.

Places the vertices on a 2D plane or in the 3D space ccording to the DrL layout algorithm. This is an algorithm suitable for quite large graphs, but it can be
surprisingly slow for small ones (where the simpler forcebased layouts
like

Places the vertices on a 2D plane or in the 3D space according to the FruchtermanReingold algorithm. This is a force directed layout, see Fruchterman, T. M. J. and Reingold, E. M.: Graph Drawing by Forcedirected Placement. Software  Practice and Experience, 21/11, 11291164, 1991

This is a port of the graphopt layout algorithm by Michael Schmuhl. graphopt version 0.4.1 was rewritten in C and the support for layers was removed. graphopt uses physical analogies for defining attracting and repelling forces among the vertices and then the physical system is simulated until it reaches an equilibrium or the maximal number of iterations is reached. See http://www.schmuhl.org/graphopt/ for the original graphopt.

Places the vertices of a graph in a 2D or 3D grid.

Places the vertices on a plane according to the KamadaKawai algorithm. This is a force directed layout, see Kamada, T. and Kawai, S.: An Algorithm for Drawing General Undirected Graphs. Information Processing Letters, 31/1, 715, 1989.

Places the vertices on a 2D plane according to the Large Graph Layout.

Places the vertices in an Euclidean space with the given number of dimensions using multidimensional scaling. This layout requires a distance matrix, where the intersection of row i and column j specifies the desired distance between vertex i and vertex j. The algorithm will try to place the vertices in a way that approximates the distance relations prescribed in the distance matrix. igraph uses the classical multidimensional scaling by Torgerson (see reference below). For unconnected graphs, the method will decompose the graph into weakly connected components and then lay out the components individually using the appropriate parts of the distance matrix.
Reference: Cox & Cox: Multidimensional Scaling (1994), Chapman and Hall, London. 
Places the vertices of the graph randomly.

Places the vertices on a 2D plane according to the ReingoldTilford layout algorithm. This is a tree layout. If the given graph is not a tree, a breadthfirst search is executed first to obtain a possible spanning tree.
See Also: layout_reingold_tilford_circular Reference: EM Reingold, JS Tilford: Tidier Drawings of Trees. IEEE Transactions on Software Engineering 7:22, 223228, 1981. 
Circular ReingoldTilford layout for trees. This layout is similar to the ReingoldTilford layout, but the vertices are placed in a circular way, with the root vertex in the center. See layout_reingold_tilford for the explanation of the parameters.
See Also: layout_reingold_tilford Reference: EM Reingold, JS Tilford: Tidier Drawings of Trees. IEEE Transactions on Software Engineering 7:22, 223228, 1981. 
Calculates a starlike layout for the graph.


_format_mapping

_layout_mapping


vsThe vertex sequence of the graph

esThe edge sequence of the graph

_as_parameter_

Home  Trees  Indices  Help 


Generated by Epydoc 3.0.1 on Fri May 10 10:51:13 2019  http://epydoc.sourceforge.net 