Plot points without connect it
显示 更早的评论
Hi
I have matrix A(20,100) and I want to plot first column with respect to second column but I do not want to connect the points together. I mean I just want to put these point on the graph I used
plot(A(:,1),A(:,2))
but this command connect points together
How I can do that?
Regards
采纳的回答
更多回答(2 个)
Hazem
2017-12-5
plot(A(:,1),A(:,2), 'o')
or whatever marker you want to use
Daniel Malo Osorio
2020-4-29
0 个投票
Follow-up question
How do I make it possible to plot with lines conecting my dots with the plot() function?
I have tried using the 'r.-' marker, but it ONLY plots the dots on the figure.
assuming x and y are my data vectors
plot(x,y,".-r")
1 个评论
Hannes Morgenroth
2020-10-15
编辑:Hannes Morgenroth
2020-10-15
I always use hold and plot on top without a marker.
Example:
plot(x,y,".-r")
hold all;
plot(x,y)
类别
在 帮助中心 和 File Exchange 中查找有关 Legend 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!