필터 지우기
필터 지우기

window for several figures.

조회 수: 1 (최근 30일)
David Epstein
David Epstein 2018년 7월 31일
댓글: David Epstein 2018년 8월 13일
MATLAB Version: 9.4.0.813654 (R2018a), running under MacOS 10.13.6. I run a script that computes 3 figures. This produces 3 thumbnails. When I click on the thumbnails one by one, they open into a window entitled Figures. I get 3 tabs, labelled Figure 1, Figure 2 and Figure 3. I want to avoid the step "click on them". Instead I want to go directly to the final stage described. Here is an mwe, with any three image matrices:
clearvars;
close all;
load('test.mat');
figure; imshow(img);
figure; imshow(f_img);
figure; imshow(sq_img);

답변 (1개)

Image Analyst
Image Analyst 2018년 7월 31일
Just creating figures with images in axes on them won't popup another figure with tabs in it when you click on any of the images, unless you set up a callback to do that when you clicked on the image. This doesn't do that:
clearvars;
close all;
% load('test.mat');
img = imread('peppers.png');
f_img = imread('onion.png');
sq_img = imread('cameraman.tif');
figure; imshow(img);
figure; imshow(f_img);
figure; imshow(sq_img);
Are you sure you're showing us ALL the code? If so, attach 'test.mat' and a screenshot.
  댓글 수: 4
Image Analyst
Image Analyst 2018년 8월 3일
>> folder = fileparts(which('peppers.png')) % Determine folder where image lives.
David Epstein
David Epstein 2018년 8월 13일
thanks. I didn't think of that. In Unix "which" works on commands only, not on filenames. It seems that, if a file is on the Matlab path, then "which" will find it, which is very useful.

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

카테고리

Help CenterFile Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by