8000 Tick formatter does not support grouping with locale by z0rgy · Pull Request #8987 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Tick formatter does not support grouping with locale #8987

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
merged 3 commits into from
Sep 24, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Support grouping in Tick formatter based on locale.
When formatting and setting useLocale to True, the numbers greater than
1000 are not grouped as specified by the locale. 1000 should be 1,000 in
certain locales. By setting the last argument to locale.format_string
the locale dependent grouping is honored.
  • Loading branch information
z0rgy authored and QuLogic committed Sep 23, 2020
commit 2dc630710747736791986f0a9e91b534a399829b
2 changes: 1 addition & 1 deletion lib/matplotlib/ticker.py
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ def _format_maybe_minus_and_locale(self, fmt, arg):
"""
Format *arg* with *fmt*, applying unicode minus and locale if desired.
"""
return self.fix_minus(locale.format_string(fmt, (arg,))
return self.fix_minus(locale.format_string(fmt, (arg,), True)
if self._useLocale else fmt % arg)

def get_useMathText(self):
Expand Down
0