xlabel with non italic mu in latex

24 views (last 30 days)
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?

Accepted Answer

Adam Danz
Adam Danz on 16 Nov 2018
Edited: Adam Danz on 16 Nov 2018
You can enter the µ character directly; no need for latex.
xlabel('{\itt} / µs', 'interpreter', 'tex')
  3 Comments
Adam Danz
Adam Danz on 27 Feb 2020
Try this.
>> [char(956), ' = 68']
ans =
'μ = 68'
>> [char(963), ' = 4']
ans =
'σ = 4'
Rick
Rick on 27 Feb 2020
Amazing! Thanks very much Adam.
Rick

Sign in to comment.

More Answers (0)

Categories

Find more on Line Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!