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

Skip to content

Format MaxNLocator with numpydoc #12999

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
merged 1 commit into from
Dec 17, 2018
Merged

Conversation

timhoffm
Copy link
Member

PR Summary

@timhoffm timhoffm added this to the v3.0.2-doc milestone Dec 16, 2018
*nbins*
Parameters
----------
nbins : int or 'auto', optional, default=10
Copy link
Contributor

Choose a reason for hiding this comment

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

default: 10

Maximum number of intervals; one less than max number of
ticks. If the string `'auto'`, the number of bins will be
automatically determined based on the length of the axis.

*steps*
steps: array-like of float, optional
Copy link
Contributor

@anntzer anntzer Dec 16, 2018

Choose a reason for hiding this comment

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

probably "sequence of float" as it has to be 1D and can't be a scalar either (or "list of float", dunno what's more common in the codebase).

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed to just array-like.

This is what we're recently using https://matplotlib.org/devdocs/devel/documenting_mpl.html#parameter-type-descriptions and is consistent with numpy and pandas.

Copy link
Contributor

Choose a reason for hiding this comment

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

Not really worth relitigating this here but I tend to think that "array-like" implies "any dimensionality" and that "list of ..." or "sequence of ..." is nicer than "1D array-like of ...".

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@anntzer anntzer left a comment

Choose a reason for hiding this comment

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

anyone can merge but preferably after fixing the minor nits above

@anntzer anntzer modified the milestones: v3.0.2-doc, v3.1 Dec 17, 2018
@anntzer anntzer merged commit f7bc936 into matplotlib:master Dec 17, 2018
@timhoffm timhoffm deleted the doc-maxnlocator branch December 17, 2018 14:08
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.

2 participants