function ardemo(Action,varargin)
%ARDEMO Interactive axes properties demonstration
%   Demonstrates the uses and interactions of the Data
%   Aspect Ratio, Plot Box Aspect Ratio and X-, Y-, and
%   Z-axes limits properties.
%
%   See also AXES.

%   Karen Gondoly 6-28-96
%   Copyright (c) 1984-98 by The MathWorks, Inc.
%       $Revision: 1.13 $


if nargin==0 & isempty(findobj('Tag','AspectDemo')),  % Demo is being initialized
   Action='initialize';
elseif nargin==0 & findobj('Tag','AspectDemo'),       % Demo is already open
   Action='None';
end

switch Action

   %---Initialize the demonstration
case 'initialize'
   LocalOpenFig;

   %----Toggles the Auto/Manual labels on the buttons
case 'ToggleButton'

   PropPopup=gcbo;
   PropString=get(PropPopup,'UserData');
   PropSetting=popupstr(PropPopup);
   PropName=get(PropString,'Tag');

   switch PropSetting
   case 'manual'
      eval(['set(findobj(gcf,''Tag'',''ActiveAxes''),''',PropName,'Mode'',''manual'');'])
      set(findobj(gcf,'Tag','StatusText'),'String', ...
         [PropName,'Mode changed to manual']);
      ardemo('SetProperty',PropPopup);
   case 'auto'
      set(findobj(gcf,'Tag','StatusText'),'String', ...
         [PropName,'Mode changed to auto']);
      eval(['set(findobj(gcf,''Tag'',''ActiveAxes''),''',PropName,'Mode'',''auto'');'])
      ardemo('Refresh');
   end % switch PropSetting

   %------Updates the edit boxes with the current axes properties
case 'SetProperty'

   PropPopup=varargin{1};
   PropString=get(PropPopup,'UserData');
   PropName=get(PropString,'Tag');
   PropSetting=popupstr(PropPopup);

   %----Error checking for brackets on string
   newstr=deblank(get(PropString,'String'));
   if ~strcmp(newstr(1),'[');
      newstr=['[',newstr];
   end

   if ~strcmp(newstr(length(newstr)),']');
      newstr=[newstr,']'];
   end

   tempval=eval(newstr,'[]');
   oldval=get(PropString,'UserData');
   if ~isequal(length(tempval),length(oldval)),
      newval=oldval;
      set(findobj(gcf,'Tag','StatusText'),'String', ...
         ['Warning: An invalid property value has been entered. Reverting to ',PropName,' = ',mat2str(oldval)]);
   else
      newval=tempval;
      set(findobj(gcf,'Tag','StatusText'),'String', ...
         [PropName,' manually changed to ',mat2str(newval,3)]);
   end

   eval(['set(findobj(gcf,''Tag'',''ActiveAxes''),''',PropName,''',',mat2str(newval),')']);

   ardemo('Refresh');

   %------Updates the edit boxes with the current axes properties 
case 'Refresh'

   ax=findobj(gcf,'Tag','ActiveAxes');
   set(findobj(gcf,'Tag','DataAspectRatio'),'string',mat2str(get(ax,'DataAspectRatio'),3));
   set(findobj(gcf,'Tag','PlotBoxAspectRatio'),'string',mat2str(get(ax,'PlotBoxAspectRatio'),3));
   set(findobj(gcf,'Tag','XLim'),'string',mat2str(get(ax,'XLim'),3));
   set(findobj(gcf,'Tag','YLim'),'string',mat2str(get(ax,'YLim'),3));
   set(findobj(gcf,'Tag','ZLim'),'string',mat2str(get(ax,'ZLim'),3));

   DARMode=get(ax,'DataAspectRatioMode');
   if strcmp(DARMode,'auto')
      set(findobj(gcf,'Tag','DARbutton'),'value',1);
   else
      set(findobj(gcf,'Tag','DARbutton'),'value',2);
   end % if/else strcmp(DARMode)

   PBARMode=get(ax,'PlotBoxAspectRatioMode');
   if strcmp(PBARMode,'auto')
      set(findobj(gcf,'Tag','PBARbutton'),'value',1);
   else
      set(findobj(gcf,'Tag','PBARbutton'),'value',2);
   end % if/else strcmp(PBARMode)

   XMode=get(ax,'XlimMode');
   if strcmp(XMode,'auto')
      set(findobj(gcf,'Tag','Xbutton'),'value',1);
   else
      set(findobj(gcf,'Tag','Xbutton'),'value',2);
   end % if/else strcmp(XMode)

   YMode=get(ax,'YlimMode');
   if strcmp(YMode,'auto')
      set(findobj(gcf,'Tag','Ybutton'),'value',1);
   else
      set(findobj(gcf,'Tag','Ybutton'),'value',2);
   end % if/else strcmp(YMode)

   ZMode=get(ax,'ZlimMode');
   if strcmp(ZMode,'auto')
      set(findobj(gcf,'Tag','Zbutton'),'value',1);
   else
      set(findobj(gcf,'Tag','Zbutton'),'value',2);
   end % if/else strcmp(ZMode)

   %-------Plot the 2D picture
case '2D'
   TwoDbutton=findobj(gcf,'Tag','2Dbutton');
   val=get(TwoDbutton,'Value');
   if val==0, 
      set(TwoDbutton,'value',1);
   elseif val==1,
      set(findobj(gcf,'Tag','3Dbutton'),'value',0);
      set(findobj(gcf,'Tag','Manbutton'),'value',0);

      set(findobj(gcf,'Tag','StatusText'),'String', ...
         'Please wait while the 2D data is loaded');

      LocalMouse;
      ardemo('Refresh')
   end % if/else val

   %---Plot the 3D picture
case '3D'
   ThreeButton=findobj(gcf,'Tag','3Dbutton');
   val=get(ThreeButton,'Value');
   if val==0,
      set(ThreeButton,'value',1);
   elseif val==1, 
      set(findobj(gcf,'Tag','Manbutton'),'value',0);
      set(findobj(gcf,'Tag','2Dbutton'),'value',0);
      set(findobj(gcf,'Tag','StatusText'),'String','Please wait while the 3D data is loaded');
      L=membrane(1);
      x = -1:1/15:1;
      surf(x,x',L);
      set(gca,'Tag','ActiveAxes');
      set(findobj(gcf,'Tag','StatusText'),'String', ...
         'Use the controls to see the effects of various axes properties on 3D plots');
      ardemo('Refresh');
   end % if/else val

   %---Plot the user specified data
case 'Plot'
   ManButton=findobj(gcf,'Tag','Manbutton');
   val=get(ManButton,'Value');
   if val==0 & ~(get(findobj(gcf,'Tag','3Dbutton'),'Value')) & ~(get(findobj(gcf,'Tag','2Dbutton'),'Value')),
      set(ManButton,'value',1);
   elseif val==1,
      set(findobj(gcf,'Tag','3Dbutton'),'value',0);
      set(findobj(gcf,'Tag','2Dbutton'),'value',0);
      PlotStr=get(findobj(gcf,'Tag','PlotText'),'String');
      if ~isempty(PlotStr);
         eval(PlotStr);
         set(gca,'Tag','ActiveAxes');
         set(findobj(gcf,'Tag','StatusText'),'String','User-Defined plot');
         ardemo('Refresh');
         hold off
      else
         set(findobj(gcf,'Tag','StatusText'),'String', ...
            'Enter a valid plot command or function');
      end % if ~isempty(PlotStr)
   end % if/else val

   %-------On-line help
case 'Help'
   HelpStr={'Aspect Ratio Demonstration';
      '';
      'The purpose of the demonstration is to present a graphical ';
      'interpretation of various axes properties and how they interact. ';
      'The white box represents a constant axes with the same ';
      'position property as the active plotting axis. Use it as a ';
      'reference as you change the other properties, including: ';
      '1) Data Aspect Ratio: The relative scaling of the data units along ';
      'the three axes; 2) Plot Box Aspect Ratio: The relative scaling ';
      'of the plotbox along the three axes; and 3) The X,Y, and Z axis limits.';
      '';
      'Use the radio buttons to plot the default 2D or 3D plots or enter';
      ' the name of a plotting function or a valid plotting command in';
      ' the edit box and select its radio button.';
      '';
      'Use the popup menus to toggle the setting of the axes properties. ';
      'In a manual setting, use the edit boxes to enter the ';
      'desired property value '};

   helpwin(HelpStr,'ARDEMO Help');

   %-------Bring Axes Demo figure to front, if it already exists
case 'None'

   figure(findobj(gcf,'Tag','AspectDemo'))

end % switch

%---------------------------------Internal functions------------------------------------

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% LocalOpenFig %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
function LocalOpenFig();

StdUnit = 'point';
StdColor = get(0,'DefaultUIcontrolBackgroundColor');
PointsPerPixel = 72/get(0,'ScreenPixelsPerInch');

%-----Open a new figure
a = figure('Color',[0.8 0.8 0.8], ...
   'Position',[25 45 560 420], ...
   'IntegerHandle','off', ...
   'Number','off',...  
   'Name','Axes Properties Demonstration',...
   'Tag','AspectDemo');

%-----Add the axes
%-------Reference axis
b = axes('Parent',a, ...
   'Units',StdUnit, ...
   'Box','on', ...
   'Color',[1 1 1], ...
   'Position',PointsPerPixel*[18 179 289 227], ...
   'Units','Normalized',...
   'XColor',[0 0 0], ...
   'XGrid','off', ...
   'XTick',[],...
   'YColor',[0 0 0], ...
   'YGrid','off', ...
   'YTick',[], ...
   'ZColor',[0 0 0], ...
   'ZGrid','off', ...
   'ZTick',[]);

set(get(b,'XLabel'),'visible','off');
set(get(b,'YLabel'),'visible','off');
set(get(b,'ZLabel'),'visible','off');

%-------Plotting axis
b = axes('Parent',a, ...
   'Units',StdUnit, ...
   'Color',[1 1 1], ...
   'Position',PointsPerPixel*[18 179 289 227], ...
   'Units','Normalized',...
   'Tag','ActiveAxes', ...
   'Box','on', ...
   'XColor',[0 0 0], ...
   'XGrid','on', ...
   'YColor',[0 0 0], ...
   'YGrid','on', ...
   'ZColor',[0 0 0], ...
   'ZGrid','on');

%---Add the 3D plot as the default
L=membrane(1);
x = -1:1/15:1;
surf(x,x',L);
set(gca,'Tag','ActiveAxes');

%--- Add various frames
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[0.8 0.8 0.8], ...
   'Position',PointsPerPixel*[312 123 235 284], ...
   'Units','Normalized',...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[312 70 235 44], ...
   'Units','Normalized',...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[321 351 217 48], ...
   'Units','Normalized',...
   'Tag','DARframe', ...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[321 296 217 48], ...
   'Units','Normalized',...
   'Tag','PBARframe', ...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[321 241 217 48], ...
   'Units','Normalized',...
   'Tag','Xframe', ...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[321 186 217 48], ...
   'Units','Normalized',...
   'Tag','Yframe', ... 
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[321 131 217 48], ...
   'Units','Normalized',...
   'Tag','Zframe', ...
   'Style','frame');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[14 70 292 88], ...
   'Units','Normalized',...
   'Style','frame');

%--- Add radio buttons for specifying type of plot
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[32 136 249 13], ...
   'Units','Normalized',...
   'Style','text',...
   'String','Select plot type');

b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'CallBack','ardemo(''2D'');', ...
   'Position',PointsPerPixel*[32 120 110 17], ...
   'Units','Normalized',...
   'String','2-D Default', ...
   'Style','radiobutton', ...
   'Tag','2Dbutton');

b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'CallBack','ardemo(''3D'');', ...
   'Position',PointsPerPixel*[32 103 110 17], ...
   'Units','Normalized',...
   'String','3-D Default', ...
   'Style','radiobutton', ...
   'Tag','3Dbutton', ...
   'Value',1);
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'CallBack','ardemo(''Plot'');', ...
   'Position',PointsPerPixel*[32 83 22 20], ...
   'Units','Normalized',...
   'Style','radiobutton', ...
   'Tag','Manbutton', ...
   'Value',0);

b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[54 83 235 20], ...
   'Units','Normalized',...
   'Style','edit', ...
   'Horiz','left', ...
   'callback','ardemo(''Plot'');',...
   'Tag','PlotText');

%---Add text to describe the various Axes property controls

b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 375 127 17], ...
   'Units','Normalized',...
   'String','Data Aspect Ratio', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 353 127 17], ...
   'Units','Normalized',...
   'String','DAR Mode', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 319 127 17], ...
   'Units','Normalized',...
   'String','Plot Box Aspect Ratio', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 298 127 17], ...
   'Units','Normalized',...
   'String','PBAR Mode', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 265 108 17], ...
   'Units','Normalized',...
   'String','X-Axis Limit', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 242 109 17], ...
   'Units','Normalized',...
   'String','XLim Mode', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 211 109 17], ...
   'Units','Normalized',...
   'String','Y-Axis Limit', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 188 109 17], ...
   'Units','Normalized',...
   'String','YLim Mode', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 157 109 17], ...
   'Units','Normalized',...
   'String','Z-Axis Limit', ...
   'Style','text');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'HorizontalAlignment','left', ...
   'Position',PointsPerPixel*[326 134 109 17], ...
   'Units','Normalized',...
   'String','ZLim Mode', ...
   'Style','text');

%---- Add controls for specifying the varous Axes properties

%-----DAR
DARstr = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 376 81 20], ...
   'Units','Normalized',...
   'String',mat2str(get(findobj(gcf,'Tag','ActiveAxes'),'DataAspectRatio'),3), ...
   'Style','edit', ...
   'Horiz','left', ...
   'UserData',[get(findobj(gcf,'Tag','ActiveAxes'),'DataAspectRatio')], ...
   'Callback',['ardemo(''SetProperty'',findobj(gcf,''Tag'',''DARbutton''));'],...
   'Tag','DataAspectRatio');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Style','popup', ...
   'Position',PointsPerPixel*[452 356 81 17], ...
   'Units','Normalized',...
   'String','auto|manual', ...
   'UserData',DARstr, ...
   'callback','ardemo(''ToggleButton'');', ...
   'Tag','DARbutton');

%-----PBAR
PBARstr = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 322 81 20], ...
   'Units','Normalized',...
   'String',mat2str(get(findobj(gcf,'Tag','ActiveAxes'),'PlotBoxAspectRatio'),3), ...
   'Style','edit', ...
   'Horiz','left', ...
   'UserData',[get(findobj(gcf,'Tag','ActiveAxes'),'PlotBoxAspectRatio')], ...
   'Callback',['ardemo(''SetProperty'',findobj(gcf,''Tag'',''PBARbutton''));'],...
   'Tag','PlotBoxAspectRatio');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'Style','popup', ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 301 81 18], ...
   'Units','Normalized',...
   'String','auto|manual', ...
   'UserData',PBARstr, ...
   'Callback','ardemo(''ToggleButton'');', ...
   'Tag','PBARbutton');

%-----Xlim
XlimStr = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 267 81 20], ...
   'Units','Normalized',...
   'String',mat2str(get(findobj(gcf,'Tag','ActiveAxes'),'XLim'),3), ...
   'Style','edit', ...
   'Horiz','left', ...
   'UserData',[get(findobj(gcf,'Tag','ActiveAxes'),'XLim')], ...
   'Callback',['ardemo(''SetProperty'',findobj(gcf,''Tag'',''Xbutton''));'],...
   'Tag','XLim');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Style','popup', ...
   'Position',PointsPerPixel*[452 246 81 18], ...
   'Units','Normalized',...
   'String','auto|manual', ...
   'UserData',XlimStr, ...
   'Callback','ardemo(''ToggleButton'');', ...
   'Tag','Xbutton');

%-----Ylim
YlimStr = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 212 81 20], ...
   'Units','Normalized',...
   'String',mat2str(get(findobj('Tag','ActiveAxes'),'YLim'),3), ...
   'Horiz','left', ...
   'Style','edit', ...
   'UserData',[get(findobj('Tag','ActiveAxes'),'YLim')], ...
   'Callback',['ardemo(''SetProperty'',findobj(gcf,''Tag'',''Ybutton''));'],...
   'Tag','YLim');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Style','popup', ...
   'Position',PointsPerPixel*[452 191 81 18], ...
   'Units','Normalized',...
   'String','auto|manual', ...
   'UserData',YlimStr, ...
   'Callback','ardemo(''ToggleButton'');', ...
   'Tag','Ybutton');

%-----Zlim
ZlimStr = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Position',PointsPerPixel*[452 157 81 20], ...
   'Units','Normalized',...
   'String',mat2str(get(findobj('Tag','ActiveAxes'),'ZLim'),3), ...
   'Style','edit', ...
   'Horiz','left', ...
   'UserData',[get(findobj('Tag','ActiveAxes'),'ZLim')], ...
   'Callback',['ardemo(''SetProperty'',findobj(gcf,''Tag'',''Zbutton''));'],...
   'Tag','ZLim');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',[1 1 1], ...
   'Style','popup', ...
   'Position',PointsPerPixel*[452 136 81 18], ...
   'Units','Normalized',...
   'String','auto|manual', ...
   'UserData',ZlimStr, ...
   'Callback','ardemo(''ToggleButton'');', ...
   'Tag','Zbutton');

%--- Add figure option buttons
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'Position',PointsPerPixel*[321 79 90 26], ...
   'Units','Normalized',...
   'String','Help', ...
   'callback','ardemo(''Help'');',...
   'Tag','Helpbutton');
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'CallBack','close(gcf)', ...
   'Position',PointsPerPixel*[448 79 90 26], ...
   'Units','Normalized',...
   'String','Close', ...
   'Tag','Closebutton');

%----Add a status box on the bottom of the figure
b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[14 18 534 44], ...
   'Units','Normalized',...
   'Style','frame');

b = uicontrol('Parent',a, ...
   'Unit',StdUnit, ...
   'BackgroundColor',StdColor, ...
   'Position',PointsPerPixel*[24 28 497 20], ...
   'Units','Normalized',...
   'Style','text',...
   'String','Default 3D view',...
   'Tag','StatusText');

set(a,'visible','on','HandleVisibility','callback');

%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%% LocalMouse %%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%
function LocalMouse();

ax=findobj('Tag','ActiveAxes');
theta=[1:1:360].*(pi/180);
R1=0.15;
R2=.25;

X1=R1.*cos(theta)+0.25;
Y1=R1.*sin(theta)+0.5;

fill(X1,Y1,'k')

hold on

X2=R1.*cos(theta)+0.75;
Y2=R1.*sin(theta)+0.5;

X3=R2.*cos(theta)+0.5;
Y3=R2.*sin(theta)+0.33;

fill(X2,Y2,'k')
fill(X3,Y3,'k')
hold off
set(gca,'Tag','ActiveAxes')

str='Use the controls to see the effects of various axes properties on 2D plots';
set(findobj('Tag','StatusText'),'String',str);
