Skip to content

Commit 91ed617

Browse files
committed
Changed docstrings to numpydoc format and rst style corrections
1 parent 7da45dd commit 91ed617

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

lib/matplotlib/collections.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,9 +463,11 @@ def set_linestyle(self, ls):
463463
"""
464464
Set the linestyle(s) for the collection.
465465
466-
ACCEPTS: [ '-' | '--' | '-.' | ':' |
467-
'solid' | 'dashed', 'dashdot', 'dotted' |
468-
(offset, on-off-dash-seq) ]
466+
467+
Parameters
468+
----------
469+
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
470+
The line style. [[EXPLAIN on-off-dash-seq]]
469471
"""
470472
try:
471473
dashd = backend_bases.GraphicsContextBase.dashd

lib/matplotlib/lines.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -909,17 +909,17 @@ def set_linestyle(self, linestyle):
909909
Set the linestyle of the line (also accepts drawstyles)
910910
911911
912-
================ =================
912+
=========================== =================
913913
linestyle description
914-
================ =================
914+
=========================== =================
915915
``'-'`` or ``'solid'`` solid line
916916
``'--'`` or ``'dashed'`` dashed line
917917
``'-.'`` or ``'dash_dot'`` dash-dotted line
918918
``':'`` or ``'dotted'`` dotted line
919919
``'None'`` draw nothing
920920
``' '`` draw nothing
921921
``''`` draw nothing
922-
================ =================
922+
=========================== =================
923923
924924
'steps' is equivalent to 'steps-pre' and is maintained for
925925
backward-compatibility.
@@ -929,10 +929,12 @@ def set_linestyle(self, linestyle):
929929
:meth:`set_drawstyle`
930930
To set the drawing style (stepping) of the plot.
931931
932-
ACCEPTS: [``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` |
933-
``'solid'`` | ``'dashed'`` | ``'dash_dot'`` | ``'dotted'`` |
934-
``'None'`` | ``' '`` | ``''``]
935-
and any drawstyle in combination with a linestyle, e.g., ``'steps--'``.
932+
Parameters
933+
----------
934+
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
935+
The line style. [[EXPLAIN on-off-dash-seq]]
936+
Also accepts any drawstyle in combination with a linestyle,
937+
e.g., ``'steps--'``.
936938
"""
937939
if not is_string_like(linestyle):
938940
if len(linestyle) != 2:

lib/matplotlib/patches.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -339,9 +339,10 @@ def set_linestyle(self, ls):
339339
"""
340340
Set the patch linestyle
341341
342-
ACCEPTS: ['-' | '--' | '-.' | ':' |
343-
'solid' | 'dashed' | 'dashdot' | 'dotted' |
344-
(offset, on-off-dash-seq) ]
342+
Parameters
343+
----------
344+
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
345+
The line style. [[EXPLAIN on-off-dash-seq]]
345346
"""
346347
if ls is None:
347348
ls = "solid"

0 commit comments

Comments
 (0)