本文主要是介绍plot Linespec,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
plot(X1,Y1,X2,Y2,LineSpec,X3,Y3)
同一图中绘出(x1,y1)(x2,y2,LineSpec) (x3,y3)
LineSpec:Line specification string syntax
Line style
Line width
Color
Marker type
Marker size
Marker face and edge coloring (for filled markers)
Line Style Specifiers 曲线
Specifier Line Style
- Solid line (default) ___实线
-- Dashed line _________虚线
: Dotted line ___________点线
-. Dash-dot line _____点实线
Marker Specifiers 标号
Specifier Marker Type
+ Plus sign
* Asterisk
. Point
x Cross
=========以上为非filled记号,以下为filled记号======
o???????????????????????????????????? Circle 圈
s or 'square'?????????????????? Square 方
d or 'diamond'??????????????? Diamond 菱形
^???????????????????????????????????? Upward-pointing triangle 上三角
v??????????????????????????????????? Downward-pointing triangle 下三角
>???????????????????????????????????? Right-pointing triangle 左三角
<??????????????????????????????????? Left-pointing triangle 右三角
p or 'pentagram'???????????? Five-pointed star (pentagram)五角星
h or 'hexagram'???????????? Six-pointed star (hexagram) 六角星
Color Specifiers 颜色
Specifier Color
r??????????? Red
g????????? Green
b?????? ??? Blue
c?????????? Cyan青
m????? Magenta 品红
y?????? ??? Yellow
k?????? ??? Black
w?????????? White
曲线 标号 颜色 三项定义不分先后,在数据后写为一个字符串的形式。曲线和标号的颜色一致,除非以高级特性另行定义
如果只定义了标号而没有定义线的形式,则仅绘出数据点处的记号,不会连成曲线
高级特性
LinWidth?????????? ??? 曲线粗细
MarkerEdgeColor 定义标号的颜色,或者实心记号的外缘颜色
MarkerFaceColor 实心记号的填充色
MarkerSize?????????? 记号的大小
例:
plot(t,sin(2*t),'-mo',...
'LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor',[.49 1 .63],...
'MarkerSize',12)
这篇关于plot Linespec的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!