LABELLING PLOTS IN MATLAB
조회 수: 6 (최근 30일)
이전 댓글 표시
I want to label my x-axis plot as three months June, July and August. I am plotting datasets against months , how do i label the x-axis
댓글 수: 0
답변 (1개)
Ameer Hamza
2020년 11월 13일
If you have numeric values on x and y axis, you can set the xticklabels
x = linspace(1, 3);
y = rand(size(x));
plot(x, y);
xticks([1 2 3])
xticklabels({'June', 'July', 'August'})
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Axis Labels에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!