How can I maximize a tiled layout in a live script?

조회 수: 25 (최근 30일)
Jim McIntyre
Jim McIntyre 2024년 1월 26일
댓글: Jim McIntyre 2024년 1월 26일
I have a live script, but there's some charts that I'd like the user to interact with using ginput. To that end, I'd like to display these full screen (essentially acting like a modal dialog). I know I can do that for a figure using:
Fig1 = figure('NumberTitle', 'off', 'Name', 'Select area to process');
Fig1.WindowState = 'maximized';
...
while true
[x, ~, button] = ginput(1); % allow user to select data in the plot
However, I'd also like to do the same thing for a tiled layout that will show three charts. So something like this...
Fig2 = tiledlayout(3,1);
Fig2.WindowState = 'maximized';
ax = gobjects(1,3);
ax(1) = nexttile();
...
but apparently tilelayout doesn't have a WindowState property. So it is possible to do this? How?
also, should I be doing something to explicitly associate ax with Fig2?

채택된 답변

Matt J
Matt J 2024년 1월 26일
TL=tiledlayout(3,1);
Fig2=TL.Parent;
  댓글 수: 1
Jim McIntyre
Jim McIntyre 2024년 1월 26일
Thank you. So I tried that and I moved the myLayout around several different ways, but it still wouldn't actually pop out a separate window until I added the ginput line.

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by