Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add explanatory comments for text rotation example#13469

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

mollyrossow
Copy link
Contributor

PR Summary

This pull request adds explanatory text to the text rotation gallery example in response to issue#11654.

PR Checklist

  • Has Pytest style unit tests
  • Code isFlake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

@@ -3,7 +3,14 @@
Demo Text Rotation Mode
=======================

The axes method text takes an argument rotation_mode that controls the
Copy link
Member

@ImportanceOfBeingErnestImportanceOfBeingErnestFeb 19, 2019
edited
Loading

Choose a reason for hiding this comment

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

You can format the name of methods to directly link to the respective method, and format other code in monospace font, e.g.

Suggested change
Theaxesmethodtexttakesanargumentrotation_modethatcontrolsthe
Theaxes'method`~.axes.Axes.text`takesanargument``rotation_mode``thatcontrolsthe

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks! I'll make that change everywhere in the docstring.

@mollyrossow
Copy link
ContributorAuthor

Question: I imported matplotlib at the top of the file just so I could make a link in the references section. Is that the correct way to do things?

@ImportanceOfBeingErnest
Copy link
Member

Well, it's not wrong at least. I think I would prefer to keep it down in the references and instead add the respective flake exception, that is create a similar line to

examples/text_labels_and_annotations/custom_legends.py: E402

for this example.

controls the alignment and rotation of the text. If ``rotation_mode`` is
``None`` or ``default`` the text will first be rotated and then aligned
according to the horizontal and vertical alignments (``ha`` and ``va`` in the
example). If ``rotation_mode`` is ``anchor`` the text is aligned before rotation.

Choose a reason for hiding this comment

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

This line is too long. We have a limit of 80 characters per line enforced by flake.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed.

@mollyrossowmollyrossowforce-pushed theexplain_text_rotation_example branch from138145a tod5ea808CompareFebruary 19, 2019 22:06
@mollyrossow
Copy link
ContributorAuthor

@ImportanceOfBeingErnest I moved the import statement to the references section and added the flake8 exception as you suggested.

@ImportanceOfBeingErnest
Copy link
Member

Thanks very much@mollyrossow for yet another helpul documentation improvement.

tacaswell added a commit that referenced this pull requestFeb 20, 2019
…469-on-v3.0.2-docBackport PR#13469 on branch v3.0.2-doc (Add explanatory comments for text rotation example)
tacaswell added a commit that referenced this pull requestFeb 20, 2019
…469-on-v3.0.xBackport PR#13469 on branch v3.0.x (Add explanatory comments for text rotation example)
@tacaswell
Copy link
Member

Thanks@mollyrossow !

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@ImportanceOfBeingErnestImportanceOfBeingErnestImportanceOfBeingErnest approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.0-doc
Development

Successfully merging this pull request may close these issues.

3 participants
@mollyrossow@ImportanceOfBeingErnest@tacaswell

[8]ページ先頭

©2009-2025 Movatter.jp