-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
ENH: EngFormatter new kwarg 'sep' #6542
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
Merged
tacaswell
merged 25 commits into
matplotlib:master
from
afvincent:enh_engformatter_space_sep_new_option
Aug 26, 2017
Merged
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
5a550f2
ENH: Add the space_sep option to EngFormatter, and docstring updates
afvincent 722f5d6
FIX: force format_eng(-0.0) to be consistent with format_eng(0)
afvincent 3c221ff
Fix docstrings and comments (remove leading spaces)
afvincent 122cfa2
Simplify and move cleaning strip op. from 'format_eng' to '__call__'
afvincent 07f022d
DOC: update the api example engineering_formatter.py
afvincent e371e5a
More extensive testing of EngFormatter (including 'space_sep' param)
afvincent 3049a2d
space_sep=bool <- sep=string, and adapt tests
afvincent e0a2ec8
remove unnecessary trailing 'u' characters in strings
afvincent 1621a2d
fix EngFormatter docstring: escape Unicode character codes
afvincent c82dcff
'fix' docstring: unindent and reorder bullet list + mention regular t…
afvincent f09a1b4
Update the example
afvincent dc9409b
fix test docstring PEP8 errors in test_ticker.py
afvincent 0195beb
Add a 'whats_new' entry
afvincent 3ec1dbd
docstring overhaul: fix bullet list and merge duplicated infos betwee…
afvincent cd2ac88
use named entities instead of raw unicode codes
afvincent 7f1422c
stop mixing C-style and format-based formatting
afvincent aba7a7f
Small example tweaking to avoid label cluttering
afvincent b75f20d
fix an issue with {:g} and str format
afvincent 41a69da
get rid of decimal.Decimal + fix rounding special cases like 999.9...
afvincent 556ec20
Fix the related rounding discrepancies in test_ticker
afvincent a9af431
(try) fix(ing) an exception about raising an int to a negative power
afvincent 0bde03a
fix some anntzer's comments
afvincent c98ba91
more complete handling of corner-case roundings + add proper tests
afvincent 60b95ab
Fix some additional remarks made by anntzer
afvincent ac42b94
Deprecate passing a string as *num* argument
afvincent File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev
Previous commit
Deprecate passing a string as *num* argument
- Loading branch information
commit ac42b94e990e878a2b831cf3e4382cf6cb40a1b5
There are no files selected for viewing
5 changes: 5 additions & 0 deletions
5
doc/api/api_changes/2017-08-24-deprecation-in-engformatter.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Deprecation in EngFormatter | ||
``````````````````````````` | ||
|
||
Passing a string as *num* argument when calling an instance of | ||
`matplotlib.ticker.EngFormatter` is deprecated and will be removed in 2.3. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we actually have a use case for supporting this? Could this behavior be deprecated? (this is not strictly needed for the PR)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
String were accepted before so I let it here. But other formatter classes do not seems to support such a feature, so if one thinks it is not worth supporting it anymore, it could be deprecated indeed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note to myself: add a deprecation warning for 2.1 (=> removing in 2.3?). (Have a look at #8040 to remember how to do it...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated in f207c89