How can I use greek symbols in plot labels?

233 visualizaciones (últimos 30 días)
Merve
Merve el 4 de Oct. de 2014
Comentada: Walter Roberson el 21 de Nov. de 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?

Respuesta aceptada

Mischa Kim
Mischa Kim el 4 de Oct. de 2014
Editada: Mischa Kim el 4 de Oct. de 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')

Más respuestas (2)

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

Iniciar sesión para comentar.


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

Categorías

Más información sobre Labels and Annotations en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by