How can I use greek symbols in plot labels?

252 Ansichten (letzte 30 Tage)
Merve
Merve am 4 Okt. 2014
Kommentiert: Walter Roberson am 21 Nov. 2021
Hi,
I have a plot x axis of which is formed of an array like [ 20 25 30...]
But I want x-axis to appear like lambda/20 lambda/25 etc.
Could you please help me?

Akzeptierte Antwort

Mischa Kim
Mischa Kim am 4 Okt. 2014
Bearbeitet: Mischa Kim am 4 Okt. 2014
Merve, you mean something like
lambda = 20:5:40;
y = 1./lambda;
plot(lambda,y)
xlabel('{\lambda}')
set(gca,...
'xtick',lambda,...
'xticklabel',{'l/20' 'l/25' 'l/30' 'l/35' 'l/40'},'fontname','symbol')

Weitere Antworten (2)

Sehrish  Bibi
Sehrish Bibi am 21 Nov. 2021
How to write beta symbol in matlab for labeling graphs
  1 Kommentar
Walter Roberson
Walter Roberson am 21 Nov. 2021
xlabel('$\beta$', 'interpreter', 'latex')
ylabel('\beta', 'interpreter', 'tex')

Melden Sie sich an, um zu kommentieren.


Camilo Malagon Nieto
Camilo Malagon Nieto am 23 Mai 2019
A good info of how to deal with the greek characters syntaxis can can be found at.

Kategorien

Mehr zu Labels and Annotations finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by