xlabel with non italic mu in latex

조회 수: 17 (최근 30일)
Tim Krzyzanowski
Tim Krzyzanowski 2018년 11월 16일
댓글: Rick 2020년 2월 27일
Hello i want to label my x-axis with Latexcode.
I want it in this format
t / µs
as you can see i need to have the t in italic and the µs in non italic. I used to try this code:
xlabel(['$\it t/ \mathrm{\mu s}$'],'interpreter','latex')
but the Latex interpreter is printing the \mu always in italic is there any posibility to solve this?

채택된 답변

Adam Danz
Adam Danz 2018년 11월 16일
편집: Adam Danz 2018년 11월 16일
You can enter the µ character directly; no need for latex.
xlabel('{\itt} / µs', 'interpreter', 'tex')
  댓글 수: 3
Adam Danz
Adam Danz 2020년 2월 27일
Try this.
>> [char(956), ' = 68']
ans =
'μ = 68'
>> [char(963), ' = 4']
ans =
'σ = 4'
Rick
Rick 2020년 2월 27일
Amazing! Thanks very much Adam.
Rick

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by