-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
MEP12 text alignment example #8228
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
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.
LGTM!
Thanks @dstansby
@@ -47,24 +49,24 @@ | |||
verticalalignment='top', | |||
transform=ax.transAxes) | |||
|
|||
ax.text(left, 0.5*(bottom + top), 'right center', | |||
ax.text(left, 0.5 * (bottom + top), 'right center', |
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'm -1 on this and the following changes. Note that PEP8 AFAIK does not recommend to add whitespace before and after this operator.
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.
Actually it does, see https://www.python.org/dev/peps/pep-0008/#other-recommendations.
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.
It says 'Use your own judgment;'
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.
"If operators with different priorities are used, consider adding whitespace around the operators with the lowest priority(ies)."
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.
In the above line the operator with the lowest priority is the plus operator around which whitespace is added. PEP8 does not say anything about adding whitespace to all operators independent of their priorities.
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.
feel free to dismiss the review if "to" is more colloquial
You can precisely layout text in data or axes (0,1) coordinates. This | ||
example shows you some of the alignment and rotation specifications to | ||
layout text | ||
layout text. |
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.
"for layout text"? (nonnative speaker 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.
"for text layout"
Thanks! |
Another documentation update!