ginput on tiled layout in app designer

4 visualizaciones (últimos 30 días)
LukeJes
LukeJes el 21 de Nov. de 2023
Comentada: Voss el 21 de Nov. de 2023
Hi there,
I'm trying to get ginput to work on a tiled chart layout in matlab's app designer. I tried to follow the advice from the links below, but I keep just getting a separate figure pop up outside of the app. I am using r2020b.
An example exerpt of the code that I have tried to use. app.ax1 corresponds to the top plot, and app.ax2 to the bottom. Both are contained within app.tiledlayout1. Ideally I would like to be able to use ginput on either plot (anywhere within app.tiledlayout1):
plot(app.ax1,app.braMarkerDataFiltered(:,15))
ylabel(app.ax1,'Z','FontWeight',"bold");
title(app.ax1,'STERNUM MARKER',"FontSize",10);
plot(app.ax2,app.braMarkerDataFiltered(:,42))
ylabel(app.ax2,'Z','FontWeight',"bold");
title(app.ax2,'HEEL MARKER',"FontSize",10);
app.tiledlayout1.HandleVisibility = 'on';
ginput;
app.tiledlayout1.HandleVisibility = 'off';
Any help would be much appreciated!

Respuesta aceptada

Voss
Voss el 21 de Nov. de 2023
Try setting the HandleVisibility of the uifigure (not the tiledlayout), e.g.:
app.UIFigure.HandleVisibility = 'on';
set(0,'CurrentFigure',app.UIFigure); % one of the links has this and one doesn't
ginput;
app.UIFigure.HandleVisibility = 'off';
  2 comentarios
LukeJes
LukeJes el 21 de Nov. de 2023
Thanks for that!
Voss
Voss el 21 de Nov. de 2023
You're welcome!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Productos


Versión

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by