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

Cluster Analysis - Finding Unique Users When Changing Info

To calculate the unique users in a dataset one can use the following code: library(tidyverse) library(igraph) graph.data.frame(dat) %>% components() %>% pluck(membership) %>% stack() %>% set_names(c('GRP', 'user_id')) %>% …
1
vote
1 answer

How to change the font size, color, and style while setting `engine = htmlwidget` as a parameter of plot function?

Background of the Problem I was trying the plot the rules, found after applying mineCARs of R. plot(top10subRules, method = "graph", engine='htmlwidget') However, the default font, and it's color does not become completely visible when I set the…
Md. Sabbir Ahmed
  • 850
  • 8
  • 22
1
vote
1 answer

Visualizing graph using igraph package in r

I have the correlation coefficients matrix as bellow and am trying to visualize this using igraph package and its layouts. None of the layouts output a clear network. Can anyone suggest how I can fix this? dput(adjm) structure(c(1,…
statwoman
  • 380
  • 1
  • 9
1
vote
1 answer

Splitting a graph by a node

I have a graph, which i would like to split by a node. Which is a presented below. I am using R tidygraph. It has morph functionality with to_split and to_components, but i couldnot find proper documentation to implement it. Any leads will be…
naveen chandra
  • 149
  • 1
  • 7
1
vote
1 answer

"Preserving" edge attributes with in built function

This post is related to a previous question. The basic problem in that post was how to connect nodes by common retweeted users. The code suggested by @ThomasIsCoding does work. My follow up question is how to make this function store edge…
Luis
  • 330
  • 1
  • 11
1
vote
1 answer

friendship network identification in R

I want to identify networks where all people in the same network directly or indirectly connected through friendship nominations while no students from different networks are connected. I am using the Add Health data. Each student nominates upto 10…
chfs
  • 57
  • 6
1
vote
1 answer

Compare nodes in 2 graphs igraph R

I'm using igraph in RSudio & have 2 directed weighted graphs (A & B) & all I want is to find, if it exists, is the list of shared nodes. i.e. V(A) conjunct V(B) A: 117->55 119->55 119->119 119->127 55 ->117 55 ->119 59 ->119 123->23 23 ->119…
DrBwts
  • 3,470
  • 6
  • 38
  • 62
1
vote
0 answers

How to angle node labels in igraph for python

Question: how can I rotate text on an igraph plot in python I'm just trying to rotate text on a simple graph 45 degrees however adjusting the vertex_label_angle as suggested here seems to have no affect. Included is a simplified example showing how…
TCulos
  • 183
  • 3
  • 13
1
vote
2 answers

Creating a graph structure using igraph in R

I am trying to reproduce the following plot using igraph in R. I have the following code: library(igraph) edges <- c(1,2, 2,3, 6,8, 6,7, 4,5, 9,10) g<-graph(edges, n=max(edges), directed=F) vcount(g) plot(g, layout =…
Ranji Raj
  • 778
  • 4
  • 18
1
vote
1 answer

R Network Analysis: Color of edges and vertices

I have created a graph with the igraph-Package in R. Now i want to make the graph more colorful. I want to color my network based on the type of "party" in my dataset. My dataset looks like this: Screen.name mentions party 1…
Maxl Gemeinderat
  • 197
  • 3
  • 14
1
vote
1 answer

How to convert networkx node positions to python-igraph node positions (layout)

I have a dictionary of node positions (a layout) node_pos_dict (defined at the bottom of this post) with node id's as keys and node positions as values. I am ommiting edges for simplity. I am using this to plot a graph G in networkx: import networkx…
Ouroboroski
  • 139
  • 2
  • 10
1
vote
1 answer

How to create a list of igraphs from ncol files?

I have a number of weighted graphs stored in *.ncol files. For the sake of the question lets say I have 2 files, ncol_1.ncol 21 53 1.0 5 52 1.0 32 52 1.0 119 119 0.5 119 85 0.5 87 0 1.0 36 116 1.0 85 87 1.0 116 5 1.0 4 52 1.0 115 4 1.0 53 115 1.0 52…
DrBwts
  • 3,470
  • 6
  • 38
  • 62
1
vote
2 answers

Count edges of a given type for each node with tidygraph

Objective: I want to count the number of incoming edges of a partial type for each node. How can I do that? Criteria: I need to use the R package tidygraph Answers that allow me to mutate an existing graph via a magrittr pipeline are better Fewer…
Ian Cero
  • 360
  • 1
  • 8
1
vote
1 answer

Igraph: Remove edges from ego network based on condition (those not from ego)

I have a network of friendships and I'm trying to plot each ego network that shows only to out nominations of each ego. When I plot the ego network, it includes arrows directed towards ego and edges connecting alters to each other. I'd like to…
L. Tucker
  • 523
  • 2
  • 12
1
vote
1 answer

Connecting nodes by common friends in R

I am working with a retweets networks using igraph. My network is directed, meaning that it connects people that retweets from other users. My format is an edgelist where arrows follow from the retweeter to the retweeted user and there are no…
Luis
  • 330
  • 1
  • 11