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

Skip to content

Commit 2b6c934

Browse files
committed
updated plot docstring
svn path=/trunk/matplotlib/; revision=6548
1 parent b0eb269 commit 2b6c934

1 file changed

Lines changed: 55 additions & 37 deletions

File tree

lib/matplotlib/axes.py

Lines changed: 55 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3171,46 +3171,55 @@ def plot(self, *args, **kwargs):
31713171
31723172
Return value is a list of lines that were added.
31733173
3174-
The following line styles are supported::
3175-
3176-
- # solid line
3177-
-- # dashed line
3178-
-. # dash-dot line
3179-
: # dotted line
3180-
. # points
3181-
, # pixels
3182-
o # circle symbols
3183-
^ # triangle up symbols
3184-
v # triangle down symbols
3185-
< # triangle left symbols
3186-
> # triangle right symbols
3187-
s # square symbols
3188-
+ # plus symbols
3189-
* # star symbols
3190-
x # cross symbols
3191-
D # diamond symbols
3192-
d # thin diamond symbols
3193-
1 # tripod down symbols
3194-
2 # tripod up symbols
3195-
3 # tripod left symbols
3196-
4 # tripod right symbols
3197-
h # hexagon symbols
3198-
H # rotated hexagon symbols
3199-
p # pentagon symbols
3200-
| # vertical line symbols
3201-
_ # horizontal line symbols
3202-
steps # use gnuplot style 'steps' # kwarg only
3174+
The following format string characters are accepted to control
3175+
the line style or marker
3176+
3177+
================ ===============================
3178+
character description
3179+
================ ===============================
3180+
'-' solid line style
3181+
'--' dashed line style
3182+
'-.' dash-dot line style
3183+
':' dotted line style
3184+
'.' point marker
3185+
',' pixel marker
3186+
'o' circle marker
3187+
'v' triangle_down marker
3188+
'^' triangle_up marker
3189+
'<' triangle_left marker
3190+
'>' triangle_right marker
3191+
'1' tri_down marker
3192+
'2' tri_up marker
3193+
'3' tri_left marker
3194+
'4' tri_right marker
3195+
's' square marker
3196+
'p' pentagon marker
3197+
'*' star marker
3198+
'h' hexagon1 marker
3199+
'H' hexagon2 marker
3200+
'+' plus marker
3201+
'x' x marker
3202+
'D' diamond marker
3203+
'd' thin_diamond marker
3204+
'|' vline marker
3205+
'_' hline marker
3206+
================ ===============================
3207+
32033208
32043209
The following color abbreviations are supported::
32053210
3206-
b # blue
3207-
g # green
3208-
r # red
3209-
c # cyan
3210-
m # magenta
3211-
y # yellow
3212-
k # black
3213-
w # white
3211+
========== ========
3212+
character color
3213+
========== ========
3214+
'b' blue
3215+
'g' green
3216+
'r' red
3217+
'c' cyan
3218+
'm' magenta
3219+
'y' yellow
3220+
'k' black
3221+
'w' white
3222+
========== ========
32143223
32153224
In addition, you can specify colors in many weird and
32163225
wonderful ways, including full names (``'green'``), hex
@@ -3239,6 +3248,15 @@ def plot(self, *args, **kwargs):
32393248
32403249
Neither line will be antialiased.
32413250
3251+
You do not need to use format strings, which are just
3252+
abbreviations. All of the line properties can be controlled
3253+
by keyword arguments. For example, you can set the color,
3254+
marker, linestyle, and markercolor with::
3255+
3256+
plot(x, y, color='green', linestyle='dashed', marker='o',
3257+
markerfacecolor='blue', markersize=12). See
3258+
:class:`~matplotlib.lines.Line2D` for details.
3259+
32423260
The kwargs are :class:`~matplotlib.lines.Line2D` properties:
32433261
32443262
%(Line2D)s

0 commit comments

Comments
 (0)