Skip to content
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 links and expand mathmpl docstring #25221

Merged
merged 6 commits into from Mar 30, 2023
Merged

Conversation

melissawm
Copy link
Contributor

PR Summary

This PR clarifies the purpose and recommended uses for mathmpl and adds links to the relevant information in the tutorial and "Writing documentation" pages.

PR Checklist

Documentation and Tests

  • [N/A] Has pytest style unit tests (and pytest passes)
  • Documentation is sphinx and numpydoc compliant (the docs should build without error).
  • [N/A] New plotting related features are documented with examples.

Release Notes

  • [N/A] New features are marked with a .. versionadded:: directive in the docstring and documented in doc/users/next_whats_new/
  • [N/A] API changes are marked with a .. versionchanged:: directive in the docstring and documented in doc/api/next_api_changes/
  • [N/A] Release notes conform with instructions in next_whats_new/README.rst or next_api_changes/README.rst

Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

GitHub needs a more active status than 'leave a comment' which is kinda passive aggressive...or a fine tuned what is the blocking request.

Most of these are flow suggestions and the rest are changes to language that was already there but I figure should be changed to achieve the aims of this PR but I can open the PR if out of scope.

doc/devel/documenting_mpl.rst Outdated Show resolved Hide resolved
doc/devel/documenting_mpl.rst Outdated Show resolved Hide resolved
doc/devel/documenting_mpl.rst Show resolved Hide resolved
lib/matplotlib/sphinxext/mathmpl.py Outdated Show resolved Hide resolved
tutorials/text/mathtext.py Outdated Show resolved Hide resolved
Copy link
Member

@story645 story645 left a comment

Choose a reason for hiding this comment

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

I don't even know if I'm being nitpicky here. Can take or leave my comments, just let me know so I can merge either way.

lib/matplotlib/sphinxext/mathmpl.py Outdated Show resolved Hide resolved
doc/devel/documenting_mpl.rst Outdated Show resolved Hide resolved
@melissawm
Copy link
Contributor Author

Thanks for the comments - they do help! Don't forget also I'm not a native speaker so rewording suggestions are always welcome 😄

galleries/tutorials/text/mathtext.py Outdated Show resolved Hide resolved
lib/matplotlib/sphinxext/mathmpl.py Outdated Show resolved Hide resolved

In most cases, you will likely want to use one of `Sphinx's builtin Math
extensions <https://www.sphinx-doc.org/en/master/usage/extensions/math.html>`__.
In rare cases we want the rendering of the mathematical text in the documentation html to exactly match with the rendering of the mathematical expression in the Matplotlib figure. In these cases, you can use the
Copy link
Member

Choose a reason for hiding this comment

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

Should wrap.

@melissawm
Copy link
Contributor Author

Thanks @QuLogic - I think I got everything and also rebased just in case.

@QuLogic
Copy link
Member

QuLogic commented Mar 20, 2023

Not sure why the errors didn't post:

/home/circleci/project/doc/devel/documenting_mpl.rst:352: ERROR: Unexpected indentation.
/home/circleci/project/doc/devel/documenting_mpl.rst:353: WARNING: Block quote ends without a blank line; unexpected unindent.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
/home/circleci/project/lib/matplotlib/sphinxext/mathmpl.py:docstring of matplotlib.sphinxext.mathmpl:4: WARNING: unknown document: '../tutorials/text/mathtext'
/home/circleci/project/doc/devel/documenting_mpl.rst:353: WARNING: unknown document: '../tutorials/text/mathtext'

@melissawm
Copy link
Contributor Author

I think that did it!

@QuLogic QuLogic merged commit c8aaa90 into matplotlib:main Mar 30, 2023
37 checks passed
@QuLogic QuLogic added this to the v3.8.0 milestone Mar 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants