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

2 comentarios

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

Iniciar sesión para comentar.

 Respuesta aceptada

Adam Danz
Adam Danz el 10 de Mayo de 2019
Editada: Adam Danz el 10 de Mayo de 2019
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

Más respuestas (0)

Categorías

Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.

Preguntada:

el 10 de Mayo de 2019

Editada:

el 10 de Mayo de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by