Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Doc: document textpath module #12676

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

Merged

Conversation

ImportanceOfBeingErnest
Copy link
Member

@ImportanceOfBeingErnest ImportanceOfBeingErnest commented Oct 30, 2018

PR Summary

The matplotlib.textpath module had not been available in the documentation. This PR adds it to the list of modules and improves its docstrings.

PR Checklist

  • Code is Flake 8 compliant
  • Features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant

@timhoffm
Copy link
Member

flake8 says

./lib/matplotlib/textpath.py:120:1: W293 blank line contains whitespace
1     W293 blank line contains whitespace

The text to be converted.

usetex : bool
If True, use matplotlib usetex mode.
Copy link
Member

Choose a reason for hiding this comment

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

Do we have a link or a description what "matplotlib usetex mode" is?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good question. I now replaced it with

Whether to use tex rendering. Defaults to False.

same as further down in TextPath.

*ismath*
If True, use mathtext parser. Effective only if usetex == False.
ismath : bool
If True, use mathtext parser. Effective only if usetex == False.
Copy link
Member

Choose a reason for hiding this comment

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

if *usetex* is False. or if ``usetex == False``.

----------

xy : tuple or array of two float values
Position of the text. For no offset, use ``xy=(0,0)``.
Copy link
Member

Choose a reason for hiding this comment

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

xy=(0, 0) (space before comma)


*usetex*
If True, use matplotlib usetex mode.
s : string
Copy link
Member

Choose a reason for hiding this comment

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

numpydoc uses str as type

xy : tuple or array of two float values
Position of the text. For no offset, use ``xy=(0,0)``.

s : string
Copy link
Member

Choose a reason for hiding this comment

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

str

Copy link
Member

@NelleV NelleV left a comment

Choose a reason for hiding this comment

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

Thanks!


Returns
-------

Copy link
Member

Choose a reason for hiding this comment

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

FYI, you don't need blank lines after the headers.

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.

4 participants