Effacer les filtres
Effacer les filtres

Multiple Row Xlabels in Matlab App Designer UIFigure UIAxes

7 vues (au cours des 30 derniers jours)
Gillian Weir
Gillian Weir le 22 Mar 2023
Commenté : Adam Danz le 24 Mar 2023
Hi there,
I am trying to figure out the simplest/cleanest way to place multiple row (in my case - two rows) xlabels into a UIFigure in Matlab App Designer.
Thanks!

Réponses (1)

Kevin Holly
Kevin Holly le 24 Mar 2023
fig = figure;
app.UIAxes = uiaxes(fig);
You can place the following line in the startup function of your app.
xlabel(app.UIAxes,{'xlabel 1';'xlabel 2'})
  6 commentaires
Gillian Weir
Gillian Weir le 24 Mar 2023
Ah ok - I just opened that on my computer with 2021a and that must be the issue. Thanks for walking through this with me - appreciate it!
Adam Danz
Adam Danz le 24 Mar 2023
@Gillian Weir it looks like your tick label interpreter is set to none or latex. This solution requires a tex interpreter.
app.UIAxes.TickLabelInterpreter= 'tex';

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop uifigure-Based Apps dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by