-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clarify dollar_ticks example and FormatStrFormatter docs. #27601
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
lib/matplotlib/ticker.py
Outdated
"${x}$"). | ||
|
||
It is typically unnecessary to explicitly construct `.StrMethodFormatter` | ||
objects, as `~.Axis.set_major_formatter` also directly accepts the format |
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.
objects, as `~.Axis.set_major_formatter` also directly accepts the format | |
objects, as `~.Axis.set_major_formatter` directly accepts the format |
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.
sure
lib/matplotlib/ticker.py
Outdated
Negative numeric values will use a dash, not a Unicode minus; use mathtext | ||
to get a Unicode minus by wrapping the format specifier with $ (e.g. | ||
"${x}$"). |
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.
Negative numeric values will use a dash, not a Unicode minus; use mathtext | |
to get a Unicode minus by wrapping the format specifier with $ (e.g. | |
"${x}$"). | |
Negative numeric values (e.g. -1) will use a dash, not a Unicode minus; use mathtext | |
to get a Unicode minus by wrapping the format specifier with $ (e.g. | |
"${x}$"). |
The negative numeric values alliteration threw me for the half sec & I think this is a minor enough add save the sleep deprived.
Also how does this interact w/ the Unicode minus RcParams?
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.
Edited.
FormatStrFormatter doesn't interact with the unicode_minus rcParam, although it probably could...
dollar_ticks only uses FormatStrFormatter implicitly.
Negative numeric values (e.g., -1) will use a dash, not a Unicode minus; | ||
use mathtext to get a Unicode minus by wrapping the format specifier with $ | ||
(e.g. "${x}$"). |
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.
why does this need to be here twice?
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.
Because it applies both to FormatStrFormatter and to StrMethodFormatter. (Actually this may change with #27602...)
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.
I hate github code folding sometimes. :/
Negative numeric values (e.g., -1) will use a dash, not a Unicode minus; | ||
use mathtext to get a Unicode minus by wrapping the format specifier with $ | ||
(e.g. "${x}$"). |
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.
I hate github code folding sometimes. :/
dollar_ticks only uses FormatStrFormatter implicitly.
Closes #25967.
PR summary
PR checklist