%create a figure to house the GUI
figure

handles.color = [];

%create a "push button" user interface (UI) object
handles.button = uicontrol('style', 'pushbutton',...
                    'string', 'Update Color',...
                    'units', 'normalized',...
                    'position', [0.3 0 0.4 0.2]);

%create an annotation object 
ellipse_position = [0.4 0.6 0.1 0.2];
handles.ellipse = annotation('ellipse',ellipse_position,...
                    'facecolor', [1 0 0]);
                
%create an editable textbox object
handles.edit_box = uicontrol('style','edit',...
                    'units', 'normalized',...
                    'position', [0.3 0.4 0.4 0.1]);


            
%Slider object to control ellipse size
handles.slider = uicontrol('style','Slider',...        
            'Min',0.5,'Max',2,'Value',1,...
            'units','normalized',...
            'position',[0.1    0.2    0.08    0.25]);
        
uicontrol('Style','text',...
            'units','normalized',...
            'position',[0    0.45    0.2    0.1],...
            'String','Ellipse Size')

      
 set(handles.button, 'callback', {@eg_fun,handles });
 set(handles.slider,'callback',{@change_size,handles});
 
 