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 \dddot and \ddddot as accents in mathtext#20605

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

Merged

Conversation

danzimmerman
Copy link
Contributor

@danzimmermandanzimmerman commentedJul 8, 2021
edited
Loading

PR Summary

This is an experiment to address and discuss#20595

Note thatdddot andddddot were already defined as 8411 and 8412 intex2uni in_mathtext_data.py, I added them again ascombiningthreedotsabove andcombiningfourdotsabove.

This PR also added a--keep-going flag inmake.bat so I could build the documentation on Windows. I should probably raise that in a separate issue/PR.

Before, Mathtext Mode
dddot_before

After, Mathtext Mode
dddot_after

LaTeX vs. Mathtext Tests

With the right packages included, this works fine withusetex=True:

import matplotlib.pyplot as pltimport matplotlib as mplplt.rc('text.latex', preamble=r'\usepackage{amsmath}\usepackage{amssymb}')fig = plt.figure(figsize=(15, 9), dpi=200)ax = fig.subplots(1, 1)fs = 80pstra = r'$\dot{x}\hspace{1.5}\ddot{x}\hspace{1.5}\dddot{x}\hspace{1.5}\ddddot{x}$'pstratex = r'$\dot{x}\hspace{1.5em}\ddot{x}\hspace{1.5em}\dddot{x}\hspace{1.5em}\ddddot{x}$'ax.annotate(pstra, xy=(0.1, 0.1), fontsize=fs)ax.annotate(pstratex, xy=(0.1, 0.5), fontsize=fs, usetex=True)ax.plot([0, 1], [0.591]*2, linewidth=0.5)ax.plot([0, 1], [0.221]*2, linewidth=0.5)ax.set_ylim([-0.1, 1])ax.set_xlim([0, 1])fig.tight_layout()

usetex=True on the top, Mathtext mode on the bottom:

image

PR Checklist

  • Has pytest style unit tests (andpytest passes).
  • [N/A] IsFlake 8 compliant (many warnings on originals)
  • New features are documented, with examples if plot related.
  • Documentation is sphinx and numpydoc compliant (the docs shouldbuild without error).
  • [N/A] Conforms to Matplotlib style conventions (installflake8-docstrings and runflake8 --docstring-convention=all).
  • New features have an entry indoc/users/next_whats_new/ (follow instructions in README.rst there).
  • API changes documented indoc/api/next_api_changes/ (follow instructions in README.rst there).

Copy link

@github-actionsgithub-actionsbot left a comment

Choose a reason for hiding this comment

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

Thank you for opening your first PR into Matplotlib!

If you have not heard from us in a while, please feel free to ping@matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.

You can also join uson gitter for real-time discussion.

For details on testing, writing docs, and our review process, please seethe developer guide

We strive to be a welcoming and open project. Please follow ourCode of Conduct.

@danzimmermandanzimmerman marked this pull request as ready for reviewJuly 9, 2021 01:53
@anntzer
Copy link
Contributor

Can you squash the commits (possibly splitting out the --keep-going patch)? Otherwise looks good to me, can be merged after CI completesand squashing (or not) is decided.

Copy link
Contributor

@anntzeranntzer left a comment

Choose a reason for hiding this comment

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

(see above)

@jklymak
Copy link
Member

@danzimmerman if you are not comfortable squashing (though I imagine you are given the technical needs of this change), let us know and we can just squash merge on our end.

@danzimmerman
Copy link
ContributorAuthor

@danzimmerman if you are not comfortable squashing (though I imagine you are given the technical needs of this change), let us know and we can just squash merge on our end.

@jklymak I'm not so familiar with squashing commits, and it looks like I complicated things by updating my branch frommaster while I was working (in my history now there are many interleaved commits).

I reverted the--keep-going inmake.bat. If it's easy to squash merge it, please go ahead!

@timhoffmtimhoffm added this to thev3.5.0 milestoneJul 10, 2021
@timhoffmtimhoffm merged commit0dd603f intomatplotlib:masterJul 10, 2021
@timhoffm
Copy link
Member

I've squash-merged.

Thanks@danzimmerman and congratulations on your first contribution to Matplotlib! Hope to see you again.

danzimmerman reacted with hooray emoji

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

@github-actionsgithub-actions[bot]github-actions[bot] left review comments

@anntzeranntzeranntzer approved these changes

@timhoffmtimhoffmtimhoffm approved these changes

Assignees
No one assigned
Projects
None yet
Milestone
v3.5.0
Development

Successfully merging this pull request may close these issues.

4 participants
@danzimmerman@anntzer@jklymak@timhoffm

[8]ページ先頭

©2009-2025 Movatter.jp