필터 지우기
필터 지우기

ginput on tiled layout in app designer

조회 수: 7 (최근 30일)
LukeJes
LukeJes 2023년 11월 21일
댓글: Voss 2023년 11월 21일
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!

채택된 답변

Voss
Voss 2023년 11월 21일
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
LukeJes
LukeJes 2023년 11월 21일
Thanks for that!
Voss
Voss 2023년 11월 21일
You're welcome!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Visual Exploration에 대해 자세히 알아보기

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by