xlabel with non italic mu in latex

19 次查看(过去 30 天)
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