plotly.R
plotly.R copied to clipboard
quick implementation of most of ggraph/ggforce
TODO:
- [ ] Converters for ggforce's
GeomMarkCircle
/GeomMarkEllipsis
/GeomMarkHull
- [ ] Converter for ggraph's
GeomAxisHive
(path + text?). For example, see https://github.com/thomasp85/ggraph/blob/8d23845/R/geom_axis_hive.R#L123-L142 - [ ] Add relevant
key
attributes. - [ ] Throw warnings/pointers to issues when lack of plotly.js support for color/width arrays is relevant (perhaps this should be done at the
geom2trace()
level). - [ ] Catch cases where we need to incorporate geom params into the drawing logic?
- [ ] Tests!
Was this PR ever considered? What's the situation now?
@danton267 would you mind filing an issue requesting this feature? Having some {ggraph}
/{ggforce}
support would have a much higher ROI compared to some of the other extensions you've requested https://github.com/plotly/plotly.R/issues/created_by/danton267
@cpsievert I will happily work on some of the geoms
@moutikabdessabour it'd be great if you could also look into converting {ggraph}
based treemaps, so that we can avoid the potential licensing issues with converting {treemapify}
https://github.com/plotly/plotly.R/pull/2051
@cpsievert currently implementing ggraph's GeomAxisHive
. Once I will finish I will move forward to ggraph's treemaps
@cpsievert I have successfully deconstructed the geoms however I'm facing some transparency
issues.
attached is my deconstruction when rendered using ggplot
and ggplotly
the ggplot one is a bit opaque because alpha gets rescaled to fill the 0 to 1 interval. this is not an issue.
ggplotly
was complaining that unique alpha was bigger then one so I added alpha
as an aes to the split_on
function.
I implemented the ggraph's {treemap}
this is the one that's similar to {treemapify}
output.
Do you think I should go forward and implement all the examples found here?? https://www.data-imaginist.com/2017/ggraph-introduction-layouts/
Now all the hierarchical plots are supported.
EDIT:
I just noticed that you had some of the geoms implemented in this PR. so ggraph treemaps are supported in this PR too
EDIT 2:
I managed to get the desired output for ggraph::geom_axis_hive
. How can I push the changes? or do you want me to paste the code here.
Edit 3:
Managed to implement GeomMarkCircle
I was able to implement all the ggforce
geoms you put in the first comment.
@cpsievert how would I convert mm
to px
in plotly
? thanks again for your time.
Hello @moutikabdessabour @cpsievert ! Thanks for your work - I am new to posting GitHub issues.
Out of the ggforce package, is it possible to implement the geom_GeomPathInterpolate()
so that the geom_link2()
will plot?
Thank you! And any workarounds appreciated :)
Just want to put in my two cents that this would be an incredible addition if it somehow passes checks one day.