thomasp85 / ggraph

Grammar of Graph Graphics
https://ggraph.data-imaginist.com
Other
1.08k stars 116 forks source link

R crashes when plotting one particular small dense graph with "stress" layout #286

Closed simonheb closed 2 years ago

simonheb commented 3 years ago

I plot ~1000 varying graph structures in my data. It works for 999 but crashes on a single particular network. If I leave this one out, or use something else than "stress" it works. I can reproduce the issue with the attached file and this line of code:

g<-readRDS("weird-graph.RDS")
plot(g)  #this works
ggraph(g) #this doesn't

I don't get an error message, R simply crashes grafik

weird-graph.zip

schochastics commented 2 years ago

This is not an issue of ggraph but graphlayouts. I cannot reproduce the error with the weird graph. Can you check the code below?

g <- readRDS("weird-graph.RDS")
ggraph(g,"stress") +
  geom_edge_link()+
  geom_node_point()