Plotting a scatter graph with a categorical X axis
조회 수: 38 (최근 30일)
이전 댓글 표시
I have a scatter graph as shown above but I want to alter the x axis so that I can have a category for every jump in 10. So basically I would like to replace each interval of 10 with a word or 2 to represent a category
댓글 수: 0
답변 (1개)
Scott MacKenzie
2023년 5월 3일
Just follow your chart function with code to add tick labels at 5, 15, 25, etc. Something like this should work:
xticks(5:10:55);
xticklabels({'first', 'second', 'third', 'fourth', 'fifth', 'sixth'});
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Scatter Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!