8000 DOC: update the pandas.DataFrame.plot.area docstring by DZPM · Pull Request #20170 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

DOC: update the pandas.DataFrame.plot.area docstring #20170

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 3 commits into from
Aug 10, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading 10000
Diff view
Diff view
Prev Previous commit
More improvements
  • Loading branch information
DZPM committed Aug 8, 2018
commit 3f02fe7f3da00d8258e70d1c249e126f4e4282aa
4 changes: 2 additions & 2 deletions pandas/plotting/_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -3348,7 +3348,7 @@ def area(self, x=None, y=None, **kwds):
Coordinates for the X axis. By default uses the index.
y : label or position, optional
Copy link
Member

Choose a reason for hiding this comment

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

As @dukebody says, for both x and y, in the first line we should have the type, more than a short description. It's a bit tricky, as label can be anything, but I think we're using something like object or int, optional. Then, we can sure clarify that it's the label or the position in the description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I kept it consistent with DataFrame.plot, which is the more complete docstring example I could find.

Column to plot. By default uses all columns.
stacked : boolean, default True
stacked : bool, default True
Area plots are stacked by default. Set to False to create a
unstacked plot.
**kwds : optional
Copy link
Member

Choose a reason for hiding this comment

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

Can you also document the stacked keyword? I know it is not in the signature, but it is a relevant one for this type of plot, so I would add it.
See http://pandas.pydata.org/pandas-docs/stable/visualization.html#area-plot

(the validation script will complain about it, but you can ignore that again)

Expand All @@ -3362,7 +3362,7 @@ def area(self, x=None, y=None, **kwds):

See Also
--------
pandas.DataFrame.plot : Draw plots.
DataFrame.plot : Make plots of DataFrame using matplotlib / pylab.

Examples
--------
Expand Down
0