-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunc_plot_LMW.m
More file actions
45 lines (35 loc) · 1.16 KB
/
func_plot_LMW.m
File metadata and controls
45 lines (35 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
function [] = func_plot_LMW(LMW, IsotopicValue, numsamples, t)
hold on
grid on;
figure('Name', 'LMW: Smoke v/s combustion residue');
lmw_plot = scatter(t, LMW, 'filled');
xlabel('Time (Ma)');
ylabel('LMW');
set(gca, 'XDir','reverse');
x_h_lim = 1.1*max(t);
x_l_lim = 0.9*min(t);
line([x_l_lim,x_h_lim],[0.75,0.75], 'Color','red','LineStyle','--');
line([x_l_lim,x_h_lim],[0.95,0.95], 'Color','red','LineStyle','--');
line([x_l_lim,x_h_lim],[0.8,0.8], 'Color','blue','LineStyle','-');
line([x_l_lim,x_h_lim],[0.35,0.35], 'Color','blue','LineStyle','-');
xlim([x_l_lim x_h_lim]);
ylim([0 1]);
xt_mid = (min(t) + max(t))/2;
xt = [xt_mid xt_mid];
yt = [0.9 0.6];
str = {'Smoke','Residue'};
text(xt,yt,str)
%%Save plot file
%Location to save Plots
PlotFolder = strcat(pwd,'/Plots/');
filename = 'lmw.jpg';
%Corner case handling
%if no Plot folder exists
if ~exist(PlotFolder, 'dir')
%create a figure folder
mkdir(PlotFolder);
end
%Save all figures to this folder
saveas(gcf, fullfile(PlotFolder, filename));
hold off
end