function extractaxes(hObject, eventdata, parentfig, Empty_Button, Buttons, AxesD, AxesNMF, AxesAFS, AxesSOL, lcs, LCS, usmn, usmf)
data = get(Empty_Button,'UserData');
SelTyp = get(gcbf, 'SelectionType');

if strcmp(SelTyp,'alt') == 1
    pt = get(hObject, 'CurrentPoint');
    sz = get(hObject, 'Position');
    x = pt(1,1:2)./sz(1,3:4);
    
    posD   = get(AxesD, 'Position');
    posNMF = get(AxesNMF, 'Position');
    posAFS = get(AxesAFS, 'Position');
    posSOL = get(AxesSOL, 'Position');
    
    if (posD(1) < x(1)) && (x(1) < posD(1)+posD(3)) && (posD(2) < x(2)) && (x(2) < posD(2)+posD(4))
        tmpc = figure;
        copyobj(AxesD,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'data');
        ylabel(tmpa, 'absorption');
        
    elseif (posNMF(1) < x(1)) && (x(1) < posNMF(1)+posNMF(3)) && (posNMF(2) < x(2)) && (x(2) < posNMF(2)+posNMF(4))
        tmpc = figure;
        copyobj(AxesNMF,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'NMF factor(s)');
        
    elseif (posAFS(1) < x(1)) && (x(1) < posAFS(1)+posAFS(3)) && (posAFS(2) < x(2)) && (x(2) < posAFS(2)+posAFS(4))
        tmpc = figure;
        copyobj(AxesAFS,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'AFS');
        xlabel(tmpa,'\alpha','interpreter','tex');
        ylabel(tmpa,'\beta','interpreter','tex');
        
    elseif (posSOL(1) < x(1)) && (x(1) < posSOL(1)+posSOL(3)) && (posSOL(2) < x(2)) && (x(2) < posSOL(2)+posSOL(4))
        tmpc = figure;
        copyobj(AxesSOL,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'Solution');
        
    end
elseif get(usmn, 'Value') == 1
    if (isfield(data,'isExpert1') == 0) || (data.isExpert1 == 0)
        pt = get(AxesAFS, 'CurrentPoint');
        data.FixPoint1 = pt(1,1:2);
        
        actpwd = pwd;
        cd(data.calcp);
        
        if data.s == 3
            dlmwrite('wrap/FixPoint1.txt',data.FixPoint1','precision','%15.15e');
            onoffButton(Buttons,[13 20],14:16);
        end
        cd(actpwd);
        plotAFS(parentfig, data, AxesAFS, AxesSOL, lcs, LCS);
        
        hold(AxesAFS, 'on');
        plot(AxesAFS,data.FixPoint1(1),data.FixPoint1(2),'kx','Linewidth',2);
        hold(AxesAFS, 'off');

        set(usmn, 'Value', 0);
        set(usmf, 'Value', 1);
        
        
    elseif (isfield(data,'isExpert2') == 0) || (data.isExpert2 == 0)
        pt = get(AxesAFS, 'CurrentPoint');
        data.FixPoint2 = pt(1,1:2);
        
        actpwd = pwd;
        cd(data.calcp);
        
        if data.s == 3
            dlmwrite('wrap/FixPoint2.txt',data.FixPoint2','precision','%15.15e');
        end
        cd(actpwd);
        plotAFS(parentfig, data, AxesAFS, AxesSOL, lcs, LCS);
        
        hold(AxesAFS, 'on');
        plot(AxesAFS,data.FixPoint1(1),data.FixPoint1(2),'kx','Linewidth',2);
        plot(AxesAFS,data.FixPoint2(1),data.FixPoint2(2),'ko','Linewidth',2);
        for i=1:2
            if data.dimP1(i) > 0
                if i==1
                    plot(AxesAFS,data.AFS1{i}(:,1),data.AFS1{i}(:,2),'k--','Linewidth',2);
                else
                    plot(AxesAFS,data.AFS1{i}(:,1),data.AFS1{i}(:,2),'k-.','Linewidth',2);
                end
            end
        end
        
        hold(AxesAFS, 'off');

        set(usmn, 'Value', 0);
        set(usmf, 'Value', 1);
        
        onoffButton(Buttons,14,16);
        
    else
        pt = get(AxesAFS, 'CurrentPoint');
        data.FixPoint3 = pt(1,1:2);
        
        plotAFS(parentfig, data, AxesAFS, AxesSOL, lcs, LCS);
        hold(AxesAFS, 'on');
        plot(AxesAFS,data.FixPoint1(1),data.FixPoint1(2),'kx','Linewidth',2);
        plot(AxesAFS,data.FixPoint2(1),data.FixPoint2(2),'ko','Linewidth',2);
        plot(AxesAFS,data.FixPoint3(1),data.FixPoint3(2),'k+','Linewidth',2);
        for i=1:2
            if data.dimP1(i) > 0
                if i==1
                    plot(AxesAFS,data.AFS1{i}(:,1),data.AFS1{i}(:,2),'k--','Linewidth',2);
                else
                    plot(AxesAFS,data.AFS1{i}(:,1),data.AFS1{i}(:,2),'k-.','Linewidth',2);
                end
            end
        end
        if data.dimP2(1) > 0
            plot(AxesAFS,data.AFS2{1}(:,1),data.AFS2{1}(:,2),'k','Linewidth',2);
        end
        
        hold(AxesAFS, 'off');
        
        set(usmn, 'Value', 0);
        set(usmf, 'Value', 1);
        
    end
end
set(Empty_Button,'UserData',data);
