Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

how to label y axis of a graph in horizontal manner

how to label y axis of a graph in horizontal manner... my output should be jan feb march

0 Comments

Tags

Products

3 Answers

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 10 May 2013
Accepted answer

Example

y=[1 2 3 4];
plot(y),
set(gca,'ytick',y,'yticklabel',{'Jan','Feb','March','April'})

1 Comment

check if y=[1 2 4 3]; i am getting error

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Answer by Azzi Abdelmalek

Azzi Abdelmalek (view profile)

on 10 May 2013

By default, y ticks are horizontal

1 Comment

jan

feb

march

i should get as like mentioned above

Azzi Abdelmalek

Azzi Abdelmalek (view profile)

Answer by David Sanchez

David Sanchez (view profile)

on 10 May 2013

Here you are:

ylabel({'jan';'feb';'march'},'Rotation',0)

1 Comment

how to increase space between jan and feb

David Sanchez

David Sanchez (view profile)

Contact us