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