From e5211f1cbb34a28aaa97af30f87990f3a14b3542 Mon Sep 17 00:00:00 2001 From: Lennart Fricke Date: Tue, 29 Jul 2014 09:42:33 +0200 Subject: [PATCH] Added documentation changes for #2136 --- lib/matplotlib/collections.py | 3 ++- lib/matplotlib/lines.py | 30 +++++++++++++++--------------- lib/matplotlib/patches.py | 4 +++- 3 files changed, 20 insertions(+), 17 deletions(-) diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index 85b462e064fe..9b6793762364 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -463,7 +463,8 @@ def set_linestyle(self, ls): """ Set the linestyle(s) for the collection. - ACCEPTS: ['solid' | 'dashed', 'dashdot', 'dotted' | + ACCEPTS: [ '-' | '--' | '-.' | ':' | + 'solid' | 'dashed', 'dashdot', 'dotted' | (offset, on-off-dash-seq) ] """ try: diff --git a/lib/matplotlib/lines.py b/lib/matplotlib/lines.py index 2c621cfd92a0..73e30b85ea38 100644 --- a/lib/matplotlib/lines.py +++ b/lib/matplotlib/lines.py @@ -915,17 +915,17 @@ def set_linestyle(self, linestyle): Set the linestyle of the line (also accepts drawstyles) - ================ ================= - linestyle description - ================ ================= - ``'-'`` solid - ``'--'`` dashed - ``'-.'`` dash_dot - ``':'`` dotted - ``'None'`` draw nothing - ``' '`` draw nothing - ``''`` draw nothing - ================ ================= + ================ ================= + linestyle description + ================ ================= + ``'-'`` or ``'solid'`` solid line + ``'--'`` or ``'dashed'`` dashed line + ``'-.'`` or ``'dash_dot'`` dash-dotted line + ``':'`` or ``'dotted'`` dotted line + ``'None'`` draw nothing + ``' '`` draw nothing + ``''`` draw nothing + ================ ================= 'steps' is equivalent to 'steps-pre' and is maintained for backward-compatibility. @@ -935,10 +935,10 @@ def set_linestyle(self, linestyle): :meth:`set_drawstyle` To set the drawing style (stepping) of the plot. - ACCEPTS: [``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'None'`` | - ``' '`` | ``''``] - - and any drawstyle in combination with a linestyle, e.g., ``'steps--'``. + ACCEPTS: [``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | + ``'solid'`` | ``'dashed'`` | ``'dash_dot'`` | ``'dotted'`` | + ``'None'`` | ``' '`` | ``''``] + and any drawstyle in combination with a linestyle, e.g., ``'steps--'``. """ if not is_string_like(linestyle): if len(linestyle) != 2: diff --git a/lib/matplotlib/patches.py b/lib/matplotlib/patches.py index ac31a00cf2d5..32a41b74e09a 100644 --- a/lib/matplotlib/patches.py +++ b/lib/matplotlib/patches.py @@ -339,7 +339,9 @@ def set_linestyle(self, ls): """ Set the patch linestyle - ACCEPTS: ['solid' | 'dashed' | 'dashdot' | 'dotted'] + ACCEPTS: ['-' | '--' | '-.' | ':' | + 'solid' | 'dashed' | 'dashdot' | 'dotted' | + (offset, on-off-dash-seq) ] """ if ls is None: ls = "solid"