Skip to content
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

fix for Scattergl animation bug #6452

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

alexturcea
Copy link

@alexturcea alexturcea commented Jan 29, 2023

closes #6251

@alexturcea
Copy link
Author

alexturcea commented Jan 29, 2023

If anyone has time to double check these changes it would be very helpful. Essentially, there are a few issues that this fix should address:

  1. when using scattergl with a multiframe plot (i.e. an animation), the scatterplot is only visible on one frame
  2. even if the above is fixed (see my first suggested fix), when the number of plots is changing across frames, the plot is not updating correctly.
  3. similar to 2. , when the number of annotations is changing across frames, the plot is not updating correctly

@alexcjohnson @archmoj @jonmmease

@@ -348,7 +347,7 @@ var exports = module.exports = function plot(gd, subplot, cdata) {
(yaxis._rl || yaxis.range)[1]
]
};
var vpRange = Lib.repeat(vpRange0, scene.count);
var vpRange = Lib.repeat(vpRange0, cdata.length);
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this one

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change required?

@alexturcea
Copy link
Author

alexturcea commented Jan 29, 2023

Code to reproduce: https://jsfiddle.net/gcptmL6v/

With the proposed fix: https://jsfiddle.net/q2wt06d3/

@alexcjohnson
Copy link
Collaborator

@alexturcea great! Nicely done, and your fiddles are very convincing. I'll let @archmoj give the code a review, but we'll need to adapt your fiddle to a test we can run on CI - maybe in animate_test.js? And hopefully we can pare it down to something small and readable 😉

A bunch of failures in the CI runs, but they don't look like the kind of thing that would have resulted from your changes.

@alexturcea
Copy link
Author

Hi @alexcjohnson @archmoj , I synched this with the main branch, still hoping to have it merged 😄

@alexcjohnson
Copy link
Collaborator

Thanks @alexturcea - as I mentioned before, we'll need to adapt your fiddle into a test, would you be able to try that? We'll also need a draftlog item.

@archmoj archmoj added bug something broken community community contribution status: reviewable labels May 27, 2024
@archmoj
Copy link
Contributor

archmoj commented May 27, 2024

Please fetch upstream/master and merge in the branch.
Then please update your https://jsfiddle.net/q2wt06d3/ using a build from publish-dist/artifacts.
Thank you!

@gvwilson gvwilson changed the title Fix for https://github.com/plotly/plotly.js/issues/6251 fix for Scattergl animation bug May 29, 2024
@@ -53,7 +53,6 @@ var exports = module.exports = function plot(gd, subplot, cdata) {
return;
}

var count = scene.count;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it be better to just var count = cdata.length in that case - and remove all the other changes?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! @eiriklv Could you please fetch upstream/master on your fork and test it by opening a PR?

@archmoj
Copy link
Contributor

archmoj commented Jul 10, 2024

@alexturcea Are you interested in completing this PR?
Could you try @eiriklv suggestion?
#6452 (comment)

@archmoj archmoj modified the milestones: v2.34.0, v2.35.0 Jul 13, 2024
@gvwilson gvwilson added fix fixes something broken P2 considered for next cycle and removed status: has TODOs bug something broken labels Aug 8, 2024
@archmoj archmoj modified the milestones: v2.35.0, v2.36.0 Aug 22, 2024
@archmoj archmoj modified the milestones: v2.36.0, v3.1.0 Oct 22, 2024
@gvwilson gvwilson assigned gvwilson and unassigned archmoj Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution fix fixes something broken P2 considered for next cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug when animating Scattergl
5 participants