Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d79d80

Browse files
committed
Merged revisions 8593 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v1_0_maint ........ r8593 | weathergod | 2010-07-29 11:16:17 -0500 (Thu, 29 Jul 2010) | 4 lines Fix documentation for set_linestyle() and set_marker() and a few other functions properly display their available values on the web docs. Also changed pentagram to pentagon in the docstrings. ........ svn path=/trunk/matplotlib/; revision=8594
1 parent 40412b9 commit 0d79d80

File tree

3 files changed

+60
-56
lines changed

3 files changed

+60
-56
lines changed

lib/matplotlib/artist.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ def get_valid_values(self, attr):
826826
for a line that begins with ACCEPTS:
827827
828828
Eg., for a line linestyle, return
829-
[ '-' | '--' | '-.' | ':' | 'steps' | 'None' ]
829+
"[ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'steps'`` | ``'None'`` ]"
830830
"""
831831

832832
name = 'set_%s'%attr

lib/matplotlib/axes.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5549,22 +5549,22 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
55495549
*marker*:
55505550
can be one of:
55515551
5552-
===== ==============
5553-
Value Description
5554-
===== ==============
5555-
's' square
5556-
'o' circle
5557-
'^' triangle up
5558-
'>' triangle right
5559-
'v' triangle down
5560-
'<' triangle left
5561-
'd' diamond
5562-
'p' pentagram
5563-
'h' hexagon
5564-
'8' octagon
5565-
'+' plus
5566-
'x' cross
5567-
===== ==============
5552+
======= ==============
5553+
Value Description
5554+
======= ==============
5555+
``'s'`` square
5556+
``'o'`` circle
5557+
``'^'`` triangle up
5558+
``'>'`` triangle right
5559+
``'v'`` triangle down
5560+
``'<'`` triangle left
5561+
``'d'`` diamond
5562+
``'p'`` pentagon
5563+
``'h'`` hexagon
5564+
``'8'`` octagon
5565+
``'+'`` plus
5566+
``'x'`` cross
5567+
======= ==============
55685568
55695569
The marker can also be a tuple (*numsides*, *style*,
55705570
*angle*), which will create a custom, regular symbol.
@@ -5655,7 +5655,7 @@ def scatter(self, x, y, s=20, c='b', marker='o', cmap=None, norm=None,
56555655
'v' : (3,math.pi,0), # triangle down
56565656
'<' : (3,3*math.pi/2.0,0), # triangle left
56575657
'd' : (4,0,0), # diamond
5658-
'p' : (5,0,0), # pentagram
5658+
'p' : (5,0,0), # pentagon
56595659
'h' : (6,0,0), # hexagon
56605660
'8' : (8,0,0), # octagon
56615661
'+' : (4,0,2), # plus

lib/matplotlib/lines.py

Lines changed: 42 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -712,13 +712,13 @@ def set_linestyle(self, linestyle):
712712
================ =================
713713
linestyle description
714714
================ =================
715-
'-' solid
716-
'--' dashed
717-
'-.' dash_dot
718-
':' dotted
719-
'None' draw nothing
720-
' ' draw nothing
721-
'' draw nothing
715+
``'-'`` solid
716+
``'--'`` dashed
717+
``'-.'`` dash_dot
718+
``':'`` dotted
719+
``'None'`` draw nothing
720+
``' '`` draw nothing
721+
``''`` draw nothing
722722
================ =================
723723
724724
'steps' is equivalent to 'steps-pre' and is maintained for
@@ -729,8 +729,8 @@ def set_linestyle(self, linestyle):
729729
:meth:`set_drawstyle`
730730
To set the drawing style (stepping) of the plot.
731731
732-
ACCEPTS: [ '-' | '--' | '-.' | ':' | 'None' | ' ' | '' ] and
733-
any drawstyle in combination with a linestyle, e.g. 'steps--'.
732+
ACCEPTS: [ ``'-'`` | ``'--'`` | ``'-.'`` | ``':'`` | ``'None'`` | ``' '`` | ``''`` ]
733+
and any drawstyle in combination with a linestyle, e.g. ``'steps--'``.
734734
"""
735735

736736
for ds in self.drawStyleKeys: # long names are first in the list
@@ -759,28 +759,28 @@ def set_marker(self, marker):
759759
========== ==========================
760760
marker description
761761
========== ==========================
762-
'.' point
763-
',' pixel
764-
'o' circle
765-
'v' triangle_down
766-
'^' triangle_up
767-
'<' triangle_left
768-
'>' triangle_right
769-
'1' tri_down
770-
'2' tri_up
771-
'3' tri_left
772-
'4' tri_right
773-
's' square
774-
'p' pentagon
775-
'*' star
776-
'h' hexagon1
777-
'H' hexagon2
778-
'+' plus
779-
'x' x
780-
'D' diamond
781-
'd' thin_diamond
782-
'|' vline
783-
'_' hline
762+
``'.'`` point
763+
``','`` pixel
764+
``'o'`` circle
765+
``'v'`` triangle_down
766+
``'^'`` triangle_up
767+
``'<'`` triangle_left
768+
``'>'`` triangle_right
769+
``'1'`` tri_down
770+
``'2'`` tri_up
771+
``'3'`` tri_left
772+
``'4'`` tri_right
773+
``'s'`` square
774+
``'p'`` pentagon
775+
``'*'`` star
776+
``'h'`` hexagon1
777+
``'H'`` hexagon2
778+
``'+'`` plus
779+
``'x'`` x
780+
``'D'`` diamond
781+
``'d'`` thin_diamond
782+
``'|'`` vline
783+
``'_'`` hline
784784
TICKLEFT tickleft
785785
TICKRIGHT tickright
786786
TICKUP tickup
@@ -789,19 +789,23 @@ def set_marker(self, marker):
789789
CARETRIGHT caretright
790790
CARETUP caretup
791791
CARETDOWN caretdown
792-
'None' nothing
793-
' ' nothing
794-
'' nothing
792+
``'None'`` nothing
793+
``' '`` nothing
794+
``''`` nothing
795795
'$...$' render the string using mathtext
796796
========== ==========================
797797
798798
799799
800-
ACCEPTS: [ '+' | '*' | ',' | '.' | '1' | '2' | '3' | '4'
801-
| '<' | '>' | 'D' | 'H' | '^' | '_' | 'd'
802-
| 'h' | 'o' | 'p' | 's' | 'v' | 'x' | '|'
800+
ACCEPTS: [ ``'+'`` | ``'*'`` | ``','`` | ``'.'``
801+
| ``'1'`` | ``'2'`` | ``'3'`` | ``'4'``
802+
| ``'<'`` | ``'>'`` | ``'D'`` | ``'H'``
803+
| ``'^'`` | ``'_'`` | ``'d'`` | ``'h'``
804+
| ``'o'`` | ``'p'`` | ``'s'`` | ``'v'``
805+
| ``'x'`` | ``'|'``
803806
| TICKUP | TICKDOWN | TICKLEFT | TICKRIGHT
804-
| 'None' | ' ' | '' | '$...$']
807+
| CARETUP | CARETDOWN | CARETLEFT | CARETRIGHT
808+
| ``'None'`` | ``' '`` | ``''`` | '$...$']
805809
806810
"""
807811
if marker in self._markers:

0 commit comments

Comments
 (0)