Skip to content

In a multi-trace figure the traces that are not animated get invisible when animation starts #4596

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
empet opened this issue Feb 21, 2020 · 7 comments
Labels
bug something broken

Comments

@empet
Copy link

empet commented Feb 21, 2020

Recently I noticed that the old definition of animation frames doesn't work anymore.
More precisely: if I define a subplot with two cells, for example, and want to animate only the traces in a single subplot, then by the initial definition from 2016, I had to set the attribute Frame.traces on the list of trace indices in fig.data that are modified from frame to frame. All other traces were visible during the animation.

After a recent plotly.js release (I couldn't identify it) the traces that are not modified within Frame.data disappear when the animation starts, and I have to extend the list Frame.traces to the list of all traces in fig.data because those that are not modified from frame to frame are set invisible by plotly.js. Hence Frame.data must contain the update visible=True for these ones.

My question is: is it possible to revert the Frame definition to the old one? Why let users make these settings (visible=True), and why they are not performed automatically by plotly.js, as it did
for three years?

Here is a simple example to understand better what I'm referring to:
https://plot.ly/~empet/15543/

@etpinard
Copy link
Contributor

etpinard commented Feb 21, 2020

Thanks for posting.

Looks like an unwanted change of behaviour happened during the release of v1.37.0. I suspect the regression got introduced though #2574

https://codepen.io/etpinard/pen/bGdBWJq uses v1.36.0, does it behave like you remember?

@etpinard etpinard added the bug something broken label Feb 21, 2020
@etpinard
Copy link
Contributor

etpinard commented Feb 21, 2020

For reference:


So, looks like something goes wrong when mapping the indices from frames[i].traces to the trace settings in frames[i].data.

@empet
Copy link
Author

empet commented Feb 24, 2020

@etpinard The animation in this pen https://codepen.io/etpinard/pen/bGdBWJq, that uses v1.36.0 , displays the Bars only in the first frame. It should display them in all frames.

@doughagey
Copy link

doughagey commented Sep 17, 2020

I think I'm seeing something similar on the plotly.python side using Plotly 4.9.0: https://drive.google.com/file/d/1D4-YdC6n_E0_Oe21X5iknrqwrPNFYeTt/view?usp=sharing

@peterdudfield
Copy link

Im seeing similar thing in plotly.python 5.1.0

@albertaillet
Copy link

I am having the same issue in plotly.python 5.6.0. However the aforementioned workaround fixes the issue by setting {} for all the other non animated traces.

@gvwilson
Copy link
Contributor

gvwilson commented Jul 3, 2024

Hi - we are trying to tidy up the stale issues and PRs in Plotly's public repositories so that we can focus on things that are still important to our community. Since this one has been sitting for several years, I'm going to close it; if it is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. Thanks for your help - @gvwilson

@gvwilson gvwilson closed this as completed Jul 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken
Projects
None yet
Development

No branches or pull requests

6 participants