Can I plot using criteria from different column of plotting data?

1 回表示 (過去 30 日間)
May
May 2017 年 2 月 15 日
コメント済み: May 2017 年 2 月 15 日
I have a four variables namely image name, x coordinate,y coordinate and result as shown in figure . I would like to plot the x and y coordinates using different (marker or color)depending on result. If the result is 'cancer', I want to used red color and label the image name beside. Please kindly answer me can I do like this in matlab and how can I do it.
Thanks May

採用された回答

KSSV
KSSV 2017 年 2 月 15 日
clc; clear all ;
x1 = rand(5,1) ;
y1 = rand(5,1) ;
str = {'red','blue','green','yellow','black'} ;
mark = {'Xr' , 'db' , '*g', 'Oy' , '.k'} ;
figure
hold on
for i = 1:5
plot(x1(i),y1(i),mark{i})
text(x1(i)+0.01,y1(i),str{i})
end
  1 件のコメント
May
May 2017 年 2 月 15 日
Thank you so much for your valuable answer. Now I can solve it because of your kindly help.

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

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by