Questions tagged [igraph]

igraph is a free software package for creating and manipulating large undirected and directed graphs. It is written in C, but has interfaces to higher-level languages like R, Python or Mathematica.

igraph includes implementations for classic graph theory problems like minimum spanning trees and network flow, and also implements algorithms for some recent network analysis methods (e.g., community structure search).

igraph is a collection of network analysis tools with the emphasis on efficiency, portability and ease of use. igraph is open source and free. igraph can be programmed in R, Python, Mathematica and C/C++.

Repositories

Related links

3934 questions
1
vote
1 answer

Converting networkx to igraph python but keeping the node ids of networkx graph

Is there a way when converting from networkx to igraph to keep the networkx node names? As it is referred in here "Vertex names will be converted to "_nx_name" attribute and the vertices will get new ids from 0 up (as standard in igraph)".
Georgia
  • 53
  • 5
1
vote
1 answer

R Igraph Error: "Weight vector must be positive, Invalid value"

I've built several graphs in iGraph. In each graph, nodes represent words, and edge weights represent the number of times Word A was given as a response (in a word association task) to Word B. In each graph, I've normalised the edge weights so that…
1
vote
1 answer

How to insert the results regarding similarity measures (igraph) in a specific table?

I have a edge list for which I want to determine similarity measures using R. Edge list Table 1 c1 c2 Algeria Andorra Algeria Angola Algeria Antigua and Barbuda Algeria Argentina Algeria Armenia Algeria Australia Algeria Austria Algeria…
Liza
  • 23
  • 5
1
vote
0 answers

Reingold Tilford layout with a Python NetworkX graph

I have a 4500 nodes directed acyclic graph (a tree) describing the structure of a company where each node is an employee and the directed edges represent a "manages" relationship. I have implemented this graph in Pyton 3.9 with networkX 2.5. After…
Robert Alexander
  • 875
  • 9
  • 24
1
vote
1 answer

Why does the scaling change when I take a subset of a network graph with manual coordinates?

For this project I'm creating several network graphs, but the scaling is off. The first network graph includes all of the nodes/categories and is rather large. The other network graphs are subsets of the full one. I'm using the same coordinates for…
ethan tenison
  • 393
  • 3
  • 14
1
vote
2 answers

How to find all subordinates using igraph

I just wonder if there is a way to find all subordinates of a manager. In below example, the person in p2 reports to the person in P1. I want to find all the persons report to A. If I use below code, I can get A->B A->C. But what I want is A->B A->C…
1
vote
0 answers

Applying the igraph assortativity function to specific node labels?

I have several networks that I would like to use the assortativity function on. The problem is, I am only interested if nodes of one particular label tend to cluster together, and I don't want nodes of other labels to interfere. Is there a way to…
1
vote
1 answer

Reading edges from a file. I can't define a graph

I am new in R. I am working with igraph library. I am new using such library. I have a problem: I have a list of edges in a text file. It has two columns. The first has initial node, the second has the ending node. I am reading the file with: g1…
Guillermo Parada
  • 199
  • 1
  • 1
  • 6
1
vote
1 answer

Adding network graph attributes by names of its vertices

I have a matrix from which I construct a network graph with igraph. I want to store the information of different types of vertices as an attribute, which I can deduce from its names. I tried a couple of combinations mymat =…
slinel
  • 61
  • 7
1
vote
1 answer

Different values in network stats with different igraph functions in R

I'm trying to calculate different network statistics with the following (demo) data BLM NPS USFWS USFS Bureau of Reclamation BLM 10 1 8 2 1 NPS 1 3 2 0 0 USFWS 8 2 22 5 2 USFS 2 0 5 5 0 Bureau of Reclamation 1 0 2 0 2 When it…
as365
  • 41
  • 4
1
vote
1 answer

get.edgelist or get.data.frame to transform matrix'values into weights of an edgelist

I have matrix that through the interpretation as a network shall give me an edgelist with the matrix' values as weights. M4 <- matrix(rpois(36,5),nrow=6) #randomly googled that to have sample data Mg <- graph.adjacency(M4) # make matrix into…
slinel
  • 61
  • 7
1
vote
1 answer

Mapping obstructions coordinates in 2D to undirected Lattice graph

Context: I want to do shortest path search for a mobile detector, source system operating in 2D Cartesian coordinates i.e. a 20 m x 10 m space. Using igraph for python, I have created a Lattice graph over these dimensions with vertices corresponding…
pproctor
  • 101
  • 1
  • 10
1
vote
2 answers

How to crate a network from a string vector

I am trying to create an igraph object splitting a string vector on a special character ("&"). I use a for-loop to create a vector and convert that into a network graph. The code works but is extremely inefficient on very long vectors (large…
MCS
  • 1,071
  • 9
  • 23
1
vote
1 answer

igraph ggplot rStudio How can I make lines between nodes longer and add arrows? Also how can I make the legend smaller?

I have a really wordy network plot. I am basically trying to have it function as a sort of flow chart. I am trying to make its aesthetics both functional and pleasing, but I am having a difficult time. The legend's text is way too large and there is…
Danielle
  • 35
  • 3
1
vote
1 answer

How to generate and study regular graph for a non-integer average degree?

I have an undirected graph with the following attributes and I need to do some analysis on a fully random graph and a regular graph with the same attributes. Attributes: Number of Nodes = 37764 Number of Edges = 518151 Average Degree =…
thepunitsingh
  • 713
  • 1
  • 12
  • 30
1 2 3
99
100