Skip to content
Snippets Groups Projects
Commit 566fba5d authored by Lars Hubatsch's avatar Lars Hubatsch
Browse files

Making plots prettier for intro figure.

parent 7974b0cc
No related branches found
No related tags found
No related merge requests found
......@@ -45,20 +45,24 @@ x_seed = fminsearch(f_min, x_seed, opt);
[cost, v_fit, r_n, v_fit_end] = to_minimize(s, ts, x_seed, 'simple_drop', s(:, end));
%% Plot for
figure; hold on;
plot(s(1:10:400, :)', 'Color', [0.12156 0.4666666 0.7058823], 'LineWidth', 1.5);
plot(v_fit(1:10:400, :)', '--', 'Color', [1. 0.49803 0.0549], 'LineWidth', 1.5);
s_all = T.sol(1:end, 1:400)./max(max(T.sol(1:end, 1:30)))/1.022;
plot(T.x(1:340), s_all(1:10:200, 1:340), 'Color', [135/255 204/255 250/255], 'LineWidth', 2.5);
plot(T.x(1:30), v_fit(1:10:200, :)', '.', 'Color', [0.8314 0.2275 0.0902], 'MarkerSize', 10);
make_graph_pretty('$x [\mu m]$', 'intensity [a.u.]', '');
% print([T.pa, 'Timecourse_model_only'],'-depsc')
print([T.pa, 'Timecourse_model_only'],'-depsc')
%% Plot boundary condition (read out)
figure; hold on;
plot(ts, s(:, end))
plot(ts(1:200), s(1:200, end))
make_graph_pretty('t [s]', 'intensity [a.u.]', '');
print([T.pa, 'Timecourse_BC'],'-depsc')
%% Fit boundary condition with exponential
f = fit(ts(1:200), s(1:200, end), 'B+C-B*exp(-x/tau)-C*exp(-x/tau2)');
plot(f)
%% Plot flux at boundary (x close to 1) Only works close to boundary!
T = Ternary_model(2, 'FRAP', [], linspace(0.0, 400, 2000));
T.e_g0 = 0.001;
T.b = 0.001;
T.solve_tern_frap();
% T = Ternary_model(2, 'FRAP', [], linspace(0.0, 400, 2000));
% T.e_g0 = 0.001;
% T.b = 0.001;
% T.solve_tern_frap();
[~, ind_in] = min(abs(T.x+T.a+0.02)); % Find x position of boundary close to 0.9
% Calculate local diffusion coefficient
g0 = Ternary_model.gamma0((T.x(ind_in)+T.x(ind_in+1))/2, T.a, T.b, T.e_g0, T.o_g0);
......@@ -74,5 +78,5 @@ Diffs_out = D_out*diff(T.sol')/(T.x(ind_out+1)-T.x(ind_out));
figure; hold on;
plot(Diffs_in(ind_in, :))
plot(Diffs_out(ind_out, :));
make_graph_pretty('time', 'ratio outside/inside', 'unbleached component');
make_graph_pretty('time', '$\vec{j}$', 'boundary flux inside/outside of drop');
axis([0, 200, 0, 0.035])
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment