Skip to content

Modified docstring of the set_ylabel and set_xlabel #13546

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 4 commits into from
Mar 1, 2019

Conversation

high-in-entropy
Copy link
Contributor

@high-in-entropy high-in-entropy commented Feb 28, 2019

PR Summary

Closes #13487
labelpad is a distance in points from the axes bounding box including ticks and tick labels. However presently documentation of matplotlib.axes.Axes.set_ylabel reads -
"labelpad : Spacing in points between the label and the y-axis."

PR Checklist

  • Has Pytest style unit tests
  • Code is Flake 8 compliant
  • New features are documented, with examples if plot related
  • Documentation is sphinx and numpydoc compliant
  • Added an entry to doc/users/next_whats_new/ if major new feature (follow instructions in README.rst there)
  • Documented in doc/api/api_changes.rst if API changed in a backward-incompatible way

Copy link
Member

@jklymak jklymak left a comment

Choose a reason for hiding this comment

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

Thanks - I think the new lines are too long however (must be < 79 characters to pass flake8)

Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

👍 thanks for submitting the change. We try and adhere to the PEP8 style guides, which means the lines can't be too long - I've left a message expanding this on the diff. Otherwise looks good!

@@ -206,7 +206,7 @@ def set_xlabel(self, xlabel, fontdict=None, labelpad=None, **kwargs):
The label text.

labelpad : scalar, optional, default: None
Spacing in points between the label and the x-axis.
Spacing in points from the axes bounding box including ticks and tick labels.
Copy link
Member

Choose a reason for hiding this comment

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

Could you make the lines <= 79 characters long by running the sentence on to the next line?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dstansby please check the latest commit (4). I have addressed the issue. Thank you!

@jklymak jklymak added this to the v3.1.0 milestone Feb 28, 2019
Copy link
Member

@dstansby dstansby left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@dstansby dstansby merged commit 111acc3 into matplotlib:master Mar 1, 2019
meeseeksmachine pushed a commit to meeseeksmachine/matplotlib that referenced this pull request Mar 1, 2019
dstansby added a commit that referenced this pull request Mar 1, 2019
…546-on-v3.1.x

Backport PR #13546 on branch v3.1.x ( Modified docstring of the set_ylabel and set_xlabel)
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.

labelpad is not the spacing between the axis and the label
3 participants