%

% crude attempt at changing the viewing angles.  Run this script after plotbot

% and it pops up a couple of sliders to allow changing the viewpoint.  Should

% be an integral part of plotbot, along with rewind button...

%

fig = gcf;

%clf



sli_azm = uicontrol(fig, 'Style', 'slider', ...

	'Position', [40 10 120 20], ...

	'Min', -180, 'Max', 180, 'Value', 30, ...

	'Callback', [ ...

	'set(azm_cur,''String'',',...

		'num2str(get(sli_azm,''Val''))),',...

	'set(gca,''View'',',...

	'[get(sli_azm,''Val''),get(sli_elv,''Val'')])']);



sli_elv = uicontrol(fig, 'Style', 'slider', ...

	'Position', [230 10 120 20], ...

	'Min', -90, 'Max', 90, 'Value', 30, ...

	'Callback', [ ...

	'set(elv_cur,''String'',',...

		'num2str(get(sli_elv,''Val''))),',...

	'set(gca,''View'',',...

	'[get(sli_azm,''Val''),get(sli_elv,''Val'')])']);



azm_min = uicontrol(fig,...

	'Style', 'text', ...

	'Pos', [10 10 30 20], ...

        'BackGroundColor',[0 1 0],...

	'String', num2str(get(sli_azm, 'Min')));



elv_min = uicontrol(fig,...

	'Style', 'text', ...

	'Pos', [200 10 30 20], ...

        'BackGroundColor',[0 1 1],...

	'String', num2str(get(sli_elv, 'Min')));



azm_max = uicontrol(fig,...

	'Style', 'text', ...

	'Pos', [160 10 30 20], ...

        'BackGroundColor',[0 1 0],...

	'String', num2str(get(sli_azm, 'Max')));



elv_max = uicontrol(fig,...

	'Style', 'text', ...

	'Pos', [350 10 30 20], ...

        'BackGroundColor',[0 1 1],...

	'String', num2str(get(sli_elv, 'Max')));



azm_label = uicontrol(fig, ...

	'Style', 'text', ...

	'Pos', [40 40 65 20], ...

        'BackGroundColor',[0 1 0],...

	'String', 'Azimuth');



elv_label = uicontrol(fig, ...

	'Style', 'text', ...

	'Pos', [230 40 65 20], ...

        'BackGroundColor',[0 1 1],...

	'String', 'Elevation');



azm_cur = uicontrol(fig, ...

	'Style', 'text', ...

	'Pos', [110 40 50 20], ...

        'BackGroundColor',[0 1 0],...

	'String', num2str(get(sli_azm, 'Value')));



elv_cur = uicontrol(fig, ...

	'Style', 'text', ...

	'Pos', [300 40 50 20], ...

        'BackGroundColor',[0 1 1],...

	'String', num2str(get(sli_elv, 'Value')));

