Hi Dears,
How to add colour to nodes based on column in edge list? I mean I have two columns (col1 and col2) and I want to colour the two columns in two different colour in the plots. Like the capital letter node in blue and the small letter in dark read.
My code is below . Thanks!
dat <- data.frame(col1 = letters[1:20], col2 = LETTERS[1:20])
library(igraph)
g <- graph.edgelist(as.matrix(dat ),directed = T)
set.seed(2021)
plot(g, layout= layout_nicely(g))