Skip to content

Conversation

@cpsievert
Copy link

This pull request adds some support for translating ggraph's custom geoms to plotly. For some notes on the philosophy behind the approach, see https://cpsievert.github.io/plotly_book/translating-custom-ggplot2-geoms.html

require(igraph)
gr <- graph_from_data_frame(flare$edges, vertices = flare$vertices)
ggraph(gr, 'treemap', weight = 'size') + geom_treemap()
plotly::ggplotly()

It'd be awesome to eventually support all of ggraph's custom geoms, and also take advantage of plotly's support for nested/hierarchial selections (since it provides a natural way to select nodes of a tree-like structure), but this is a decent start...

@thomasp85
Copy link
Owner

This is great! I've thought about how to best support interactivity in ggraph and plotly support is definitely one of the best possibilities. I'll not merge this in or begin to work on it myself right now but fully appreciate any work done in this direction.

Right now the focus is on polish and a few missing "static" features before a CRAN release...

@cpsievert
Copy link
Author

Glad to hear you're interested, And no worries about putting this on the back-burner...I mainly wanted to start this PR so I don't forget about it. I'm really excited about the potential for integrating the nested selection stuff in plotly. I already have a quick and dirty function for plotting dendrograms with support for hierarchical selection, but it'd be fun to think about how this framework might fit more generally into ggally.

@thomasp85
Copy link
Owner

Fantastic. Just push to this as you see fit and bring up subjects you wish to discuss...

@cpsievert
Copy link
Author

Closing in favor of #153 (to clean up git history)

@cpsievert cpsievert closed this Aug 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants