Quick references
Here is a set of tables that show main properties and styles.
Line properties
| Property | Description | Appearance |
|---|---|---|
| alpha (or a) | alpha transparency on 0-1 scale | ![]() |
| antialiased | True or False - use antialised rendering | ![]() |
| color (or c) | matplotlib color arg | ![]() |
| linestyle (or ls) | see Line properties | |
| linewidth (or lw) | float, the line width in points | ![]() |
| solid_capstyle | Cap style for solid lines | ![]() |
| solid_joinstyle | Join style for solid lines | ![]() |
| dash_capstyle | Cap style for dashes | ![]() |
| dash_joinstyle | Join style for dashes | ![]() |
| marker | see Markers | |
| markeredgewidth (mew) | line width around the marker symbol | ![]() |
| markeredgecolor (mec) | edge color if a marker is used | ![]() |
| markerfacecolor (mfc) | face color if a marker is used | ![]() |
| markersize (ms) | size of the marker in points | ![]() |
line styles
| Symbol | Description | Appearance |
|---|---|---|
| - | solid line | ![]() |
| -- | dashed line | ![]() |
| -. | dash-dot line | ![]() |
| : | dotted line | ![]() |
| . | points | ![]() |
| , | pixels | ![]() |
| o | circle | ![]() |
| ^ | triangle up | ![]() |
| v | triangle down | ![]() |
| < | triangle left | ![]() |
| > | triangle right | ![]() |
| s | square | ![]() |
| + | plus | ![]() |
| x | cross | ![]() |
| D | diamond | ![]() |
| d | thin diamond | ![]() |
| 1 | tripod down | ![]() |
| 2 | tripod up | ![]() |
| 3 | tripod left | ![]() |
| 4 | tripod right | ![]() |
| h | hexagon | ![]() |
| H | rotated hexagon | ![]() |
| p | pentagon | ![]() |
| | | vertical line | ![]() |
| _ | horizontal line | ![]() |
Markers
| Symbol | Description | Appearance |
|---|---|---|
| 0 | tick left | ![]() |
| 1 | tick right | ![]() |
| 2 | tick up | ![]() |
| 3 | tick down | ![]() |
| 4 | caret left | ![]() |
| 5 | caret right | ![]() |
| 6 | caret up | ![]() |
| 7 | caret down | ![]() |
| o | circle | ![]() |
| D | diamond | ![]() |
| h | hexagon 1 | ![]() |
| H | hexagon 2 | ![]() |
| _ | horizontal line | ![]() |
| 1 | tripod down | ![]() |
| 2 | tripod up | ![]() |
| 3 | tripod left | ![]() |
| 4 | tripod right | ![]() |
| 8 | octagon | ![]() |
| p | pentagon | ![]() |
| ^ | triangle up | ![]() |
| v | triangle down | ![]() |
| < | triangle left | ![]() |
| > | triangle right | ![]() |
| d | thin diamond | ![]() |
| , | pixel | ![]() |
| + | plus | ![]() |
| . | point | ![]() |
| s | square | ![]() |
| * | star | ![]() |
| | | vertical line | ![]() |
| x | cross | ![]() |
| r'$\sqrt{2}$' | any latex expression | ![]() |
本文提供了一张快速参考表,涵盖了matplotlib中线条的主要属性和样式,包括透明度、抗锯齿设置、颜色、线型、线宽、端点样式、连接样式以及标记符号等。适用于希望快速查阅matplotlib绘图配置选项的读者。






































































655

被折叠的 条评论
为什么被折叠?



