@@ -670,27 +670,43 @@ def set_linestyle(self, ls):
670670 """
671671 Set the linestyle(s) for the collection.
672672
673- =========================== =================
674- linestyle description
675- =========================== =================
676- ``'-'`` or ``'solid'`` solid line
677- ``'--'`` or ``'dashed'`` dashed line
678- ``'-.'`` or ``'dashdot'`` dash-dotted line
679- ``':'`` or ``'dotted'`` dotted line
680- =========================== =================
673+ Parameters
674+ ----------
675+ ls : {'-', '--', '-.', ':', '', ...} or (offset, on-off-seq) or list thereof
676+ If as list, the individual elements are assigned to the elements of the
677+ collection.
681678
682- Alternatively a dash tuple of the following form can be provided: :
679+ Possible values :
683680
684- (offset, onoffseq),
681+ - A string:
685682
686- where ``onoffseq`` is an even length tuple of on and off ink in points.
683+ ======================================================= ================
684+ linestyle description
685+ ======================================================= ================
686+ ``'-'`` or ``'solid'`` solid line
687+ ``'--'`` or ``'dashed'`` dashed line
688+ ``'-.'`` or ``'dashdot'`` dash-dotted line
689+ ``':'`` or ``'dotted'`` dotted line
690+ ``''`` or ``'none'`` (discouraged: ``'None'``, ``' '``) draw nothing
691+ ======================================================= ================
687692
688- Parameters
689- ----------
690- ls : str or tuple or list thereof
691- Valid values for individual linestyles include {'-', '--', '-.',
692- ':', '', (offset, on-off-seq)}. See `.Line2D.set_linestyle` for a
693- complete description.
693+ - A tuple describing the start position and lengths of dashes and spaxces:
694+
695+ (offset, onoffseq)
696+
697+ where
698+
699+ - *offset* is a float specifying the offset (in points); i.e. how much
700+ is the dash pattern shifted.
701+ - *onoffseq* is a sequence of on and off ink in points. There can be
702+ arbitrary many pairs of on and off values.
703+
704+ Example: The tuple ``(0, (10, 5, 1, 5))`` means that the pattern starts
705+ at the beginning of the line. It draws a 10 point long dash,
706+ then a 5 point long space, then a 1 point long dash, followed by a 5 point
707+ long space, and then the pattern repeats.
708+
709+ For examples see :doc:`/gallery/lines_bars_and_markers/linestyles`.
694710 """
695711 # get the list of raw 'unscaled' dash patterns
696712 self ._us_linestyles = mlines ._get_dash_patterns (ls )
0 commit comments