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

Skip to content

MEP10 - refactored hlines and vlines documentation #1795

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 14, 2013
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
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC mentions kwargs in vlines and hlines
  • Loading branch information
NelleV committed Feb 28, 2013
commit ec54a0bb456cee56e80e56691a5c91c854bf5688
34 changes: 19 additions & 15 deletions lib/matplotlib/axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3667,25 +3667,27 @@ def hlines(self, y, xmin, xmax, colors='k', linestyles='solid',
Respective beginning and end of each line. If scalars are
provided, all lines will have same length.

colors : a line collections color argument, either a single color
or a list of colors
colors : array_like of colors, optional, default: 'k'

linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional,
default : 'solid'
linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional

label : string, optional, default: ''

Returns
-------
:class:`~matplotlib.collections.LineCollection`
matplotlib.collections.LineCollection

Example
--------
Other parameters
----------------
kwargs correspond to matplotlib.collections.LineCollection properties.

Notes
-----
.. plot:: mpl_examples/pylab_examples/vline_hline_demo.py

See also
--------
vlines : horizontal lines
vlines : vertical lines
"""

# We do the conversion first since not all unitized data is uniform
Expand Down Expand Up @@ -3753,20 +3755,22 @@ def vlines(self, x, ymin, ymax, colors='k', linestyles='solid',
Respective beginning and end of each line. If scalars are
provided, all lines will have same length.

colors : a line collections color argument, either a single color
or a list of colors
colors : array_like of colors, optional, default: 'k'

linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional,
default : 'solid'
linestyles : ['solid' | 'dashed' | 'dashdot' | 'dotted'], optional

label : string, optional, default: ''

Returns
-------
:class:`~matplotlib.collections.LineCollection`
matplotlib.collections.LineCollection
Copy link
Member

Choose a reason for hiding this comment

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

This has to be of the form name : type or it doesn't render correctly, i.e.

lines : matplotlib.collections.LineCollection


Example
-------
Other parameters
----------------
kwargs correspond to matplotlib.collections.LineCollection properties.
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't render correctly, plus it would be nice if it linked to the LineCollection class:

kwargs : `~matplotlib.collections.LineCollection` properties

Copy link
Member Author

Choose a reason for hiding this comment

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

Maybe this should fall in the Notes section ?

Copy link
Member

Choose a reason for hiding this comment

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

Well, they are "Other Parameters" -- it sort of makes sense there, but it does mean we have to use numpydoc's parameter syntax here. Saying "kwargs" as a parameter name is a bit clunky/obscure, though, admittedly.

Copy link
Member Author

Choose a reason for hiding this comment

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

It's fixed !


Notes
-----
.. plot:: mpl_examples/pylab_examples/vline_hline_demo.py
Copy link
Member

Choose a reason for hiding this comment

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

Notes needs to come after See also (again, it doesn't render correctly).


See also
Expand Down