GUI graph with strings as axis

5 ビュー (過去 30 日間)
Soham Shah
Soham Shah 2019 年 5 月 10 日
編集済み: Adam Danz 2019 年 5 月 10 日
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 日
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 件)

カテゴリ

Help Center および File ExchangeAxis Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by