-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Small improvements to legend's docstring. #6618
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
Conversation
The source looks a bit weirder, but the output of `pydoc pylab.legend` (or `plt.legend?` in IPython) is much nicer. I don't think numpydoc allows splitting the argument type information into two lines.
@@ -372,8 +372,8 @@ def legend(self, *args, **kwargs): | |||
The font properties of the legend. If None (default), the current | |||
:data:`matplotlib.rcParams` will be used. | |||
|
|||
fontsize : int or float or {'xx-small', 'x-small', 'small', 'medium',\ |
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 was before your patch, but why is there a backslash at the end of that line?
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.
That removes the newline from the string, and is necessary so that Sphinx interprets it correctly.
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.
Makes sense. Thanks for the explanation!
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.
Thanks for the patch!
I am going to ignore the coverage failure, considering this are only docstrings changes. |
backported to v2.x as f3ddb4e |
Small improvements to legend's docstring.
The source looks a bit weirder, but the output of
pydoc pylab.legend
(or
plt.legend?
in IPython) is much nicer. I don't think numpydocallows splitting the argument type information into two lines.