| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@tacaswell I based this off of a master that I pulled down last night. Is that ok? |
Sorry, something went wrong.
|
Yes On Thu, Nov 27, 2014, 11:35 Paul Hobson notifications@github.com wrote:
|
Sorry, something went wrong.
|
You are right about my last comment, but i have still three points: os = OffsetNorm(-5, -2, -1)
x = np.linspace(-6, 6, 100)
abs(x-os.inverse(os(x))).max() #should be zero, but is twoThis is why my stackoverflow answer (which you probably read before :)) divides by abs(vmax - midpoint) abs(vmin - midpoint) instead of vmax-vcenter. Second point the class has no docstring. |
Sorry, something went wrong.
|
Yeah. Good points all around. What you you think about BiasedNorm? |
Sorry, something went wrong.
There was a problem hiding this comment.
I think there is a code path that will end up with self.vcenter to be None? I think you need to also override autoscale_None to make sure it gets set.
Sorry, something went wrong.
There was a problem hiding this comment.
@tacaswell yup. Got that written, Will default to half-way in the middle if not specified.
Thought about looking at the signs of vmax and vmin to see if 0 would be a good choice, but I think edge cases of -0.001 and 1000 make that more complicated than it means to be,
Sorry, something went wrong.
|
Needs documentation and tests that stress the code a bit more. |
Sorry, something went wrong.
|
Hey @Tillsten I really feel like your class you posted on SO is more robust. I don't feel right using it here without you on the commit log. Do you want to pull this branch down and overwrite what I have with your class? |
Sorry, something went wrong.
|
About the tests, happy to beef things about a bit. What do you think about the pattern I'm using with subclassing a base test case? I feel like the whole file could benefit from similar treatment (separate PR,of course). |
Sorry, something went wrong.
|
Here's that SO solution from @Tillsten |
Sorry, something went wrong.
|
@phobsen Just use it, i will hopefully get other commits anyway. If i ever find the free time ... :) |
Sorry, something went wrong.
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
There was a problem hiding this comment.
Should the default value be None ?
Sorry, something went wrong.
|
This looks pretty solid. Left a few picky comments. I am a bit confused by the decorators working on 2.6 and a bit concerned about the test classes as I don't recall seeing them anyplace else in the test suite. |
Sorry, something went wrong.
|
I did. It didn't change anything, though I was working on a janky dev installation of MPL, so I should probably give it another shot. Looking back a existing source code, LogNorm does have an inverse method, so there's something to learn there I'm sure. |
Sorry, something went wrong.
|
Just had an idea in terms of a name for the general case, GraduatedNorm, what do you think? |
Sorry, something went wrong.
|
It sounds like all this is actually about using a continuous piece-wise linear curve (first-degree spline) as the mapping function. Is that correct? GraduatedNorm doesn't give me any picture of what it is supposed to be. |
Sorry, something went wrong.
|
PiecewiseLinearNorm sounds good to me. |
Sorry, something went wrong.
|
I like that name. On Tue, Jun 30, 2015 at 11:17 PM, Till Stensitzki notifications@github.com
|
Sorry, something went wrong.
|
👍 |
Sorry, something went wrong.
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858`
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst DOC: add tutorial FIX: fix extend=both
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst DOC: add tutorial FIX: fix extend=both
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst DOC: add tutorial FIX: fix extend=both DOC: add new example
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst DOC: add tutorial FIX: fix extend=both DOC: add new example
Borrows heavily from @Tillsen's solution found on StackOverflow here: http://goo.gl/RPXMYB Used with his permission dicussesd on Github here: https://github.com/matplotlib/matplotlib/pull/3858` TST: add tests for DivergingNorm DOC: add to colors_api.rst DOC: add tutorial FIX: fix extend=both DOC: add new example
| Back | FazBrowse Home | New Git URL |
Trying to close #1806
Not currently on a good machine for development, but I think this pretty straight-forward, so hopefully Travis a test runner will suffice...
OffsetNorm: This let's you set vmin, vcenter, and vmax. The use case for this is when you have data ranging from e.g., -1, to +2, and you want the the white/gray part at 0, but would also like to use the full range of the red scale. So:
Next I'll add SymNorm, that will look at the absolute values of vmin and vmax to produce: