フィルターのクリア

Color individual data points

24 ビュー (過去 30 日間)
Claire Andreasen
Claire Andreasen 2020 年 8 月 16 日
コメント済み: Claire Andreasen 2020 年 8 月 17 日
I have this plot
plot(strain,Ystress,'LineWidth',2, "MarkerSize",5, "MarkerFaceColor",[0 0.4470 0.7410], "MarkerEdgeColor",[0 0.4470 0.7410] );
it plots all my data points (29 of them) blue
There is one data point (say strain(4), Ysress(4)) I want to be red and another data point (say strain(10), Ysress(10)) I want to be green how would I do this?

採用された回答

Image Analyst
Image Analyst 2020 年 8 月 16 日
One way is to just stamp a new marker right on top of the existing one:
plot(strain,Ystress,'LineWidth',2, "MarkerSize",5, "MarkerFaceColor",[0 0.4470 0.7410], "MarkerEdgeColor",[0 0.4470 0.7410] );
hold on;
plot(strain(4),Ystress(4), 'r.', "MarkerSize", 25); % Big red dot.
plot(strain(10),Ystress(10), 'g.', "MarkerSize", 25); % Big green dot.
hold off;
  1 件のコメント
Claire Andreasen
Claire Andreasen 2020 年 8 月 17 日
Thank you!!! (I was missing the hold on and off hahah)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by