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

Skip to content

Improve docstrings of Line2D #11922

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
Aug 25, 2018
Merged

Improve docstrings of Line2D #11922

merged 1 commit into from
Aug 25, 2018

Conversation

timhoffm
Copy link
Member

No description provided.

connected with step-like lines, i.e. horizontal lines with
vertical steps.
The postfix pre/mid/post determines the position of the vertical
step (directly after the left point / halfway between the
Copy link
Contributor

Choose a reason for hiding this comment

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

having "pre" correspond to "after the left point" sounds a bit confusing to me; I guess the more intuitive picture is "before the horizontal line" (and so on).

Copy link
Member Author

Choose a reason for hiding this comment

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

I was stumbling over that already. For some reason I'm thinking more in "is the y-value of the line determined by the point to the left or to the right" not in where is the step (probably because I'm usually more interested in the value of the line than in the position of the step). Of course, "which is the relevant point" and "where is the step" are inverse to each other concerning pre/post 🙁. I've now extended the text to include both views. I hope that adds too the clarity and is not too verbose.

@@ -507,18 +507,27 @@ def set_pickradius(self, d):

def get_fillstyle(self):
"""
return the marker fillstyle
Return the marker fillstyle.
Copy link
Contributor

Choose a reason for hiding this comment

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

Do you want to also wrap these one-liners back to, well, a single line too?

Copy link
Member Author

@timhoffm timhoffm Aug 25, 2018

Choose a reason for hiding this comment

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

I'm considering to add See also `.set_fillstyle`. lines to the getters. That would undo the one-lining again.

I'm not quite decided yet if that's a good idea. So I left the one-liners as they are for the moment. Any comment on linking to the setters? I wouldn't want to use a "See also" section as that would get too verbose.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems fine.

Copy link
Member Author

Choose a reason for hiding this comment

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

I will leave that for a separate PR. IMO keeping the PRs reasonably small and not mixing too many aspects/concepts makes them easier to review.

@timhoffm timhoffm force-pushed the doc-line2d branch 2 times, most recently from b4b4567 to 413a236 Compare August 25, 2018 14:50
connected with step-like lines, i.e. horizontal lines with
vertical steps.
The postfix pre/mid/post determines the position of the vertical
step (step at the beginning of the line segment, i.e. the line
Copy link
Contributor

Choose a reason for hiding this comment

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

the explanation starts becoming so long that it would perhaps read better as a nested list...

Copy link
Member Author

Choose a reason for hiding this comment

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

New try. 😄

@anntzer anntzer merged commit 76fe3ab into matplotlib:master Aug 25, 2018
@QuLogic QuLogic added this to the v3.1 milestone Aug 26, 2018
@timhoffm timhoffm deleted the doc-line2d branch August 26, 2018 05:54
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.

3 participants