Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Add 3D scatter test for cmap update#30062
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a week or so, please leave a new comment below and that should bring it to our attention. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join uson gitter for real-time discussion.
For details on testing, writing docs, and our review process, please seethe developer guide
We strive to be a welcoming and open project. Please follow ourCode of Conduct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Thanks a lot - looks good to me.
Thanks and congratulations on your first merged PR in Matplotlib. Looks that there may be two soon. Hoping to see you around! |
35c5481
intomatplotlib:mainUh oh!
There was an error while loading.Please reload this page.
PR summary
This PR adds a new test to verify that changing the colormap of a 3D scatter plot (
Axes3D.scatter
) after drawing the figure properly updates the face colors.Why is this change necessary?
There was previously no test ensuring that colormap updates on 3D scatter plots are reflected after a figure draw. This test ensures consistency with 2D behavior and guards against regressions.
What problem does it solve?
Confirms that calling
set_cmap()
after drawing does in fact update the plotted colors in 3D, which has historically been a bug but seems to be fixed.What is the reasoning for this implementation?
The test draws a 3D scatter plot with an initial colormap (
'jet'
), forces a draw, changes the colormap to'viridis'
, and compares it against a reference plot created directly with'viridis'
.This ensures the update mechanism behaves correctly post-render.
Minimal example
Closes#18931
PR checklist
edgecolor='face'
#18931" is in the body of the PR description tolink the related issue