フィルターのクリア

Giving color to text labelled on curve

1 回表示 (過去 30 日間)
Athira Surendran
Athira Surendran 2017 年 2 月 9 日
回答済み: KSSV 2017 年 2 月 9 日
How can I change the color of a text labelled on a curve to the same color of that curve? (there are multiple curves on the same figure)
for i=1:m
plot(x,y(i,:));
text(x(5),y(i,5),[num2str(load(i)),'%']);
hold on;
end;

採用された回答

KSSV
KSSV 2017 年 2 月 9 日
clc ; clear all ;
x = 1:10 ;
y = rand(5,10) ;
for i=1:5
c = rand(1,3) ;
plot(x,y(i,:),'color',c);
text(x(5),y(i,5),[num2str((i)),'%'],'Color',c,'FontSize',14);
hold on;
end;

その他の回答 (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