フィルターのクリア

Make certain plot markers invisible?

13 ビュー (過去 30 日間)
Benson
Benson 2013 年 6 月 13 日
set(0,'DefaultLineMarkerSize',6);
plot(x,y,'red.-');
I have some points touching the x-axis (y-value is 0). For these particular points, I want to make the markers invisible.
Also, I want all the points to be plotted. So plot(x,y(y>0),'red.-'); where x is modified earlier in the script to have the same vector length as y(y>0) wouldn't work.
Any help is appreciated. Thanks!

採用された回答

Walter Roberson
Walter Roberson 2013 年 6 月 13 日
You cannot modify individual markers of a line() or lineseries() object such as are created by line() or plot().
What you can do is plot() without the markers and the scatter() the markers into place. Or you can plot() without the markers and the plot() again with
hold on; plot(x(y>0), y(y>0), 'r.')
which would plot only markers at those locations, with no lines.

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by