% 加入一个滚动条来显示比较大的图形
figure;
rand('state',0);
X=rand(100,100);
imshow(X,[]);
yy=ylim;
axis on
set(gcf,'position',[154 42 654 571])
aa=get(gca,'position');
sss=uicontrol(gcf,'style','slider',...
'unit','normalized','position',...
[aa(1)+aa(3),aa(2),0.05,aa(4)],...
'BackgroundColor',[0.6 0.6 0.6],'ForegroundColor','r',...
'string','color','fontsize',14,'SliderStep',[0.01 0.02],...
'value',0.5,'callback',['aa=get(sss,''value'');',...
'set(gca,''ylim'',round(200*(aa-0.5))+yy);']);
阅读(953) | 评论(0) | 转发(0) |