您的位置:首页 > 编程语言 > PHP开发

matplotlib.axes.Axes.plot

2017-09-08 08:37 218 查看

matplotlib.axes.Axes.plot

Axes.plot(*args, **kwargs)

Plot and/or markers to the Axes. args is a variable length argument, allowing for multiple x, y pairs with an optional formats string. For expamle, each of the following is legal:

1. plot(x, y)

2. plot(x, y, ‘bo’)

3. plot(y)

4. plot(y, ‘r+’)

if not used with labeled data, an arbitrary number of x, y, fmt groups can be specified, as in:

1. a.plot(x1, y1, ‘g^’, x2, y2, ‘g-‘)

return value is a list of lines that were added.

下列的格式字符串可以被用来描述line style 和 marker.

characterdescription
‘-‘solid line style
‘–’dashed line style
‘-.’dash-dot line style
‘:’dotted line style
‘.’point marker
‘,’pixel marker
‘o’circle marker
‘v’triangle_down marker
‘^’triangle_up marker
‘<’triangle_left marker
‘>’triangle_right marker
‘1’tri_down marker
‘2’tri_up marker
‘3’tri_left marker
‘4’tri_right marker
’s’square marker
‘p’pentagon marker
‘*’star marker
‘h’hexagon1 marker
‘H’hexagon2 marker
‘+’plus marker
‘x’x marker
‘D’diamond marker
‘d’thin_diamond marker
‘_’hline marker

Line2D 的关键字属性控制

PropertyDescription
agg_filterunknown
alphafloat (0.0 transparent through 1.0 opaque)
animated[True , False]
antialiased or aa[True , False]
axesan Axes instance
clip_boxa matplotlib.transforms.Bbox instance
clip_on[True , False]
clip_path[ (Path, Transform) , Patch , None ]
color or cany matplotlib color
containsa callable function
dash_capstyle[‘butt’ , ‘round’ , ‘projecting’]
dash_joinstyle[‘miter’ , ‘round’ , ‘bevel’]
dashessequence of on/off ink in points
drawstyle[‘default’ , ‘steps’ , ‘steps-pre’ , ‘steps-mid’ , ‘steps-post’]
figurea matplotlib.figure.Figure instance
fillstyle[‘full’ , ‘left’ , ‘right’ , ‘bottom’ , ‘top’ , ‘none’]
gidan id string
labelstring or anything printable with ‘%s’ conversion.
linestyle or ls[‘solid’ , ‘dashed’, ‘dashdot’, ‘dotted’ , (offset, on-off-dash-seq) , ‘-’ , ‘–’ , ‘-.’ , ‘:’ , ‘None’ , ’ ’ , ”]
linewidth or lwfloat value in points
markerA valid marker style
markeredgecolor or mecany matplotlib color
markeredgewidth or mewfloat value in points
markerfacecolor or mfcany matplotlib color
markerfacecoloralt or mfcaltany matplotlib color
markersize or msfloat
markevery[None , int , length-2 tuple of int , slice , list/array of int , float , length-2 tuple of float]
path_effectsunknown
pickerfloat distance in points or callable pick function fn(artist, event)
pickradiusfloat distance in points
rasterized[True , False , None]
sketch_paramsunknown
snapunknown
solid_capstyle[‘butt’ , ‘round’ , ‘projecting’]
solid_joinstyle[‘miter’ , ‘round’ , ‘bevel’]
transforma matplotlib.transforms.Transform instance
urla url string
visible[True , False]
xdata1D array
ydata1D array
zorderany number
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: