How to use scroll bar to view number of axes in the given figure window.

3 ビュー (過去 30 日間)
Shivaputra Narke
Shivaputra Narke 2012 年 9 月 20 日
Hello everyone!
Can somebody will tell me how I can adjust nearly 16 axes in one figure window and can see by using scroll bar(or slider)?
Thanks

採用された回答

Matt Fig
Matt Fig 2012 年 9 月 20 日
Here is an example.
function [S] = scroll_plot()
% Scroll through 8 plots.
S.fh = figure('units','pixels',...
'position',[500 500 200 260],...
'menubar','none',...
'name','scroll_plot',...
'numbertitle','off',...
'resize','off');
S.sl = uicontrol('style','slide',...
'unit','pix',...
'position',[180 10 20 240],...
'min',1,'max',8,...
'sliderstep',[1/7 1/7],...
'value',1);
S.V = 1; % The value of the slider.
x = 0:.01:1; % Make plots.
for ii = 0:7
S.ax(ii+1) = axes('units','pix','pos',[20 30+(260*ii) 150 220]);
plot(x,x.^ii);
end
set(S.sl,'callback',{@sl_call,S})
function [] = sl_call(varargin)
% Callback for slider.
S = varargin{3}; % Get the structure.
V = get(S.sl,'value');
for ii = 0:7
P = get(S.ax(ii+1),'pos');
set(S.ax(ii+1),'pos',P-[0 260*(sign(V - S.V)) 0 0])
end
S.V = V;
set(S.sl,'callback',{@sl_call,S});
  1 件のコメント
Shivaputra Narke
Shivaputra Narke 2012 年 9 月 23 日
Thanks Matt,but my question is different. My first doubt is how we
can add more axes in one figure window and when user scroll down
then he should see the graph on the next axes.. whether is it
possible in matlab GUI????

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by