ltong
ltong

Reputation: 543

How to remove outline around nodes in network graph R

I have a network graph shown below, where I have categorized specific nodes, associated with different shades of green. For the colors to pop better, is there a way to remove the black outlines around the circle or at least make it the same color as my node?

This a snippet of my code, where color_quartile is a previously designated list of four colors.


V(net)$color <- V(net)$color_quartile
V(net)$label <- NA

plot(net, layout = l, edge.curved = 0.25, vertex.size = V(net)$size*0.3, color = "white", edge.width = E(net)$width*0.2)

enter image description here

Upvotes: 1

Views: 206

Answers (1)

clp
clp

Reputation: 1528

Try this.

library(igraph)
g <- make_star(10)
plot(g, vertex.frame.color = "green", vertex.frame.width = 0, edge.curved = 0.25)

# Or set frame border to vertex color.
col <- colorRampPalette(c("green", "darkgreen"))(gorder(g))
V(g)$color       <- col
V(g)$frame.color <- col
dev.new(); plot(g, vertex.frame.width=4, edge.curved = 0.25)

#Docs.
?plot.igraph          # doc. Plotting of graphs.
?igraph.plotting      # doc. Drawing graphs.

Documentation can be found here:

Upvotes: 1

Related Questions