-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doc: beautify usetex demo example #11462
Conversation
This is better - any chance the \gamma and \omega could be separated vertically more? |
b73f96b
to
e7255c7
Compare
Sure. Updated. |
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.
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', |
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 and the following lines could use one more space.
""" | ||
|
||
import matplotlib | ||
matplotlib.rc('text', usetex=True) |
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.
Not your fault, but I would do the rc change after all the imports.
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.
Wait for merge for minor comments...
e7255c7
to
bb46650
Compare
Updated and passed the tests. |
This example doesn't pass PEP8 (see backport's build failure), but I don't know why master build is not seeing it. |
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? |
The PEP8 checks should be re-enabled on master by #11477. |
…n-v2.2.2-doc Backport PR #11462 on branch v2.2.2-doc
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 of
eqnarray
environements.old
new

PR Checklist