How to add mathematical symbols to text within the legend
조회 수: 89 (최근 30일)
이전 댓글 표시
I'm finding it difficult to add the maths symbol /phi to my actual legend. I am able to add mathematical symbols to the title, but not the legend. I normally plot my data vectors, then edit the name, etc. of them within the plot tools rather than the command line.
I want to be able to state the number 45 followed by /phi (45/phi)
댓글 수: 0
채택된 답변
Kelly Kearney
2013년 11월 22일
The legend command should accept TeX symbols by default, just as titles, x/ylabels, etc:
plot(rand(10,1));
hl = legend('45\phi');
If not, try
set(hl, 'interpreter', 'tex')
추가 답변 (1개)
Walter Roberson
2013년 11월 22일
Add the option 'Interpreter', 'tex' or 'Interpreter', 'latex', and see http://www.mathworks.co.uk/matlabcentral/answers/14751-greek-alphabet-and-latex-commands-not-a-question
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!