Multiple Row Xlabels in Matlab App Designer UIFigure UIAxes

7 次查看(过去 30 天)
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!

回答(1 个)

Kevin Holly
Kevin Holly 2023-3-24
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 个评论
Gillian Weir
Gillian Weir 2023-3-24
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 2023-3-24
@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';

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Develop uifigure-Based Apps 的更多信息

产品


版本

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by