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

ENH: Add a TwoSlopeNorm to the norm_handler #4761

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

matthewturk
Copy link
Member

I think that the code works, but I need suggestions on how to more easily expose this behavior. I'd also like to see how we could potentially describe setting the min/max to be mirrors; for instance, right now the ramp on either side of vcenter changes, but it would be nice to set it to the maximum extent. (i.e., vmax = -vmin or something).

@matthewturk
Copy link
Member Author

I'd also like suggestions on how to expose this in the field plugins

@neutrinoceros
Copy link
Member

I need suggestions on how to more easily expose this behavior

I'll quote myself from the Slack conversation

How about having set_norm accept a str as its norm argument (currently this must be a Normalize object), and arbitrary keyword arguments **kwargs passed down to the actual Normalize subclass underneath ?
We could add support for a couple Normalize subclasses that are already in matplotlib (like "twoslopes" -> TwoSlopeNorm and "asinh" -> AsinhNorm ). It would also be trivial to add more in the future, and the NormHandler class wouldn't need to be changed at all (I think).

@chrishavlin
Copy link
Contributor

+1 for expanding set_norm functionality! I think that's a nice compromise that leaves a clear way forward for future development.

@matthewturk
Copy link
Member Author

I can get behind the string key!

Shall we put this in (once y'all are OK with it) and I'll work on the string key in a new PR?

@matthewturk
Copy link
Member Author

So I guess the consensus is, no, this needs to all happen at once? :)

@neutrinoceros
Copy link
Member

I think so ?

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.

3 participants