How to display Greek characters under each barchart culumn?

Hi
I want to the assign greek character below each bar chart column. However, it is not displaying the greek characters
The example of the code is below:
Number=[10 30 50 60 18 20]
bar(Number)
set(gca,'xticklabel',{'\alpha','M_{q}','M_n','Z_alpha','zeta','\omega'})
Hear from you people!

 Respuesta aceptada

Did your code properly display the first alpha? That one worked for me. I then tweaked the other ones for the small syntax errors you made:
Number=[10 30 50 60 18 20]
bar(Number)
set(gca,'xticklabel',{'\alpha','M_{q}','M_n','Z_{alpha}','\zeta','\omega'})

Más respuestas (1)

yashvin
yashvin el 1 de Nov. de 2014
Hi,
Thanks for your response
No . It display the alpha as \alpha. Pleas see the image.

1 comentario

What do you get for
get(gca,'TickLabelInterpreter')
Try
set(gca,'TickLabelInterpreter','tex')

Iniciar sesión para comentar.

Categorías

Más información sobre Labels and Annotations en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 1 de Nov. de 2014

Comentada:

el 1 de Nov. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by