MATLAB: Is it possible to save the entire image when I save a figure with an IMSCROLLPANEL in MATLAB 7.5 (R2007b)

MATLAB

I can create a figure with a large image and then place a scrollbar on it using IMSCROLLBAR. If I save that figure and then load it again, I cannot scroll around the image anymore. The scrollbars move, but the image does not.
For example:
hFig = figure('Toolbar','none',...
'Menubar','none');
hIm = imshow('saturn.png');
hSP = imscrollpanel(hFig,hIm);
set(hSP,'Units','normalized',...
'Position',[0 .1 1 .9])
saveas(gcf,'testfig.fig');
When you open this FIG file,
open('testfig.fig')
MATLAB opens a figure window and displays the image with scroll bars but you cannot use the scroll bars to view different parts of the image. The scroll bars move but the image does not.

Best Answer

The ability to save the entire image displayed in a figure that, when you have used IMSCROLLPANEL to display only a portion of the image with scroll bars in the figure, is not available in MATLAB.
To work around the issue, create a script which loads the image data, plots it, and creates scrollbars on the figure. Run this script instead of opening a saved figure.
hFig = figure('Toolbar','none',...
'Menubar','none');
hIm = imshow('saturn.png');
hSP = imscrollpanel(hFig,hIm);
set(hSP,'Units','normalized',...
'Position',[0 .1 1 .9])