필터 지우기
필터 지우기

How can I set multiple text descriptions' colours at one time

조회 수: 2 (최근 30일)
Greer Gray
Greer Gray 2018년 11월 28일
댓글: madhan ravi 2018년 11월 29일
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'

채택된 답변

madhan ravi
madhan ravi 2018년 11월 28일
[tt(1).Color,tt(3).Color] = deal('r')

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Entering Commands에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by