Effacer les filtres
Effacer les filtres

ginput on tiled layout in app designer

7 vues (au cours des 30 derniers jours)
LukeJes
LukeJes le 21 Nov 2023
Commenté : Voss le 21 Nov 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!

Réponse acceptée

Voss
Voss le 21 Nov 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 commentaires
LukeJes
LukeJes le 21 Nov 2023
Thanks for that!
Voss
Voss le 21 Nov 2023
You're welcome!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Visual Exploration dans Help Center et File Exchange

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by