Closed muschellij2 closed 5 years ago
What do you think of integrating ggplotly into another function called gganatogram_plotly or gganatogram_interactive instead of the main function. This way we would avoid the weird static plot behaviour.
I think that's fine, but then you need to duplicate all the code unless you reimplement the plot in plotly itself and not ggplot.
John
On Thu, Sep 20, 2018 at 8:38 AM Jesper Maag notifications@github.com wrote:
What do you think of integrating ggplotly into another function called gganatogram_plotly or gganatogram_interactive instead of the main function. This way we would avoid the weird static plot behaviour.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jespermaag/gganatogram/pull/14#issuecomment-423167379, or mute the thread https://github.com/notifications/unsubscribe-auth/ABBnrr6BAuhiQAoa84D97DxwTBxEpXeIks5uc4xRgaJpZM4WxGCj .
You're right John, it's not a good option. I'll think about what's best
So geom_GeomPolyPath doesn't translate in
plotly::ggplotly
.plotly::ggplotly
allows you to make interactive graphics - without extra code! So if you useggplot2_only
, then the figure itself doesn't look correct (see below). This is likely differences fromgeom_polygon
andgeom_poly
compared togeom_polypath
. But when you useggplotly
on the output - this seems to work well and agrees with the original output. I think you may need to regroup some of the nerve data (may be others as well) if you want "accurate" polygons fromggplot2
.TL; DR - use
ggplot2_only
when usingplotly::ggplotly
and you can get interactivity!Created on 2018-09-19 by the reprex package (v0.2.0).