Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Call _transform_vmin_vmax during SymLogNorm.__init__ #6780
Conversation
mdboom
added the
needs_review
label
Jul 17, 2016
tacaswell
added this to the
2.0.1 (next bug fix release)
milestone
Jul 17, 2016
|
Can you also add a test? It does not need to be an image test, just the minimal code that would have raised before. |
|
Not sure where to add that, but I'll look into it. The minimal test should be something like: Edit: I think I've found the spot. |
tacaswell
commented on an outdated diff
Jul 25, 2016
| @@ -222,6 +223,13 @@ def test_SymLogNorm(): | ||
| norm = mcolors.SymLogNorm(3, vmin=-30, vmax=5, linscale=1.2) | ||
| normed_vals = norm(vals) | ||
| assert_array_almost_equal(normed_vals, expected) | ||
| + | ||
| + # Ensure that a SymLogNorm object can be used in a colorbar |
tacaswell
Owner
|
|
There is some trailing white space:
This may seem petty and annoying, but keeping a consistent style (including no trailing white space) really does help on big projects with many contributors. |
|
Whoops. The perils of not using a proper development environment. |
|
|
NelleV
changed the title from
Call _transform_vmin_vmax during SymLogNorm.__init__ to [MRG+1] Call _transform_vmin_vmax during SymLogNorm.__init__
Dec 19, 2016
efiring
approved these changes
Dec 19, 2016
Apart from the minor suggestion to delete a line from the test, this looks good--it makes sense.
| + norm = mcolors.SymLogNorm(0.1, vmin=-1, vmax=1, linscale=1) | ||
| + fig = plt.figure() | ||
| + cbar = mcolorbar.ColorbarBase(fig.add_subplot(111), norm=norm) | ||
| + plt.close(fig) |
efiring
Dec 19, 2016
Owner
I think this close is unnecessary; the @cleanup decorator handles it, doesn't it?
NelleV
changed the title from
[MRG+1] Call _transform_vmin_vmax during SymLogNorm.__init__ to [MRG+2] Call _transform_vmin_vmax during SymLogNorm.__init__
Dec 19, 2016
tacaswell
merged commit 58a8334
into matplotlib:master
Dec 20, 2016
tacaswell
modified the milestone: 2.1 (next point release), 2.0.1 (next bug fix release)
Dec 20, 2016
|
Changed my mind about targeting 2.x . If someone disagrees, I will not protest to it being backported. |
|
It's not critical, but I am mildly in favor of the backport. The change has no effect in most uses, but blocks a potential failure mode. |
|
@efiring Are you going to backport? |
|
Sure, I can do that in a few minutes. |
efiring
added a commit
that referenced
this pull request
Dec 26, 2016
|
|
tacaswell + efiring |
0ab4599
|
|
Backported to v2.x as 0ab4599 |
Salganos commentedJul 17, 2016
A fix for #6750