MATLAB Answers

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
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


Answer by Azzi Abdelmalek
on 10 May 2013

By default, y ticks are horizontal

  1 Comment

jan

feb

march

i should get as like mentioned above


Answer by David Sanchez
on 10 May 2013

Here you are:

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

  1 Comment

how to increase space between jan and feb


Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply today