function buttonplotNMF(hObject, eventdata, Empty_Button, Buttons, Footnote, AxesNMF, NMFinfo, lcs)
ca = get(hObject,'UserData');
data = get(Empty_Button,'UserData');
if (isfield(data,'ismatrix')*isfield(data,'isnmf') == 0) || (data.ismatrix*data.isnmf == 0)
    if data.ismatrix == 0 set(Footnote,'String',' Warning, no data has been loaded.','ForegroundColor','red');return;end
    if data.isnmf == 0 set(Footnote,'String',' Warning, no NMF has been computed.','ForegroundColor','red');return;end
end

if ca == 0
    pT = pinv(data.InitT);
    for i=1:data.s
        plot(AxesNMF,data.t,data.U*data.S(:,1:data.s)*pT(:,i),'color',lcs(i,:),'Linewidth',2);
        hold(AxesNMF,'on');
    end
    hold(AxesNMF,'off');
    axis(AxesNMF,'tight');
    yl = get(AxesNMF,'ylim');
    set(AxesNMF,'ylim',[min(0,yl(1)), yl(2)*1.1]);
    xlabel(AxesNMF,'time');
elseif ca == 1
    for i=1:data.s
        plot(AxesNMF,data.x,data.InitT(i,:)*data.V(:,1:data.s)','color',lcs(i,:),'Linewidth',2);
        hold(AxesNMF,'on');
    end
    hold(AxesNMF,'off');
    axis(AxesNMF,'tight');
    yl = get(AxesNMF,'ylim');
    set(AxesNMF,'ylim',[min(0,yl(1)), yl(2)*1.1]);
    xlabel(AxesNMF,'channel');
else
    a = data.InitT*data.V(:,1:data.s)';
    a = diag(1./max(a'))*a;
    c = data.U*data.S(:,1:data.s)*pinv(data.InitT);
    c = c*diag(1./max(c));
    
    for i=1:data.s
        plot(AxesNMF,data.x,a(i,:),'color',lcs(i,:),'Linewidth',2);
        hold(AxesNMF,'on');
        plot(AxesNMF,linspace(data.x(1),data.x(end),size(data.t,1)),c(:,i),'-.','color',lcs(i,:),'Linewidth',2);
    end
    hold(AxesNMF,'off');
    axis(AxesNMF,'tight');
    yl = get(AxesNMF,'ylim');
    set(AxesNMF,'ylim',[min(0,yl(1)), yl(2)*1.1]);
    xlabel(AxesNMF,'channel / time');
end

