tfix median line range according to previous y-axis limits - cosmo - front and backend for Markov-Chain Monte Carlo inversion of cosmogenic nuclide concentrations
 (HTM) git clone git://src.adamsgaard.dk/cosmo
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) README
 (DIR) LICENSE
       ---
 (DIR) commit 0f955e37eeaccd0354be18749fd1dc4e5a5c3da7
 (DIR) parent 6ce8dbf897e2fe16177ec029c9366a3cc48c0836
 (HTM) Author: Anders Damsgaard <anders.damsgaard@geo.au.dk>
       Date:   Fri, 23 Oct 2015 17:01:52 +0200
       
       fix median line range according to previous y-axis limits
       
       Diffstat:
         M matlab/file_scanner_mcmc_starter.m  |      10 +++++-----
         M matlab/generate_plots.m             |      49 +++++++++++++++++++++++++++++++
       
       2 files changed, 54 insertions(+), 5 deletions(-)
       ---
 (DIR) diff --git a/matlab/file_scanner_mcmc_starter.m b/matlab/file_scanner_mcmc_starter.m
       t@@ -11,7 +11,7 @@
        % and status file
        infolder = '~/cosmo/input';
        
       -% folder for generated plots
       +% outfolder: folder for generated plots
        [status, hostname] = system('hostname');
        if strfind(hostname, 'flaptop') % laptop
            outfolder = 'output/';
       t@@ -22,10 +22,10 @@ end
        % uniquely identifying file name prefix for input files
        prefix = 'cosmo_';
        
       -% folder where completed input files are archived. This folder should be
       -% outside of the webserver document root so others cannot acces this
       -% information
       -archivefolder = '/home/adc/cosmo/archive';
       +% archivefolder: folder where completed input files are archived. This 
       +% folder should be outside of the webserver document root so others cannot
       +% access this information
       +archivefolder = '~/cosmo/archive';
        
        % folder containing matlab scripts to path
        matlab_scripts_folder = 'm_pakke2014maj11/';
 (DIR) diff --git a/matlab/generate_plots.m b/matlab/generate_plots.m
       t@@ -242,6 +242,8 @@ for i1 = 1:M % for each model parameter
        end
        
        
       +
       +
        %% Plot d18O curve, from PlotSmoothZachos.m
        fh = [fh;figure('visible', show_figures)];
        
       t@@ -311,6 +313,53 @@ linkaxes(axh,'x')
        % stairs(-tStarts,relExpos+2,'r')
        
        
       +
       +%% Plot one histogram per model parameter, including data from all walkers
       +fh = [fh;figure('visible', show_figures)];
       +for i1 = 1:M % for each model parameter
       +
       +    subplot(M,1,i1)
       +    
       +    data = [];
       +    for iwalker=1:Nwalkers
       +        data = [data, Ss{iwalker}.ms(i1,:)];
       +    end
       +    Nhistc=histc(data, xbins{i1});
       +    bar(xbins{i1},Nhistc,'histc')
       +
       +    med = median(data);
       +    plot([med, med], get(gca,'YLim'), 'm-', linewidth=2)
       +    
       +    if i1 == 1
       +        xlabel('Interglacial erosion rate [mm/yr]')
       +        text(0.02,0.98,'a', 'Units', ...
       +            'Normalized', 'VerticalAlignment', 'Top')
       +    elseif i1 == 2
       +        xlabel('Glacial erosion rate [mm/yr]')
       +        text(0.02,0.98,'b', 'Units', ...
       +            'Normalized', 'VerticalAlignment', 'Top')
       +    elseif i1 == 3
       +        xlabel('Timing of last deglaciation [yr]')
       +        text(0.02,0.98,'c', 'Units', ...
       +            'Normalized', 'VerticalAlignment', 'Top')
       +    elseif i1 == 4
       +        xlabel('$\delta^{18}$O$_\mathrm{threshold}$', ...
       +            'Interpreter', 'LaTeX')
       +        text(0.02,0.98,'d','Units', ...
       +            'Normalized', 'VerticalAlignment', 'Top')
       +    else
       +        disp(['Using mname for i1 = ' i1])
       +        xlabel(fixed_stuff.mname{i1})
       +    end
       +    %set (gca,'xtick',[1e-7:1e-3]);
       +    
       +    switch mDistr(i1,:)
       +        case 'uniform', set(gca,'xscale','lin','xlim',mminmax(i1,:))
       +        case 'logunif', set(gca,'xscale','log','xlim',mminmax(i1,:))
       +    end
       +end
       +
       +
        %% position figure windows at certain coordinates on the screen
        if strcmp(show_figures, 'on')
            figpos1 = [6         474        1910         504];