Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFIX: add base kwarg to symlognor #16404
Conversation
8c1fee8
to
fdb00b0
| @@ -1213,7 +1213,7 @@ class SymLogNorm(Normalize): | |||
| *linthresh* allows the user to specify the size of this range | |||
| (-*linthresh*, *linthresh*). | |||
| """ | |||
| def __init__(self, linthresh, linscale=1.0, | |||
| def __init__(self, linthresh, linscale=1.0, base=None, | |||
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
jklymak
Feb 11, 2020
Author
Contributor
Not really, but in this case, we can't really make any of then kwarg only because of back-compatibility concerns.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
timhoffm
Feb 15, 2020
Member
As proposed in #16181, I‘d make almost all arguments kw-only. This will in particular also hold for added parameters.
This comment has been minimized.
This comment has been minimized.
jklymak
Feb 15, 2020
Author
Contributor
Sure, are you guys asking that just the new param is kwarg only, or all of them?
This comment has been minimized.
This comment has been minimized.
timhoffm
Feb 16, 2020
Member
For now, only the new parameter base can be kw-only. Making other parameters kw-only needs a deprecation first.
fdb00b0
to
e16a257
f6f3963
to
fe5fdf8
meeseeksdev
bot
commented
Feb 16, 2020
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon! If these instruction are inaccurate, feel free to suggest an improvement. |
FIX: add base kwarg to symlognor
Conflicts:
doc/api/next_api_changes/behaviour.rst
- moved to
doc/api/prev_api_changes/api_changes_3.2.0/behavior.rst and re-worded.
lib/matplotlib/colors.py
- implicitly backported converting the docstring to numpy
doc style. Re-worded new docstring
|
The deprecation here is all confusing. It's marked as since 3.3, but 3.3 is when the deprecation is supposed to go away. The deprecation message also never had any version numbers to indicate when things changed or will change. I don't know if changing this after one minor release is best without this information. |


jklymak commentedFeb 4, 2020
PR Summary
SymLogNormhas a linear range that the docs stated was the same size as a decade in the logarithmic range. Except the logarithm being used in the code was base=np.e, not base=10, so it was not really a decade.This PR prepares to change the default to 10 by adding a
basekwarg, and warning if it is not specified. If a user wants to suppress the warning they should specifybase.In 3.3. we may change the algorithm again slightly #16391, but will almost certainly default to
base=10rather thannp.e.This was discussed on the Feb 3 Dev call.
PR Checklist