add scrollbar to figure with subplots

2019-02-27 11:07发布

问题:

I have a m-file which should show about 20 images in one figure. so now I would like to know how to add a scrollbar to the figure.

currently, my code is doing something like this:

    figure('Name','Results');
for a=1:20
     img_result = imread(userinput);
     %Process image; img_result
     .
     .
     .
     subplot(5,1,a);
     imshow(img_result);
end 

if i am using this code the images are getting resized to small icons. any ideas?

回答1:

I believe this is what you're looking for: Scrolling Figure Demo by Evan Brooks