本杰明,添加
你的代码。
(x_pos y_pos)
是需要标记的数据点。如果你有
x = 0:0.1:π;
y = sin (x);
您可以使用
情节(x, y)
持有在
情节(x (10), y (10),的r *)
另外,
从R2016b开始,你可以
指定
的
MarkerIndices
财产
画一条线
马克
r
S在特定的数据点上
.
例如,在10处画一条线
th
数据点。
x = 0:0.1:π;
y = sin (x);
p =情节(x, y,“啊——”,“MarkerIndices”, 10)
您还可以指定标记属性,例如面颜色和边缘颜色。
p =情节(x, y,“啊——”,“MarkerFaceColor”,“红色”,“MarkerEdgeColor”,“红色”,“MarkerIndices”, 10)