You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There was previously discussion about this but I don't think it ever happened:
Yes, that is exactly what I have in mind. I have a branch started to do this, but it is not ready yet. I am thinking of a kwarg called "vmid" to go with "vmin" and "vmax", the idea being that if it is not None then it expands any specified or autoscaled range in the manner you describe.
Just wanted to note here that I have a SymmetricNorm class which auto-scales evenly around a centre point.
It sounds like it could do the trick (and potentially avoid mutually exclusive keywords) and I'd be happy to share.
Personally, I think a vcenter kwarg would be great -- especially if it could propagate to all the methods already using vmin and vmax. That sounds like a pretty big effort, however.
@tacaswell do you think that simply trying to add a vcenter kwarg to colors.Normalize is a good place to start?
The other question is what would this PR really being trying to accomplish? More specifically, is doing something like this notebook without having to create a totally new colormap the desired end result? http://nbviewer.ipython.org/gist/phobson/7916777
I think the simplest thing to add is @efiring suggestion to, if vcenter in passed in push out which ever of vmin and vmax is closer to make the range symmetric (to basically accomplish the upper-right graph from your notebook).
I've got an outdated branch on a machine and I could never get all of my edge cases to pass their tests. Basically all I'm trying to do.
Knowing what I know now about MPL's internals, I think a separate subclass would be best and could probably take a look at that tonight. The other option is to add the "vcenter" kwarg to the main Norm class. But that seems like a bad idea. Thoughts?
On one hand, a new class would be the least disruptive change, on the other hand, I think it would basically be the Normalize class with slightly different __init__.
On balance, I think a sub-class with arguments like SymNorm(center, half_width) is probably the best way to go because
Activity
phobson commentedon Dec 11, 2013
I implemented this another way for my own use:
https://gist.github.com/phobson/7916777
Personally, I think a
vcenterkwarg would be great -- especially if it could propagate to all the methods already usingvminandvmax. That sounds like a pretty big effort, however.tacaswell commentedon Jan 24, 2014
@endolith @phobson If either of you want to get a PR together, we can try to get this in 1.4, otherwise, I have tagged this for 1.5
phobson commentedon Jan 24, 2014
@tacaswell do you think that simply trying to add a
vcenterkwarg tocolors.Normalizeis a good place to start?The other question is what would this PR really being trying to accomplish? More specifically, is doing something like this notebook without having to create a totally new colormap the desired end result? http://nbviewer.ipython.org/gist/phobson/7916777
tacaswell commentedon Jan 24, 2014
I think the simplest thing to add is @efiring suggestion to, if
vcenterin passed in push out which ever ofvminandvmaxis closer to make the range symmetric (to basically accomplish the upper-right graph from your notebook).phobson commentedon Jan 25, 2014
@tacaswell taking a stab at this now.
tacaswell commentedon Nov 26, 2014
@phobson Did anything come of this?
phobson commentedon Nov 26, 2014
I've got an outdated branch on a machine and I could never get all of my edge cases to pass their tests. Basically all I'm trying to do.
Knowing what I know now about MPL's internals, I think a separate subclass would be best and could probably take a look at that tonight. The other option is to add the "vcenter" kwarg to the main Norm class. But that seems like a bad idea. Thoughts?
—
Sent from Mailbox
On Wed, Nov 26, 2014 at 2:25 PM, Thomas A Caswell
notifications@github.com wrote:
tacaswell commentedon Nov 26, 2014
On one hand, a new class would be the least disruptive change, on the other hand, I think it would basically be the
Normalizeclass with slightly different__init__.On balance, I think a sub-class with arguments like
SymNorm(center, half_width)is probably the best way to go becausephobson commentedon Nov 27, 2014
#3858
petehuang commentedon Jan 2, 2017
Tracing related PRs, it seems like the most current related work sits in #7294
QuLogic commentedon Jul 8, 2021
Implemented in #17709.