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

Suggested simple enhancement for coloring the surface in mpl_toolkits/mplot3d/axes3d.py #15426

Open
keithbriggs opened this issue Oct 16, 2019 · 6 comments
Labels
API: changes keep Items to be ignored by the “Stale” Github Action topic: mplot3d

Comments

@keithbriggs
Copy link
Contributor

This line:

avg_z = np.array([ps[:, 2].mean() for ps in polys])

means that coloring the surface is only possibly with the z coordinate.

It would be very useful to allow an arbitrary function of ps here.

@timhoffm
Copy link
Member

This is just the default. Use facecolors to supply arbitrary colors. See also:

https://matplotlib.org/gallery/mplot3d/custom_shaded_3d_surface.html#sphx-glr-gallery-mplot3d-custom-shaded-3d-surface-py

@timhoffm timhoffm added the Community support Users in need of help. label Oct 16, 2019
@QuLogic
Copy link
Member

QuLogic commented Mar 7, 2020

It seems like there's nothing to be done here?

@QuLogic QuLogic closed this as completed Mar 7, 2020
@ImportanceOfBeingErnest
Copy link
Member

Maybe the point is, that unless you use cstride=rstride=1, you will not know the polygons in advance, so it might be hard to supply facecolors? Hence, it might be useful to allow for functions other than .mean().

@keithbriggs
Copy link
Contributor Author

Yes, if I remember correctly, there was this point, and also that you might want to color with ps[:,0], or some other function of ps.

@QuLogic
Copy link
Member

QuLogic commented Mar 16, 2020

OK, let's reopen for now. There is some chance that if performance is improved sufficiently, then rstride and cstride would no longer be needed.

@github-actions
Copy link

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 Jun 28, 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 Jul 31, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 31, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API: changes keep Items to be ignored by the “Stale” Github Action topic: mplot3d
Projects
None yet
Development

No branches or pull requests

6 participants