Skip to content

Commit bea2634

Browse files
committed
Extended docstring of set_linestyle
and shortend type description to make travis happy
1 parent 24e1301 commit bea2634

File tree

3 files changed

+33
-8
lines changed

3 files changed

+33
-8
lines changed

lib/matplotlib/collections.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -466,8 +466,17 @@ def set_linestyle(self, ls):
466466
467467
Parameters
468468
----------
469-
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
470-
The line style. [[EXPLAIN on-off-dash-seq]]
469+
ls : { '-', '--', '-.', ':'} and more see description
470+
The line style. The written out linestyles
471+
'solid', 'dashed', 'dashdot' and 'dotted' and drawstyle in
472+
combination with a linestyle, e.g., ``'steps--'`` are also allowed.
473+
474+
Alternatively a dash tuple of the following form can be provided::
475+
476+
(offset, onoffseq),
477+
478+
where ``onoffseq`` is an even length tuple of on and off ink
479+
in points.
471480
"""
472481
try:
473482
dashd = backend_bases.GraphicsContextBase.dashd

lib/matplotlib/lines.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -937,10 +937,17 @@ def set_linestyle(self, linestyle):
937937
938938
Parameters
939939
----------
940-
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
941-
The line style. [[EXPLAIN on-off-dash-seq]]
942-
Also accepts any drawstyle in combination with a linestyle,
943-
e.g., ``'steps--'``.
940+
ls : { '-', '--', '-.', ':'} and more see description
941+
The line style. The written out linestyles
942+
'solid', 'dashed', 'dashdot' and 'dotted' and drawstyle in
943+
combination with a linestyle, e.g., ``'steps--'`` are also allowed.
944+
945+
Alternatively a dash tuple of the following form can be provided::
946+
947+
(offset, onoffseq),
948+
949+
where ``onoffseq`` is an even length tuple of on and off ink
950+
in points.
944951
"""
945952
if not is_string_like(linestyle):
946953
if len(linestyle) != 2:

lib/matplotlib/patches.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,8 +341,17 @@ def set_linestyle(self, ls):
341341
342342
Parameters
343343
----------
344-
ls : { '-', '--', '-.', ':' , 'solid', 'dashed', 'dashdot', 'dotted', (offset, on-off-dash-seq)}
345-
The line style. [[EXPLAIN on-off-dash-seq]]
344+
ls : { '-', '--', '-.', ':'} and more see description
345+
The line style. The written out linestyles
346+
'solid', 'dashed', 'dashdot' and 'dotted' and drawstyle in
347+
combination with a linestyle, e.g., ``'steps--'`` are also allowed.
348+
349+
Alternatively a dash tuple of the following form can be provided::
350+
351+
(offset, onoffseq),
352+
353+
where ``onoffseq`` is an even length tuple of on and off ink
354+
in points.
346355
"""
347356
if ls is None:
348357
ls = "solid"

0 commit comments

Comments
 (0)