-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Adds an rcParam "axes.formatter.use_locale" #410
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
Conversation
…the current locale to format tick labels. For example, in the fr_FR locale, the ',' will be used as a decimal separator.
|
NOTE: Don't merge. Original poster reported on mailing list that this breaks 3D plots. I can't reproduce, but am trying to get to the bottom of it. |
|
TESTING NOTE: This is difficult feature to test. One could imagine setting the locale to "fr_FR" for example, and then looking for commas, but that will only work if the French locale is installed on the machine running the test. Ubuntu, for example, only installs locales for languages selected in the installer. MS Windows (I believe) has similar issues. |
…ect value for preferred encoding. Printing localized dates is not possible without this.
|
I wouldn't be surprised if it did break mplot3d code as it does the tick labels is a poor way. If I could have some sort of script that reproduce it for someone who does not use other locales, I could take a look. |
lib/matplotlib/cbook.py
Outdated
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.
Did you intend to have this print statement here?
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.
Oops. Thanks.
|
Come to think of it, it might be highly dependent upon exactly what patches the user and/or you have for testing. I did make some changes to mplot3d/axes3d.py recently that dealt with the formatting of the coordinates in the lower-right corner of the figure window. The changes should have gotten rid of some wonky behavior and made it behave much more like the rest of matplotlib. |
|
I'm starting to be convinced that this has no effect on the 3D code as the original poster suggested. I think this is probably safe to merge, but will leave it open for comments. |
|
Agreed. If it does have an impact, then it is more likely that we would be |
Adds an rcParam "axes.formatter.use_locale", that when true will use the current locale to format tick labels. For example, in the fr_FR locale, the ',' will be used as a decimal separator.