how to change axis to text format

1 view (last 30 days)
How can I change x axis to months format
ex: Jan instead of 1, and Feb instead of 2
  9 Comments
Ibrahim AlZoubi
Ibrahim AlZoubi on 3 May 2020
Oh the problem was i used matlab 2013 !
thank you!

Sign in to comment.

Accepted Answer

Ajay Kumar
Ajay Kumar on 3 May 2020
Use xticklables for eg:
x = linspace(0,12);
y = x.^2;
plot(x,y)
xticks([0:1:12])
xticklabels({'','Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'})
  5 Comments
Ibrahim AlZoubi
Ibrahim AlZoubi on 3 May 2020
Oh the problem was i used matlab 2013 !
thank you!

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!

Translated by