@@ -74,6 +74,14 @@ def segment_hits(cx, cy, x, y, radius):
74
74
return np .concatenate ((points ,lines ))
75
75
76
76
class Line2D (Artist ):
77
+ """
78
+ A line - the line can have both a solid linestyle connecting all
79
+ the vertices, and a marker at each vertex. Additionally, the
80
+ drawing of the solid line is influenced by the drawstyle, eg one
81
+ can create "stepped" lines in various styles.
82
+
83
+
84
+ """
77
85
lineStyles = _lineStyles = { # hidden names deprecated
78
86
'-' : '_draw_solid' ,
79
87
'--' : '_draw_dashed' ,
@@ -178,6 +186,11 @@ def __init__(self, xdata, ydata,
178
186
The kwargs are :class:`~matplotlib.lines.Line2D` properties:
179
187
180
188
%(Line2D)s
189
+
190
+ See :meth:`set_linestyle` for a decription of the line styles,
191
+ :meth:`set_marker` for a description of the markers, and
192
+ :meth:`set_drawstyle` for a description of the draw styles.
193
+
181
194
"""
182
195
Artist .__init__ (self )
183
196
@@ -589,11 +602,27 @@ def set_linewidth(self, w):
589
602
590
603
def set_linestyle (self , linestyle ):
591
604
"""
592
- Set the linestyle of the line
605
+ Set the linestyle of the line (also accepts drawstyles)
606
+
607
+
608
+ ================ =================
609
+ linestyle description
610
+ ================ =================
611
+ '-' solid
612
+ '--' dashed
613
+ '-.' dash_dot
614
+ ':' dotted
615
+ 'None' draw nothing
616
+ ' ' draw nothing
617
+ '' draw nothing
618
+ ================ =================
593
619
594
620
'steps' is equivalent to 'steps-pre' and is maintained for
595
621
backward-compatibility.
596
622
623
+ .. seealso::
624
+ :meth:`set_drawstyle`
625
+
597
626
ACCEPTS: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and
598
627
any drawstyle in combination with a linestyle, e.g. 'steps--'.
599
628
"""
@@ -622,6 +651,44 @@ def set_marker(self, marker):
622
651
"""
623
652
Set the line marker
624
653
654
+ ========= ==========================
655
+ marker description
656
+ ========= ==========================
657
+ '.' point
658
+ ',' pixel
659
+ 'o' circle
660
+ 'v' triangle_down
661
+ '^' triangle_up
662
+ '<' triangle_left
663
+ '>' triangle_right
664
+ '1' tri_down
665
+ '2' tri_up
666
+ '3' tri_left
667
+ '4' tri_right
668
+ 's' square
669
+ 'p' pentagon
670
+ '*' star
671
+ 'h' hexagon1
672
+ 'H' hexagon2
673
+ '+' plus
674
+ 'x' x
675
+ 'D' diamond
676
+ 'd' thin_diamond
677
+ '|' vline
678
+ '_' hline
679
+ TICKLEFT tickleft
680
+ TICKRIGHT tickright
681
+ TICKUP tickup
682
+ TICKDOWN tickdown
683
+ CARETLEFT caretleft
684
+ CARETRIGHT caretright
685
+ CARETUP caretup
686
+ CARETDOWN caretdown
687
+ 'None' nothing
688
+ ' ' nothing
689
+ '' nothing
690
+ ========= ==========================
691
+
625
692
ACCEPTS: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4'
626
693
| '<' | '>' | 'D' | 'H' | '^' | '_' | 'd'
627
694
| 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|'
0 commit comments