plotpdf_evalfunc.m 981 Bytes
%Function that plots and saves the estimated pdf of the evaluation function
%for the chosen protein. 

function plotpdf_evalfunc(handles,hObject,handles1)
    try
        load(fullfile(handles1.folder,handles1.chosen_protein,'pdf_eval_func.mat'));
        for i=1:size(xbinT,1)
            plot(handles.axes2,xbinT(i,:),ks_y_T(i,:));
            hold on
        end
        xlabel(handles1.chosen_protein,'Interpreter','none');
        ylabel('pdf of evaluation function');
        
        fh = figure('Visible','off');
        h_new=copyobj(handles.axes2, fh);
        %set(h_new,'Position',get(0,'DefaultAxesPosition'));
        set(h_new, 'Units', 'Normalized');
        set(h_new,'OuterPosition',[.1, .1, .85, .85]);
        set(gcf,'Visible','off','CreateFcn','set(gcf,''Visible'',''on'')')
        saveas(fh, fullfile(handles1.folder,handles1.chosen_protein,handles1.chosen_protein),'jpeg');
        close(fh);
        
    catch ME
        errordlg(ME.message) 
    end
end