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

2 Kommentare

Adam Danz
Adam Danz am 10 Mai 2019
Do you want to set the x tick labels?
Soham Shah
Soham Shah am 10 Mai 2019
yes how can I do that?

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Adam Danz
Adam Danz am 10 Mai 2019
Bearbeitet: Adam Danz am 10 Mai 2019

0 Stimmen

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

Weitere Antworten (0)

Kategorien

Mehr zu Graphics Object Properties finden Sie in Hilfe-Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by