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

Ensure TwoSlopeNorm always has two slopes #25061

Merged
merged 4 commits into from Jan 24, 2023
Merged

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Jan 22, 2023

PR Summary

Fixes #24283.

PR Checklist

Documentation and Tests

  • Has pytest style unit tests (and pytest passes)
  • 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

@dstansby dstansby marked this pull request as ready for review January 23, 2023 15:30
@jklymak
Copy link
Member

jklymak commented Jan 23, 2023

Wouldn't it be better to just error out here?

@dstansby
Copy link
Member Author

dstansby commented Jan 23, 2023

Given this is in the autoscaling part (the user hasn't explicitly requested a vmin/vmax), I'd say it's better to choose some sensible vmin/vmax and give the user some sort of plot - if they then want to change the vmin/vmax that's at least a starting point to go from.

@tacaswell tacaswell added this to the v3.8.0 milestone Jan 23, 2023
@tacaswell
Copy link
Member

tacaswell commented Jan 23, 2023

This needs atleast a whats new and or maybe a behavior change note.

@QuLogic QuLogic changed the title Ensure TwoSlopNorm always has two slopes Ensure TwoSlopeNorm always has two slopes Jan 24, 2023
@jklymak
Copy link
Member

jklymak commented Jan 24, 2023

This seems good to me after a bit of documentation. Ping for a review if it gets buried

@dstansby
Copy link
Member Author

Added a behaviour change note as I didn't think this warranted a what's new - happy to add or move to what's new though if anyone disagrees.

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me. Thanks, and sorry for misunderstanding the intention.

@tacaswell
Copy link
Member

Restarted the failed job, looked unrelated (a subprocess call for blitting with tk).

Copy link
Member

@tacaswell tacaswell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyone can merge on green.

@jklymak jklymak merged commit 16a2970 into matplotlib:main Jan 24, 2023
@dstansby dstansby deleted the twoslope branch January 25, 2023 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: colorbar interacts poorly with TwoSlopeNorm when one slope is infinite
3 participants