holoviz / holoviews

With Holoviews, your data visualizes itself.
https://holoviews.org
BSD 3-Clause "New" or "Revised" License
2.66k stars 396 forks source link

Smooth animations #4571

Open ahuang11 opened 3 years ago

ahuang11 commented 3 years ago

Is there interest in implementing some util function to create smooth animations from holomaps like https://github.com/NicholasARossi/Easing-Animations-with-Python chroma https://github.com/NicholasARossi/Easing-Animations-with-Python/raw/master/media/chroma.gif

ahuang11 commented 3 years ago

Maybe hvplot?

jlstevens commented 3 years ago

Honestly I think this feature is out of the scope of holoviews. Happy to move this issue to hvplot as suggested if @philippjfr agrees it is in scope there.

philippjfr commented 3 years ago

Even less in scope there than here imo, hvPlot is explicitly concerned with plotting real data, while these transitions are more suited for other animations. In the end I'd really prefer it if Bokeh and/or Plotly implemented transitions between states in JS like other JS based plotting libraries.

jlstevens commented 3 years ago

I agree: ideally this would be implemented at the plotting library level.

jonmmease commented 3 years ago

Cross reference: Plotly.js has basic support for animating scatter and bar traces https://plotly.com/python/animations/.

One thing that would probably be in scope for the Plotly backend would be to have an option to enable smooth transitions for HoloMaps/DynamicMaps that return supported elements.

jbednar commented 3 years ago

That would be cool. Everyone wants bar chart races! :-)

MarcSkovMadsen commented 3 years ago

I guess it will take some time before Bokeh or Plotly supports as awesome transitions as this.

echarts2

jbednar commented 3 years ago

Those animations seem like the easy case, with each intermediate stage being a valid Bokeh or Plotly plot. I would think we could do that in HoloViews if we wanted. Whereas bar chart races need the columns to swap order left to right, animating the transition so that you can see where the bar is moving to and where it came from, which is something that the plotting library would have to do because there is no valid chart with the bar in intermediate locations in that case.