Skip to content

MEP12 text alignment example - #8228

Merged
anntzer merged 3 commits into
matplotlib:masterfrom
dstansby:alignment-example
Mar 8, 2017
Merged

anntzer merged 3 commits into
matplotlib:masterfrom
dstansby:alignment-example

Conversation

@dstansby

@dstansby dstansby commented Mar 7, 2017

Copy link
Copy Markdown
Member

Another documentation update!

@NelleV NelleV left a comment

Copy link
Copy Markdown
Member

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
transform=ax.transAxes)

ax.text(left, 0.5*(bottom + top), 'right center',
ax.text(left, 0.5 * (bottom + top), 'right center',

Copy link
Copy Markdown
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
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

@anntzer anntzer left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

anntzer commented Mar 8, 2017

Copy link
Copy Markdown
Contributor

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