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

Doc: beautify usetex demo example#11462

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

ImportanceOfBeingErnest
Copy link
Member

@ImportanceOfBeingErnestImportanceOfBeingErnest commentedJun 20, 2018
edited
Loading

PR Summary

Beautify usetex demo. This demo was too crowded and contained unnecessary commands. This PR simplifies and beautifies it in the hope to lower the risk of eye cancer.

In total I'm not convinced this demo is entirely necessary, but the way I changed it now, it at least shows some interesting things like the combination of math mode and text mode in one text, or the use ofeqnarray environements.

old

image

new
image

PR Checklist

  • Has Pytest style unit tests
  • Code is PEP 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

@jklymak
Copy link
Member

This is better - any chance the \gamma and \omega could be separated vertically more?

@ImportanceOfBeingErnest
Copy link
MemberAuthor

Sure. Updated.

Copy link
Member

@timhoffmtimhoffm left a comment

Choose a reason for hiding this comment

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

A big improvement, both in text and in code. Found two minor code issues.

'k', linewidth=2)
plt.text(-0.06, height - 0.06, r'$\delta$', {'color': 'k', 'fontsize': 24})
plt.annotate("",
xy=(-delta / 2., 0.1), xycoords='data',
Copy link
Member

Choose a reason for hiding this comment

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

This and the following lines could use one more space.

ImportanceOfBeingErnest reacted with thumbs up emoji
"""

import matplotlib
matplotlib.rc('text', usetex=True)
Copy link
Member

Choose a reason for hiding this comment

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

Not your fault, but I would do the rc change after all the imports.

ImportanceOfBeingErnest reacted with thumbs up emoji
Copy link
Member

@jklymakjklymak left a comment

Choose a reason for hiding this comment

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

Wait for merge for minor comments...

@jklymakjklymak added this to thev2.2-doc milestoneJun 20, 2018
@ImportanceOfBeingErnest
Copy link
MemberAuthor

Updated and passed the tests.

@timhoffmtimhoffm merged commitc1f0072 intomatplotlib:masterJun 20, 2018
@ImportanceOfBeingErnestImportanceOfBeingErnest deleted the doc_beautify-usetex-example branchJune 20, 2018 22:43
@QuLogic
Copy link
Member

This example doesn't pass PEP8 (see backport'sbuild failure), but I don't know why master build is not seeing it.

@ImportanceOfBeingErnest
Copy link
MemberAuthor

This is annoying. It happened already previously. It's either only not checking it for my PRs or it's not checking it for some parts. What would you suggest that I do about it, given that this is already merged into master?

@QuLogic
Copy link
Member

The PEP8 checks should be re-enabled on master by#11477.

jklymak added a commit that referenced this pull requestJul 3, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@jklymakjklymakjklymak approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v2.2-doc
Development

Successfully merging this pull request may close these issues.

4 participants
@ImportanceOfBeingErnest@jklymak@QuLogic@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp