how to mark 2D plot with shapes for long array?

1 回表示 (過去 30 日間)
Kobi
Kobi 2018 年 10 月 7 日
編集済み: jonas 2018 年 10 月 7 日
trying to mark 2D plots with shapes using the following command:
h=semilogy(lambda,Hb);
set(h,'linestyle','-','color','b','marker','s')
a problem occure when the plots are for large array of vectors, then the shapes are crammed up and i cant really distinguish from them.
what can i do?

採用された回答

jonas
jonas 2018 年 10 月 7 日
編集済み: jonas 2018 年 10 月 7 日
Use the 'markerindices' argument, introduced in 2016b
plot(x, y, 'markerindices', [1:10:lenght(x)])
puts markers on every 10th point. In older released you need to use something like
plot(x, y, 'k-',...
x(1:10:end),y(1:10:end),'ko')
Which is really annoying as you get 2 different line objects.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLine Plots についてさらに検索

製品


リリース

R2016a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by