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

Extend set_offsets to 3D for Path3DCollection, Patch3DCollection #27543

Closed
scottshambaugh opened this issue Dec 18, 2023 · 5 comments
Closed

Comments

@scottshambaugh
Copy link
Contributor

Summary

When creating 3D animations, it's best practice to update positions for the scatter points rather than re-drawing the whole thing. However, the only way to do this currently is to write to the private attribute _offsets3d directly. We should have a public set_offsets method to mirror the 2D behavior.

See also: https://stackoverflow.com/questions/41602588/how-to-create-3d-scatter-animations

Proposed fix

No response

@scottshambaugh
Copy link
Contributor Author

scottshambaugh commented Dec 18, 2023

Note to self, set_facecolor seems potentially messed up too.

Edit: this is a separate issue, see #27555

@timhoffm
Copy link
Member

I imagine there will be quite a number of similar cases around.

This is a major downside of the concept to promote 2D to 3D by subclassing. One would have to make sure that all 2d API and logic is overwritten. But AFAICT this has not been done.

@scottshambaugh
Copy link
Contributor Author

Yeah, agreed. It's a bit of a pain because it'll be a pretty big effort to go scrub everything - quite a few methods work just fine being subclassed. For right now I figure I can knock down things as they come up. Might be worth doing a look through the top mplot3d stackoverflow questions to see if there are any gaps identified there.

@scottshambaugh
Copy link
Contributor Author

This is a partial duplicate of #784

@scottshambaugh scottshambaugh closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
@spinicist
Copy link

Hello, after spending all morning wondering why my 3D animation with set_offsets() wasn't working I finally found this issue. Hence I am a +1 for fixing this please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants