Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Remove comment about cmap from voxels docstring #24284

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

Merged
merged 1 commit into from
Oct 27, 2022

Conversation

ksunden
Copy link
Member

@ksunden ksunden commented Oct 27, 2022

PR Summary

voxels does not use cmap at all, and thus does not modify shade in relation to cmap being passed in, this appears to be copy/pasted from 3D methods which do use cmap.

PR Checklist

Tests and Styling

  • Has pytest style unit tests (and pytest passes).
  • Is Flake 8 compliant (install flake8-docstrings and run flake8 --docstring-convention=all).

Documentation

  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • New plotting related features are documented with examples.

Release Notes

  • New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

voxels does not use cmap at all, and thus does not modify shade in relation to cmap being passed in, this appears to be copy/pasted from methods which _do_ use cmap
@story645 story645 added this to the v3.6.2 milestone Oct 27, 2022
@tacaswell
Copy link
Member

It does not fall through to the underlying PolyCollection3D?

@story645
Copy link
Member

I think that's part of what @oscargus is trying to do in #23914?

@ksunden
Copy link
Member Author

ksunden commented Oct 27, 2022

@tacaswell Poly3DCollection makes no references to cmaps whatsoever, relying on the higher level functions to call the map to get facecolors.

In fact the light source shading itself is even done in voxels as well.

The data for voxels is fundamentally binary (show this voxel or don't) and so don't map onto a cmap.

Granted, the cmap kwarg is passed down the chain all the way to Collection and it is not an exception to pass one, but there is not data to evaluate that cmap at. voxels does not accept a c or colors argument (though that may be a reasonable addition which would make the handling described by the current docstring necessary)

For reference, I noticed this while looking into #24277, where the reporter is requesting pretty much exactly that. its easy enough to work around with the tools provided, and bringing in norms and all of the color-focused arguments may be more effort than we wish.

@tacaswell
Copy link
Member

This is another candidate for remove_method?

@tacaswell tacaswell merged commit 6ed3ab1 into matplotlib:main Oct 27, 2022
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Oct 27, 2022
@ksunden ksunden deleted the voxels_docstring branch October 28, 2022 00:07
QuLogic added a commit that referenced this pull request Oct 28, 2022
…284-on-v3.6.x

Backport PR #24284 on branch v3.6.x (Remove comment about cmap from voxels docstring)
@ksunden ksunden mentioned this pull request Feb 20, 2023
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants