From c15fcffa025c5b6bde0b5a1062a5ba4686ab5d58 Mon Sep 17 00:00:00 2001
From: herrTilda <tilda.herrgardh@gmail.com>
Date: Mon, 21 Dec 2020 20:11:36 +0100
Subject: [PATCH] Added length of time for AUC calculations in figures.

---
 plotFigures.m | 32 +++++++++++++++++++++-----------
 1 file changed, 21 insertions(+), 11 deletions(-)

diff --git a/plotFigures.m b/plotFigures.m
index aaefc35..c28605a 100644
--- a/plotFigures.m
+++ b/plotFigures.m
@@ -55,7 +55,7 @@ simM1=sim_muscle1+sim_adipose1;
 
 % figure 2B
 figure()
- set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 0.4, 0.5]); % increase size of figure
+set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 0.4, 0.5]); % increase size of figure
 plotBar(colorL,45,[],0);hold on
 plotBar(colorM,27,[],1)
 plotBar(colorII,(15+8),[],2)
@@ -100,7 +100,7 @@ plotBar(colorMA,trapz(sim_time,simM1),getAUCtot(DATA),2);
 set(gca,'Xtick',1:3,'XTickLabel',{'M0','M1','data'},'FontSize',20);
 yticks([0:400:800]);
 ylabel('mg/kg');
-title('AUC');
+title('AUC [0-360 min] ');
 set(gca,'FontSize',20);
 
 % plot figure 2D
@@ -133,14 +133,16 @@ plotBar(colorM,trapz(DATA.time,DATA.Muscle),trapz(sim_time,sim_muscle1),1);
 plotBar(colorA,trapz(DATA.time,DATA.Adipose),trapz(sim_time,sim_adipose1),4); 
 
 set(gca,'Xtick',1:5,'XTickLabel',{'   muscle',[],[],'   adipose',[]},'FontSize',20);
+yticks([0:200:400]);
 ylabel('mg/kg')
-title('AUC');
+title('AUC [0-360 min] ');
 legend('framed: simulation','filled: data')
 set(gca,'FontSize',20);
-yticks([0:200:400]);
-ylim([0 400]);
+box on
 
-%% fig 4
+saveas(gcf, '../../results/fig2D.png')
+
+%% fig 3
 model_names={'M1','M4m'};
 load('./results/M4m_opt(28.86930).mat'); % optParam
 load('./results/M4m_allGoodParams'); % allParams
@@ -189,6 +191,8 @@ set(gca,'FontSize',15);
 legend('uncertainty','data','simulation','Location', 'northeast')
 set(gca,'linewidth',1.4)
 
+saveas(gcf, '../../results/fig3Badipose.png')
+
 % muscle
 figure()
 set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 0.4, 0.7]);
@@ -215,8 +219,9 @@ set(gca,'FontSize',15);
 set(gca,'linewidth',1.4)
 legend('uncertainty','data','simulation','Location', 'northeast')
  
+saveas(gcf, '../../results/fig3Bmuscle.png')
 
-%% fig5
+%% fig 4
 
 model_name='M4';
 model=str2func(model_name);
@@ -307,7 +312,10 @@ set(gca,'FontSize',20);
 yticks([0:50:150])
 ylim([0 180])
 
-%% fig 6
+
+saveas(gcf, '../../results/fig4.png')
+
+%% fig 5
 clear model_name
 model_name='M4m';
 model=str2func(model_name);
@@ -319,7 +327,7 @@ paramsFixed = [paramsMod(1:find(contains(pNames,'EGP1'))-1)' EGP' Ra' INS' GLUT4
 [sim_muscle,sim_adipose,sim_liver,sim_ii] = simulateModel(sim_time, model, optParam, paramsFixed);
 sim_tot = sim_muscle + sim_adipose + sim_liver + sim_ii;
 
-% plot figure 6
+% plot
 figure()
 set(0,'DefaultLineLineWidth',3)
 set(gcf, 'Units', 'Normalized', 'OuterPosition', [0, 0.04, 1, 1]); % increase size of figure
@@ -396,10 +404,12 @@ ylabel('mg/kg');
 set(gca,'xtick',[])
 set(gca,'FontSize',20);
 title('Total postprandial uptake','FontSize',20);
-legend('framed: simulation AUC','filled: data AUC','Location', 'northwest')
+legend('framed: simulation AUC [0-360 min]','filled: data AUC [0-360 min]','Location', 'northwest')
 set(gca,'Xtick',1:13,'XTickLabel',{'             muscle',[],[],'               adipose',[],[],'              liver',[],[],'               brain + kidneys',[],[],'total',[],[]});
 
-%% figure 7
+saveas(gcf, '../../results/fig5.png')
+
+%% figure 6
 load('EGP_ori.mat');
 load('EGP_dalla.mat');
 load('EGP_high.mat');
-- 
GitLab