5

a bit of a mystery to me here. I'm simply trying to change the edge colour of a graph using ggraph, and the edges go orange no matter what colour I use. for example, here I attempt to set the edge_colour to grey:

library(igraph)
library(ggraph)
ring <- sample_k_regular(10, 2)
ggraph(ring) +
geom_edge_link(aes(edge_colour='grey')) +
geom_node_point(shape=21,color='black',size = 7,stroke=1,fill='white'   )+
theme_graph()

Am I missing something?

  • 8
    `aes(edge_color = )` expects an _edge attribute_. If you want just a straight up color, set the `color` argument outside of `aes()`....e.g,. `geom_edge_link(colour='grey')` – paqmo May 07 '18 at 15:22
  • wow thanks. That was simple, thanks. – Ro.han.solo May 09 '18 at 04:13

0 Answers0