Change portion of text color in matlab label
조회 수: 37 (최근 30일)
이전 댓글 표시
I know that it is possible to change the color of a label in a figure in matlab from the default black to another color. I have a need to change only part of the label text to a different color. For example.
h = xlabel('black, red');
set(h, 'Color',[1, 0 ,0])
This should change the entire text to red instead of black, but I'd only like to change the color of the word red.
댓글 수: 0
채택된 답변
추가 답변 (1개)
Image Analyst
2020년 1월 29일
Might have to look up Latex commands and embed Latex commands in the string. I don't know the Latex commands off the top of my head.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!