Different colors for different text in a single textbox
조회 수: 66 (최근 30일)
이전 댓글 표시
Is it possible to have different colors for different text in a single text box?
For example,
1st line of text is black
2nd line of text is blue
3rd line of text is red.
댓글 수: 0
채택된 답변
Voss
2022년 12월 24일
str = { ...
'\color{black}1st line of text', ...
'\color{blue}2nd line of text', ...
'\color{red}3rd line of text'};
t = text(0.5,0.5,str);
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Text Data Preparation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!