Skip to content

Fix Boxplot docs to conform to numpydoc (rebase #6240) #7275

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
Oct 16, 2016
Merged
Changes from all commits
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
Diff view
Diff view
36 changes: 20 additions & 16 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3237,22 +3237,26 @@ def boxplot(self, x, notch=None, sym=None, vert=None, whis=None,

Other Parameters
----------------
The following boolean options toggle the drawing of individual
components of the boxplots:
- showcaps: the caps on the ends of whiskers
(default is True)
- showbox: the central box (default is True)
- showfliers: the outliers beyond the caps (default is True)
- showmeans: the arithmetic means (default is False)

The remaining options can accept dictionaries that specify the
style of the individual artists:
- capprops
- boxprops
- whiskerprops
- flierprops
- medianprops
- meanprops
showcaps : bool, optional (True)
Show the caps on the ends of whiskers.
showbox : bool, optional (True)
Show the central box.
showfliers : bool, optional (True)
Show the outliers beyond the caps.
showmeans : bool, optional (False)
Show the arithmetic means.
Copy link
Member

@phobson phobson Oct 15, 2016

Choose a reason for hiding this comment

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

To be consistent with the *prop kwargs, I think it might be worth changing these to "Show_s_ the ...".

Minor nitpick. Not a show stopper.

Copy link
Member Author

Choose a reason for hiding this comment

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

They're actually subtly different; on show*, the "Show the ..." is an imperative command to the boxplot function, whereas on *prop, the "Specifies ..." is a description of the parameter itself.

Of course, I'm just speculating because @jenshnielsen wrote it originally.

Copy link
Member

@phobson phobson Oct 16, 2016

Choose a reason for hiding this comment

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

Makes sense. I was just thinking:

The medianprops parameter specifies the style of the median

So therefore

The showmedian parameter shows the median...

capprops : dict, optional (None)
Specifies the style of the caps.
boxprops : dict, optional (None)
Specifies the style of the box.
whiskerprops : dict, optional (None)
Specifies the style of the whiskers.
flierprops : dict, optional (None)
Specifies the style of the fliers.
medianprops : dict, optional (None)
Specifies the style of the median.
meanprops : dict, optional (None)
Specifies the style of the mean.

Returns
-------
Expand Down