plotly.R
plotly.R copied to clipboard
An attempt at a more general animation API
Note to self: this is really the only relevant part -- https://github.com/ropensci/plotly/pull/938/files#diff-bfe74656b9837557ae3edcc5e1daa831R22
May want to cherry-pick that code as merging might be a disaster
Also, the point of the API is to be able to transition between different trace types -- https://github.com/ropensci/plotly/blob/7f15fd68e61ab76cee2f6ce6e577aa927538cb7d/R/animate.R#L11-L16
the current API (i.e., frame
) assumes the animation has a fixed trace type
What does it do visually as it transitions types? That is, what does it even mean to transition a bar graph into a scatter trace? A long-running goal is to smooth out those things so they at least do something nice/reasonable.
What does it do visually as it transitions types?
I'm hoping plotly.js can work out those details ;)
More seriously, this is just an attempt to make it easier to "animate" through a collection of plots (i.e., it's ok if a redraw is required)