开发者

Display colored labels in plots with matlab

I'm using the fol开发者_StackOverflow社区lowing commands to plot a set of points on a 2d map in matlab

labels = {'label1', ' label2', 'label3',...) plot(score(:,1),score(:,2), '*') gname(lables)

Is there a way to choose the color for each label?

Thanks


Return vector of label handles, then you can set color (as well as other text properties) for all or individual labels.

h = gname(lables);
set(h,'color','r') %# set all labels to red
set(h(2),'color','g') %# set 2nd label to green
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜