vrodriguezf / deepvats

Deep Visual Analytics for Time Series
Apache License 2.0
22 stars 4 forks source link

Zooming and panning the projections plot with click-drag and scroll #76

Open vrodriguezf opened 2 years ago

vrodriguezf commented 2 years ago

Currently the way of zooming and panning the projections is quite clunky. It would be great to have something eaiser as the tensorflow embedding projector

vrodriguezf commented 2 years ago

This can be done with plotly, wraping the projections_plot ggplot2 object inside a call to plotly::ggplotly and setting its config with scrollZoom. However, moving to plotly breaks the current click and brush listeners. They should be easily replaced by their equivalents in plotly, which are all gathered in the event_data function (More info in the links below)

Useful things: https://stackoverflow.com/questions/61000088/plotly-ggplotly-r-scroll-zoom-label-size-and-tooltip-options https://plotly-r.com/linking-views-with-shiny.html https://community.plotly.com/t/how-to-achieve-click-and-brush-with-plotly-in-r/21106