Skip to content

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

Merged
merged 3 commits into from
Mar 8, 2017
Merged

Conversation

dstansby
Copy link
Member

@dstansby dstansby commented Mar 7, 2017

Another documentation update!

Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks @dstansby

@NelleV NelleV changed the title MEP12 text alignment example [MRG+1] MEP12 text alignment example Mar 7, 2017
@@ -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',
Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

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;'

Copy link
Contributor

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)."

Copy link
Contributor

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.

Copy link
Contributor

@anntzer anntzer left a 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.
Copy link
Contributor

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)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"for text layout"

@anntzer anntzer merged commit 355695a into matplotlib:master Mar 8, 2017
@anntzer
Copy link
Contributor

anntzer commented Mar 8, 2017

Thanks!

@anntzer anntzer changed the title [MRG+1] MEP12 text alignment example MEP12 text alignment example Mar 8, 2017
@dstansby dstansby deleted the alignment-example branch March 8, 2017 10:09
@QuLogic QuLogic added this to the 2.1 (next point release) milestone Apr 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants