Skip to content

DOC/PLT: Add stacked in doc and doc example for barh and bar plot #33337

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 24 commits into from
May 6, 2020

Conversation

charlesdong1991
Copy link
Member

@charlesdong1991 charlesdong1991 commented Apr 6, 2020

@pep8speaks
Copy link

pep8speaks commented Apr 6, 2020

Hello @charlesdong1991! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻

Comment last updated at 2020-05-05 14:36:22 UTC

Copy link
Member

@ShaharNaveh ShaharNaveh left a comment

Choose a reason for hiding this comment

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

Nitpicks

@@ -954,6 +954,9 @@ def line(self, x=None, y=None, **kwargs):

@Appender(
"""
stacked: bool, default is False
Copy link
Member

@ShaharNaveh ShaharNaveh Apr 6, 2020

Choose a reason for hiding this comment

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

Suggested change
stacked: bool, default is False
stacked : bool, default False

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks!

@@ -1037,6 +1047,9 @@ def bar(self, x=None, y=None, **kwargs):

@Appender(
"""
stacked: bool, default is False
Copy link
Member

@ShaharNaveh ShaharNaveh Apr 6, 2020

Choose a reason for hiding this comment

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

Suggested change
stacked: bool, default is False
stacked : bool, default False

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks!

@@ -985,6 +988,13 @@ def line(self, x=None, y=None, **kwargs):
... 'lifespan': lifespan}, index=index)
>>> ax = df.plot.bar(rot=0)

Plot stacked bar chars for the DataFrame
Copy link
Member

Choose a reason for hiding this comment

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

Should this be ‘bar charts’?

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops! 😅 Nice catch!

@@ -1066,6 +1079,13 @@ def bar(self, x=None, y=None, **kwargs):
... 'lifespan': lifespan}, index=index)
>>> ax = df.plot.barh()

Plot stacked bar chars for the DataFrame
Copy link
Member

Choose a reason for hiding this comment

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

Same here?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks!

@charlesdong1991 charlesdong1991 requested a review from WillAyd April 17, 2020 07:26
@charlesdong1991
Copy link
Member Author

would appreciate a lot for some reviews, thanks! ^^ @jreback @WillAyd

@WillAyd
Copy link
Member

WillAyd commented Apr 29, 2020

Can you post a screenshot of the built docs? Doesn't this place the argument out of order (i.e. after the Returns section)?

@datapythonista

@charlesdong1991
Copy link
Member Author

charlesdong1991 commented May 1, 2020

Hi, @WillAyd thanks for your review!

You are right, it is not the right place for parameters. And I removed it because i noticed another PR #33596 has included stacked also. So might be better to let that PR deal with parameter doc.

So the remaining question is the code example, I think it would be nice for users to see the example. But if you think it is not needed because its quite straightforward, then let's close this PR. I am open to hearing from your preference!

@charlesdong1991
Copy link
Member Author

ping @WillAyd

pls let me know if it is still worth it to have this one in doc? ^^

Copy link
Member

@WillAyd WillAyd left a comment

Choose a reason for hiding this comment

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

@datapythonista datapythonista merged commit 6e680ff into pandas-dev:master May 6, 2020
@datapythonista
Copy link
Member

Thanks @charlesdong1991

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

keyword stacked for bar plots not documented anywhere.
6 participants