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

mplot3d: set_offsets()/set_array() don't work right for 3d collections #784

Open
zpincus opened this issue Mar 21, 2012 · 4 comments
Open
Assignees
Labels
keep Items to be ignored by the “Stale” Github Action topic: mplot3d

Comments

@zpincus
Copy link
Contributor

zpincus commented Mar 21, 2012

It's easy to make animated/interactive 2d plots with PatchCollections, where one can dynamically alter the positions, colors (if using a ScalarMappable colormap), and number of active patches using the set_offsets() and set_array() commands.

This doesn't work quite right for, e.g., Patch3DCollection objects. One can work around set_offsets() by setting the _offsets3d attribute directly, and that seems to work fine, but perhaps this could be bundled up into a set_offsets() method?

It's trickier for changing the colormap values with set_array(), because there's no clear hook for how to invoke the zalpha() function appropriately. Worse, at times I'm able to re-create the "patches lose their color and turn gray" bug when directly setting these values -- but I can't exactly figure out where or when. I'm working on a test case for this...

I can try to work up a patch for this, but if @WeatherGod or anyone else could give a hint or two as to the best approach, that would be helpful! I'm thinking that set_3d_properties() and do_3d_projection() have basically the logic required, which could be refactored into set_offsets() and set_array() calls that would do the right things...

PS. Last issue for today, I promise -- sorry for the spam!

@ghost ghost assigned WeatherGod Mar 21, 2012
@WeatherGod
Copy link
Member

The way to correctly deal with the losing color issue is to overload the set facecolors and edgecolors methods to modify _facecolors3d and such. But the getters will still have to get from the original attributes. I should also try and take advantage of the callback system for scalarmappables.

@tacaswell tacaswell added this to the unassigned milestone Aug 18, 2014
@petehuang
Copy link
Contributor

Have there been any updates here in the last few years?

@story645 story645 modified the milestones: unassigned, needs sorting Oct 6, 2022
@github-actions
Copy link

github-actions bot commented Oct 9, 2023

This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!

@github-actions github-actions bot added the status: inactive Marked by the “Stale” Github Action label Oct 9, 2023
@github-actions github-actions bot added the status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. label Nov 8, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@scottshambaugh scottshambaugh added keep Items to be ignored by the “Stale” Github Action and removed status: inactive Marked by the “Stale” Github Action status: closed as inactive Issues closed by the "Stale" Github Action. Please comment on any you think should still be open. labels May 16, 2024
@rcomer
Copy link
Member

rcomer commented May 20, 2024

Looks like the intention was to re-open this one.

@rcomer rcomer reopened this May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
keep Items to be ignored by the “Stale” Github Action topic: mplot3d
Projects
None yet
Development

No branches or pull requests

7 participants