how can I make several strings the x-axis for a graph in a GUI

댓글 수: 2

Adam Danz
Adam Danz 2019년 5월 10일
Do you want to set the x tick labels?
Soham Shah
Soham Shah 2019년 5월 10일
yes how can I do that?

댓글을 달려면 로그인하십시오.

 채택된 답변

Adam Danz
Adam Danz 2019년 5월 10일
편집: Adam Danz 2019년 5월 10일

0 개 추천

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개)

카테고리

도움말 센터 및 File Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

질문:

2019년 5월 10일

편집:

2019년 5월 10일

Community Treasure Hunt

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

Start Hunting!

Translated by