%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% This program plots per recruit curves for corvina %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% fclose all clc clear all close all %% Add path to the folder from from which some M-files will be %% loaded Path_M_Files = 'F:\Corvina_growth_paper\M-files' ; addpath ( Path_M_Files ) %% Add path to the folder where some figures will be saved Path_Figures = 'F:\Corvina_growth_paper\Figures' ; addpath ( Path_Figures ) %% Add path to the folder from which some .mat files will be %% loaded and where some others will be saved Path_Output = 'F:\Corvina_growth_paper\Output' ; addpath ( Path_Output ) %% Load necessary parameters and functions % Load the M-file where you gathered all necessary functions and % parameters to implement the model for corvina Parameters_functions_Corvina %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% (1) Consider Gherard et al.'s growth model %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Evaluate natural SSBR (NSSBR) for corvina p2 = corvina ; p2.EOA = 0 ; NSSBR = SSBR_Gherard_growth(p2) ; %% Evaluate the impacts of the exploitation rate of old adults %% on EPR and SSBR % Make calculations E_range = linspace ( 0 , 1 , 1000 ) ; % Create a waitbar tt_1 = 'Progress [ 0%% ]' ; ht_1 = waitbar(0,tt_1) ; p2 = corvina ; SSBR_E = zeros(size(E_range)) ; YPR_E = zeros(size(E_range)) ; for i = 1 : numel(E_range) waitbar(i/numel(E_range),ht_1,sprintf(... ' [ %2.2f%% ] \n',(100*i/numel(E_range)))) E_value = E_range(i) ; p2.EOA = E_value ; SSBR_E(i) = SSBR_Gherard_growth(p2) ; YPR_E(i) = YPR_Gherard_growth(p2) ; end % Close the waitbar close ( ht_1 ) FNSSBR_E = SSBR_E./ NSSBR ; %% Estimate FNSSBR and YPR at the current exploitation rate %% of old adults Current_FNSSBR = interp1 ( E_range , FNSSBR_E , corvina.EOA ) ; Current_YPR = interp1 ( E_range , YPR_E , corvina.EOA ) ; Current_FNSSBR_Gherard_growth = Current_FNSSBR ; %% Estimate YPR, EOA, and FNEPR at maximum sustainable %% Yield-Per-Recruit (YPRmax, Emax, and FNEPRmax) [ YPRmax , I_YPRmax ] = max(YPR_E) ; Emax = E_range(I_YPRmax) ; FNSSBRmax = FNSSBR_E(I_YPRmax) ; matfile_1 = fullfile( Path_Output , ... 'Per_Recruit_MSYPR_Gherard_growth.mat' ) ; save ( matfile_1 , 'Emax' , 'YPRmax' , 'FNSSBRmax' ) ; Current_YPR_over_YPRmax_Gherard_growth = Current_YPR./ YPRmax ; %% Plot YPR = f(EOA) for corvina, and save the resulting figure Fig1 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],... [0 Current_YPR Current_YPR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0],[0 YPRmax YPRmax],'linewidth',2,... 'Color',[.6 .6 .6],'linestyle','--') ; p1_ypr = plot(E_range, YPR_E,'-k') ; set ( p1_ypr , 'linewidth' , 3 ) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1.02 0 (max(YPR_E)).* 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( 'Yield-per-recruit' , 'fontsize' , 20 ) figure_1 = fullfile( Path_Figures , ... 'YPR_curve_corvina_Gherard_growth.png' ) ; print ( '-dpng' , '-r600' , figure_1 ) ; close ( Fig1 ) ; %% Plot FNSSBR = f(EOA) for corvina, and save the resulting figure Fig2 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],[0 ... Current_FNSSBR Current_FNSSBR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0] ,[0 FNSSBRmax FNSSBRmax],... 'linewidth',2,'Color',[.6 .6 .6],'linestyle','--') ; p1_epr = plot(E_range, FNSSBR_E,'-k','linewidth',3) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1 0 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( '(SSBR) / (natural SSBR)' , 'fontsize' , 20 ) figure_2 = fullfile( Path_Figures , ... 'FNEPR_curve_corvina_Gherard_growth.png' ) ; print ( '-dpng' , figure_2 ) ; close ( Fig2 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% (2) Consider the von Bertalanffy growth model fit to raw data %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Evaluate natural SSBR (NSSBR) for corvina p2 = corvina ; p2.EOA = 0 ; NSSBR = SSBR_vb_growth(p2) ; %% Evaluate the impacts of the exploitation rate of old adults %% on EPR and SSBR % Make calculations E_range = linspace ( 0 , 1 , 1000 ) ; % Create a waitbar tt_1 = 'Progress [ 0%% ]' ; ht_1 = waitbar(0,tt_1) ; p2 = corvina ; SSBR_E = zeros(size(E_range)) ; YPR_E = zeros(size(E_range)) ; for i = 1 : numel(E_range) waitbar(i/numel(E_range),ht_1,sprintf(... ' [ %2.2f%% ] \n',(100*i/numel(E_range)))) E_value = E_range(i) ; p2.EOA = E_value ; SSBR_E(i) = SSBR_vb_growth(p2) ; YPR_E(i) = YPR_vb_growth(p2) ; end % Close the waitbar close ( ht_1 ) FNSSBR_E = SSBR_E./ NSSBR ; %% Estimate FNSSBR and YPR at the current exploitation rate %% of old adults Current_FNSSBR = interp1 ( E_range , FNSSBR_E , corvina.EOA ) ; Current_YPR = interp1 ( E_range , YPR_E , corvina.EOA ) ; Current_FNSSBR_vb_growth = Current_FNSSBR ; %% Estimate YPR, EOA, and FNEPR at maximum sustainable %% Yield-Per-Recruit (YPRmax, Emax, and FNEPRmax) [ YPRmax , I_YPRmax ] = max(YPR_E) ; Emax = E_range(I_YPRmax) ; FNSSBRmax = FNSSBR_E(I_YPRmax) ; matfile_1 = fullfile( Path_Output , ... 'Per_Recruit_MSYPR_vb_growth.mat' ) ; save ( matfile_1 , 'Emax' , 'YPRmax' , 'FNSSBRmax' ) ; Current_YPR_over_YPRmax_vb_growth = Current_YPR./ YPRmax ; %% Plot YPR = f(EOA) for corvina, and save the resulting figure Fig1 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],... [0 Current_YPR Current_YPR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0],[0 YPRmax YPRmax],'linewidth',2,... 'Color',[.6 .6 .6],'linestyle','--') ; p1_ypr = plot(E_range, YPR_E,'-k') ; set ( p1_ypr , 'linewidth' , 3 ) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1.02 0 (max(YPR_E)).* 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( 'Yield-per-recruit' , 'fontsize' , 20 ) figure_1 = fullfile( Path_Figures , ... 'YPR_curve_corvina_vb_growth.png' ) ; print ( '-dpng' , '-r600' , figure_1 ) ; close ( Fig1 ) ; %% Plot FNSSBR = f(EOA) for corvina, and save the resulting figure Fig2 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],[0 ... Current_FNSSBR Current_FNSSBR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0] ,[0 FNSSBRmax FNSSBRmax],... 'linewidth',2,'Color',[.6 .6 .6],'linestyle','--') ; p1_epr = plot(E_range, FNSSBR_E,'-k','linewidth',3) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1 0 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( '(SSBR) / (natural SSBR)' , 'fontsize' , 20 ) figure_2 = fullfile( Path_Figures , ... 'FNEPR_curve_corvina_vb_growth.png' ) ; print ( '-dpng' , figure_2 ) ; close ( Fig2 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% (3) Consider the von Bertalanffy growth model fit to raw data %% bolstered by simulated values %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Evaluate natural SSBR (NSSBR) for corvina p2 = corvina ; p2.EOA = 0 ; NSSBR = SSBR_vb_bolstered_growth(p2) ; %% Evaluate the impacts of the exploitation rate of old adults %% on EPR and SSBR % Make calculations E_range = linspace ( 0 , 1 , 1000 ) ; % Create a waitbar tt_1 = 'Progress [ 0%% ]' ; ht_1 = waitbar(0,tt_1) ; p2 = corvina ; SSBR_E = zeros(size(E_range)) ; YPR_E = zeros(size(E_range)) ; for i = 1 : numel(E_range) waitbar(i/numel(E_range),ht_1,sprintf(... ' [ %2.2f%% ] \n',(100*i/numel(E_range)))) E_value = E_range(i) ; p2.EOA = E_value ; SSBR_E(i) = SSBR_vb_bolstered_growth(p2) ; YPR_E(i) = YPR_vb_bolstered_growth(p2) ; end % Close the waitbar close ( ht_1 ) FNSSBR_E = SSBR_E./ NSSBR ; %% Estimate FNSSBR and YPR at the current exploitation rate %% of old adults Current_FNSSBR = interp1 ( E_range , FNSSBR_E , corvina.EOA ) ; Current_YPR = interp1 ( E_range , YPR_E , corvina.EOA ) ; Current_FNSSBR_vb_bolstered_growth = Current_FNSSBR ; %% Estimate YPR, EOA, and FNEPR at maximum sustainable %% Yield-Per-Recruit (YPRmax, Emax, and FNEPRmax) [ YPRmax , I_YPRmax ] = max(YPR_E) ; Emax = E_range(I_YPRmax) ; FNSSBRmax = FNSSBR_E(I_YPRmax) ; matfile_1 = fullfile( Path_Output , ... 'Per_Recruit_MSYPR_vb_bolstered_growth.mat' ) ; save ( matfile_1 , 'Emax' , 'YPRmax' , 'FNSSBRmax' ) ; Current_YPR_over_YPRmax_vb_bolstered_growth = Current_YPR./ YPRmax ; %% Plot YPR = f(EOA) for corvina, and save the resulting figure Fig1 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],... [0 Current_YPR Current_YPR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0],[0 YPRmax YPRmax],'linewidth',2,... 'Color',[.6 .6 .6],'linestyle','--') ; p1_ypr = plot(E_range, YPR_E,'-k') ; set ( p1_ypr , 'linewidth' , 3 ) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1.02 0 (max(YPR_E)).* 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( 'Yield-per-recruit' , 'fontsize' , 20 ) figure_1 = fullfile( Path_Figures , ... 'YPR_curve_corvina_vb_bolstered_growth.png' ) ; print ( '-dpng' , '-r600' , figure_1 ) ; close ( Fig1 ) ; %% Plot FNSSBR = f(EOA) for corvina, and save the resulting figure Fig2 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],[0 ... Current_FNSSBR Current_FNSSBR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0] ,[0 FNSSBRmax FNSSBRmax],... 'linewidth',2,'Color',[.6 .6 .6],'linestyle','--') ; p1_epr = plot(E_range, FNSSBR_E,'-k','linewidth',3) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1 0 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( '(SSBR) / (natural SSBR)' , 'fontsize' , 20 ) figure_2 = fullfile( Path_Figures , ... 'FNEPR_curve_corvina_vb_bolstered_growth.png' ) ; print ( '-dpng' , figure_2 ) ; close ( Fig2 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% (4) Consider the Schnute-Richards growth model fit to raw data %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Evaluate natural SSBR (NSSBR) for corvina p2 = corvina ; p2.EOA = 0 ; NSSBR = SSBR_sr_growth(p2) ; %% Evaluate the impacts of the exploitation rate of old adults %% on EPR and SSBR % Make calculations E_range = linspace ( 0 , 1 , 1000 ) ; % Create a waitbar tt_1 = 'Progress [ 0%% ]' ; ht_1 = waitbar(0,tt_1) ; p2 = corvina ; SSBR_E = zeros(size(E_range)) ; YPR_E = zeros(size(E_range)) ; for i = 1 : numel(E_range) waitbar(i/numel(E_range),ht_1,sprintf(... ' [ %2.2f%% ] \n',(100*i/numel(E_range)))) E_value = E_range(i) ; p2.EOA = E_value ; SSBR_E(i) = SSBR_sr_growth(p2) ; YPR_E(i) = YPR_sr_growth(p2) ; end % Close the waitbar close ( ht_1 ) FNSSBR_E = SSBR_E./ NSSBR ; %% Estimate FNSSBR and YPR at the current exploitation rate %% of old adults Current_FNSSBR = interp1 ( E_range , FNSSBR_E , corvina.EOA ) ; Current_YPR = interp1 ( E_range , YPR_E , corvina.EOA ) ; Current_FNSSBR_sr_growth = Current_FNSSBR ; %% Estimate YPR, EOA, and FNEPR at maximum sustainable %% Yield-Per-Recruit (YPRmax, Emax, and FNEPRmax) [ YPRmax , I_YPRmax ] = max(YPR_E) ; Emax = E_range(I_YPRmax) ; FNSSBRmax = FNSSBR_E(I_YPRmax) ; matfile_1 = fullfile( Path_Output , ... 'Per_Recruit_MSYPR_sr_growth.mat' ) ; save ( matfile_1 , 'Emax' , 'YPRmax' , 'FNSSBRmax' ) ; Current_YPR_over_YPRmax_sr_growth = Current_YPR./ YPRmax ; %% Plot YPR = f(EOA) for corvina, and save the resulting figure Fig1 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],... [0 Current_YPR Current_YPR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0],[0 YPRmax YPRmax],'linewidth',2,... 'Color',[.6 .6 .6],'linestyle','--') ; p1_ypr = plot(E_range, YPR_E,'-k') ; set ( p1_ypr , 'linewidth' , 3 ) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1.02 0 (max(YPR_E)).* 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( 'Yield-per-recruit' , 'fontsize' , 20 ) figure_1 = fullfile( Path_Figures , ... 'YPR_curve_corvina_sr_growth.png' ) ; print ( '-dpng' , '-r600' , figure_1 ) ; close ( Fig1 ) ; %% Plot FNSSBR = f(EOA) for corvina, and save the resulting figure Fig2 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],[0 ... Current_FNSSBR Current_FNSSBR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0] ,[0 FNSSBRmax FNSSBRmax],... 'linewidth',2,'Color',[.6 .6 .6],'linestyle','--') ; p1_epr = plot(E_range, FNSSBR_E,'-k','linewidth',3) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1 0 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( '(SSBR) / (natural SSBR)' , 'fontsize' , 20 ) figure_2 = fullfile( Path_Figures , ... 'FNEPR_curve_corvina_sr_growth.png' ) ; print ( '-dpng' , figure_2 ) ; close ( Fig2 ) ; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% %% (5) Consider the Schnute-Richards growth model fit to raw data %% bolstered by simulated values %% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% Evaluate natural SSBR (NSSBR) for corvina p2 = corvina ; p2.EOA = 0 ; NSSBR = SSBR_sr_bolstered_growth(p2) ; %% Evaluate the impacts of the exploitation rate of old adults %% on EPR and SSBR % Make calculations E_range = linspace ( 0 , 1 , 1000 ) ; % Create a waitbar tt_1 = 'Progress [ 0%% ]' ; ht_1 = waitbar(0,tt_1) ; p2 = corvina ; SSBR_E = zeros(size(E_range)) ; YPR_E = zeros(size(E_range)) ; for i = 1 : numel(E_range) waitbar(i/numel(E_range),ht_1,sprintf(... ' [ %2.2f%% ] \n',(100*i/numel(E_range)))) E_value = E_range(i) ; p2.EOA = E_value ; SSBR_E(i) = SSBR_sr_bolstered_growth(p2) ; YPR_E(i) = YPR_sr_bolstered_growth(p2) ; end % Close the waitbar close ( ht_1 ) FNSSBR_E = SSBR_E./ NSSBR ; %% Estimate FNSSBR and YPR at the current exploitation rate %% of old adults Current_FNSSBR = interp1 ( E_range , FNSSBR_E , corvina.EOA ) ; Current_YPR = interp1 ( E_range , YPR_E , corvina.EOA ) ; Current_FNSSBR_sr_bolstered_growth = Current_FNSSBR ; %% Estimate YPR, EOA, and FNEPR at maximum sustainable %% Yield-Per-Recruit (YPRmax, Emax, and FNEPRmax) [ YPRmax , I_YPRmax ] = max(YPR_E) ; Emax = E_range(I_YPRmax) ; FNSSBRmax = FNSSBR_E(I_YPRmax) ; matfile_1 = fullfile( Path_Output , ... 'Per_Recruit_MSYPR_sr_bolstered_growth.mat' ) ; save ( matfile_1 , 'Emax' , 'YPRmax' , 'FNSSBRmax' ) ; Current_YPR_over_YPRmax_sr_bolstered_growth = Current_YPR./ YPRmax ; %% Plot YPR = f(EOA) for corvina, and save the resulting figure Fig1 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],... [0 Current_YPR Current_YPR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0],[0 YPRmax YPRmax],'linewidth',2,... 'Color',[.6 .6 .6],'linestyle','--') ; p1_ypr = plot(E_range, YPR_E,'-k') ; set ( p1_ypr , 'linewidth' , 3 ) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1.02 0 (max(YPR_E)).* 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( 'Yield-per-recruit' , 'fontsize' , 20 ) figure_1 = fullfile( Path_Figures , ... 'YPR_curve_corvina_sr_bolstered_growth.png' ) ; print ( '-dpng' , '-r600' , figure_1 ) ; close ( Fig1 ) ; %% Plot FNSSBR = f(EOA) for corvina, and save the resulting figure Fig2 = figure ; p_sup_1 = plot([corvina.EOA corvina.EOA 0],[0 ... Current_FNSSBR Current_FNSSBR],'linestyle','-.',... 'Color','k','linewidth',2) ; hold on p_sup_2 = plot([Emax Emax 0] ,[0 FNSSBRmax FNSSBRmax],... 'linewidth',2,'Color',[.6 .6 .6],'linestyle','--') ; p1_epr = plot(E_range, FNSSBR_E,'-k','linewidth',3) ; set(gca,'fontsize',18,'linewidth',2) axis ( [0 1 0 1.02] ) xlabel ( 'Exploitation rate of old adults (year^-^1)' , ... 'fontsize' , 20 ) ylabel ( '(SSBR) / (natural SSBR)' , 'fontsize' , 20 ) figure_2 = fullfile( Path_Figures , ... 'FNEPR_curve_corvina_sr_bolstered_growth.png' ) ; print ( '-dpng' , figure_2 ) ; close ( Fig2 ) ; %% Produce a bar plot showing FNSSBR for corvina for the different %% growth models considered Fig1 = figure ; Nb_components = 5 ; FNSSBR = [Current_FNSSBR_Gherard_growth Current_FNSSBR_vb_growth ... Current_FNSSBR_vb_bolstered_growth Current_FNSSBR_sr_growth ... Current_FNSSBR_sr_bolstered_growth] ; bar ( (1 : Nb_components) , FNSSBR ) Xt = 1:1:Nb_components; Xl = [1 Nb_components+1]; set(gca,'XTick',Xt,'XLim',Xl); components = { 'Gherard model' ; 'VB model' ; 'VB bolstered model' ; ... 'S-R model' ; 'S-R bolstered model' } ; set_xtick_label(components(1:1:5, :), 28 , '',12); set ( gca , 'fontsize' , 12 ) ; axis( [ 0 (Nb_components+1) 0 max(FNSSBR).* 1.01 ] ) ylabel( '(SSBR) / (natural SSBR)' , 'fontsize' , 14 ) colormap ( [0.5 0.5 0.5] ) box off Barplotname_1 = ... 'Barplots_FNSSBR_corvina_alternative_growth_models.png' ; fn_bar_1 = fullfile( Path_Figures , Barplotname_1 ); print ( '-dpng' , '-r600' , fn_bar_1 ) close ( Fig1 ) %% Produce a bar plot showing YPR over YPRmax for corvina %% for the different growth models considered Fig1 = figure ; Nb_components = 5 ; YPR_over_YPRmax = [Current_YPR_over_YPRmax_Gherard_growth ... Current_YPR_over_YPRmax_vb_growth ... Current_YPR_over_YPRmax_vb_bolstered_growth ... Current_YPR_over_YPRmax_sr_growth ... Current_YPR_over_YPRmax_sr_bolstered_growth] ; bar ( (1 : Nb_components) , YPR_over_YPRmax ) Xt = 1:1:Nb_components; Xl = [1 Nb_components+1]; set(gca,'XTick',Xt,'XLim',Xl); components = { 'Gherard model' ; 'VB model' ; 'VB bolstered model' ; ... 'S-R model' ; 'S-R bolstered model' } ; set_xtick_label(components(1:1:5, :), 28 , '',12); set ( gca , 'fontsize' , 12 ) ; axis( [ 0 (Nb_components+1) 0 max(YPR_over_YPRmax).* 1.01 ] ) ylabel( '(YPR) / (YPR_m_a_x)' , 'fontsize' , 14 ) colormap ( [0.5 0.5 0.5] ) box off Barplotname_1 = ... 'Barplots_YPR_over_YPRmax_corvina_alternative_growth_models.png' ; fn_bar_1 = fullfile( Path_Figures , Barplotname_1 ); print ( '-dpng' , '-r600' , fn_bar_1 ) close ( Fig1 )