-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add explanatory comments for text rotation example #13469
Conversation
@@ -3,7 +3,14 @@ | |||
Demo Text Rotation Mode | |||
======================= | |||
|
|||
The axes method text takes an argument rotation_mode that controls the |
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.
You can format the name of methods to directly link to the respective method, and format other code in monospace font, e.g.
The axes method text takes an argument rotation_mode that controls the | |
The axes' method `~.axes.Axes.text` takes an argument ``rotation_mode`` that controls the |
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.
Thanks! I'll make that change everywhere in the docstring.
fce978f
to
138145a
Compare
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? |
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 Line 233 in 2884058
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. |
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.
This line is too long. We have a limit of 80 characters per line enforced by flake.
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.
Fixed.
138145a
to
d5ea808
Compare
@ImportanceOfBeingErnest I moved the import statement to the references section and added the flake8 exception as you suggested. |
Thanks very much @mollyrossow for yet another helpul documentation improvement. |
…469-on-v3.0.2-doc Backport PR #13469 on branch v3.0.2-doc (Add explanatory comments for text rotation example)
…469-on-v3.0.x Backport PR #13469 on branch v3.0.x (Add explanatory comments for text rotation example)
Thanks @mollyrossow ! |
PR Summary
This pull request adds explanatory text to the text rotation gallery example in response to issue #11654.
PR Checklist