how to change axis to text format
이전 댓글 표시
How can I change x axis to months format
ex: Jan instead of 1, and Feb instead of 2

댓글 수: 9
Paresh yeole
2020년 5월 3일
Use xticklabels
xticks(1:12)
xticklabels({'Jan','Feb','Mar',...)
Ibrahim AlZoubi
2020년 5월 3일
Paresh yeole
2020년 5월 3일
The vectors A,B,C are not of same length.
Size of vector B is 1*13.
Also, vector C is not defined correctly.
Ibrahim AlZoubi
2020년 5월 3일
Ibrahim AlZoubi
2020년 5월 3일
Ibrahim AlZoubi
2020년 5월 3일
Paresh yeole
2020년 5월 3일

It works:
plot(months,A)
hold on
plot(months,B)
plot(months,C)
xticks(1:12)
xticklabels({'Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec'})
Ibrahim AlZoubi
2020년 5월 3일
Ibrahim AlZoubi
2020년 5월 3일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Labels and Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
