briatte / ggnet

Network visualization with ggplot2
https://briatte.github.io/ggnet/
194 stars 33 forks source link

Overlapping labels #34

Closed josruirod closed 5 years ago

josruirod commented 5 years ago

Hello, I have just found this package and succesfully tried it. I think is a really nice solution within R and I will include this in my pipelines.

I would like to ask about whether we can control edges lengths and the overlapping of the labels in the nodes. My networks are nice but many nodes and labels are overlapping, so I have to make them really big in order to be able to differentiate them.

In my ggplot2 plots I've been using thepackage ggrepel to avoid overlapping labels, is there any kind of solution or can this package be used here too?

Thanks for your feedback

briatte commented 5 years ago

Hi @josruirod

All apologies for answering your question only now.

The magic of ggrepel can be applied to network visualization using either my other network visualization function, ggnetwork (see the relevant part of the vignette), or the even more powerful and flexible ggraph package.

Hope this helps!

peranti commented 2 years ago

Hi @briatte, Thanks for these visualization packages.

Can I combine the functions from these two packages? Can I do it like this?

ggnet2(netBio, size = "degree", size.cut = 10, 
       node.color = "Source", alpha = 0.75, label = "ID", 
       edge.size = 1, edge.color = "grey", edge.alpha = 0.5) + 
  geom_nodetext_repel(label = "ID")

What changes need to be made?