ggnetwork icon indicating copy to clipboard operation
ggnetwork copied to clipboard

geom_nodes() not sizing by nodal attributes

Open EvanUp opened this issue 4 years ago • 0 comments

geom_nodes() doesn't seem to be sizing nodes properly when its fed sizes that are related to node attributes.

## repex
data(flo)
n <- network(flo, directed = FALSE)
n%v%'labels' = paste(n%v%'vertex.names', sna::degree(n))

# each time i run this the size of each node changes
ggplot(n, aes(x, y, xend = xend, yend = yend)) +
  geom_edges(colour = "steelblue") +
  geom_nodes(size = degree(n), shape = 21, colour = "steelblue", fill = "white") +
  geom_nodetext(aes(label = labels))+
  theme_blank()
Plot_Zoom

P.S. thank you for creating and sharing this package. It's my favorite network visualization tool.

EvanUp avatar Mar 10 '20 17:03 EvanUp