Suppose I have
xt = [1 2 3 4];yt = [1 2 3 4];str = {'one','two','three','four'};tt = text(xt,yt,str);xlim([0 5])ylim([0 5])
How do I set 1 and 3 to the color red together without a loop
i.e. tt([1 3]).Color = 'r'
"text descrption"colors
xt = [1 2 3 4];yt = [1 2 3 4];str = {'one','two','three','four'};tt = text(xt,yt,str);xlim([0 5])ylim([0 5])
i.e. tt([1 3]).Color = 'r'
Best Answer