Plot only markers without lines
古いコメントを表示
Hello,
I have two matrices V(NXM) and g(NXM). I wish to plot each column in V (x axis) against each column in g(y axis). I must have the data plotted only as markers i.e without lines.
I tried 'LineStyle','none' but I didn't managed to "turn on" the marker stuff. I do not want to specify manually what markers to use beacuse I have many columns (which I will also plot on separate figures).
I thought that matlab can plot the markers and once it finished all the markers it will change color and restart the marker order.
so can I do this?
Thanks, Rami
採用された回答
その他の回答 (3 件)
TheStranger
2018 年 12 月 5 日
19 投票
Hi!
I know it was like 4 years ago, but anyway.
You need to specify 'LineStyle', 'none'
3 件のコメント
Samuel Abimbola Ogunfuye
2020 年 7 月 2 日
Thanks for answering. Just what I needed
Quinn Mulligan
2021 年 6 月 10 日
Thanks for answering anyway, you saved me a lot of time
Esen Ozbay
2021 年 7 月 1 日
Thanks so much! Just what I was looking for since scatter was working problematic.
Rami
2014 年 3 月 20 日
1 投票
2 件のコメント
Friedrich
2014 年 3 月 21 日
The color is choosen like the plot command does it. Only the marker has to be set by yourself which is extremly easy, e.g.
x = linspace(0,3*pi,200);
y = cos(x)+ rand(1,200);
scatter(x,y)
hold on
x = 0:0.1:10
y = sin(x);
scatter(x,y,'*')
hold off
Ihaveaquest
2022 年 8 月 22 日
wha if i wanted to just plot markers at oint 0 and 10??
Yash Doshi
2021 年 2 月 23 日
編集済み: Yash Doshi
2021 年 2 月 23 日
1 投票
You can also use the 'LineStyle','none' in the stem() function, and yes, MATLAB itself knows when to change markers for different columns, you just need to plot each column in a loop using (hold on).
Hope this answers and solves your query.
I know I have been very early in answering the question xD. But maybe it can be useful for anyone who sees this in the future.
カテゴリ
ヘルプ センター および File Exchange で Annotations についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!