GUI graph with strings as axis
조회 수: 15 (최근 30일)
이전 댓글 표시
how can I make several strings the x-axis for a graph in a GUI
댓글 수: 2
채택된 답변
Adam Danz
2019년 5월 10일
편집: Adam Danz
2019년 5월 10일
Here's a demo
ax = axes(); %Instead of this line, use the axis handle from your GUI handles
xTickVals = [2,4,6]; %<-- where you want the ticks
xlim([1,7]) %<-- make sure the ticks are within range
xTickLables = {'RO', 'BG', 'TR'}; %<-- your tick labels
set(ax, 'XTick', xTickVals, 'XTickLabels', xTickLables) % <-- set the ticks & labels
댓글 수: 0
추가 답변 (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!