monarch-initiative / monarchr

R package for easy access, manipulation, and analysis of the Monarch Initiative or other KGX-formatted knowledge graphs.
https://monarch-initiative.github.io/monarchr/articles/monarchr
Other
9 stars 1 forks source link

Improved visualization features #24

Open oneilsh opened 4 months ago

oneilsh commented 4 months ago

The current plot() is fairly basic, using ggraph with some ggrepel node labels and customizable layout, node and edge coloring.

There are several very nice graph visualization libraries though (galleries 1, 2), it would be great to use these to provide slick and easy to use visualizations. Especially so for interactive visualizations for use in Rmd docs and Shiny apps.

bschilder commented 3 months ago

I can take a stab at this, I think I've tried every network plotting package under the sun at some point or another 😆

bschilder commented 3 months ago

Btw, this isn't really specific to monarchr but the default plotting function can often make distinguishing which labels connect to which nodes tricky.

This is especially true as the graphs become larger with more crowded nodes.

image

For example:

Screenshot 2024-08-22 at 12 39 36

One potential solution is to set the default plotting options such that an arrow is always drawn between a label and its node (no matter how close together they are).