Skip to content
Snippets Groups Projects
Verified Commit 2dfd6daf authored by Thomas Lambert's avatar Thomas Lambert :helicopter:
Browse files

feat(plots): replot windoff for presentation

parent 223f96ea
No related branches found
No related tags found
No related merge requests found
......@@ -96,6 +96,51 @@ function plotwindonoff(ResData)
end
title(expParam);
figure;
setcolormap();
hold on;
patchX = [0, donwStrokeEndIdx / nPeriodIdx, donwStrokeEndIdx / nPeriodIdx, 0];
patchY = [-5, -5, 10, 10];
patch(patchX, patchY, [186, 216, 221] / 255, 'EdgeColor', 'none', 'FaceAlpha', 0.5);
h1 = plot(time, fzOff, 'LineWidth', 1.2);
h2 = plot(time, fzOn, 'LineWidth', 1.2);
h3 = plot(time, meanDiff, 'LineWidth', 1.2);
text((donwStrokeEndIdx / nPeriodIdx) / 2, -2.75, ...
'Downstroke', ...
'HorizontalAlignment', 'center');
text(donwStrokeEndIdx / nPeriodIdx + ...
(1 - (donwStrokeEndIdx / nPeriodIdx)) / 2, -2.75, ...
'Upstroke', ...
'HorizontalAlignment', 'center');
setgcpres();
% legend([h1, h2, h3], {'\airspeed = 0 m/s', '\airspeed = 4.6 m/s', 'Difference'});
% legend('boxoff');
xlim([0, 1]);
ylim([-3 2]);
v0pos = 0.5;
vInfpos = 0.25;
diffpos = 0.6;
text(v0pos, fzOff(round(v0pos * length(time))) * 0.9, ...
'$\mathbf{V_0}$', ...
'HorizontalAlignment', 'right', 'Color', h1.Color);
text(vInfpos, fzOn(round(vInfpos * length(time))) * 1.1, ...
'$\mathbf{\airspeed}$', ...
'HorizontalAlignment', 'left', 'Color', h2.Color);
text(diffpos, meanDiff(round(diffpos * length(time))) * 1.1, ...
'$\mathbf{\airspeed - V_0}$', ...
'HorizontalAlignment', 'left', 'Color', h3.Color);
if isinteresting(ResData(i, j), SAVE_TIKZ_PARAM)
figdir = 'figures/results/';
filename = sprintf('inertia-period-Dx%0.2f_F%0.2f_V%0.1f_PRES.tex', ...
ResData(i, j).Testcase.dx, ...
ResData(i, j).Testcase.freq, ...
ResData(i, j).Testcase.airspeed);
save2tikz([figdir, filename], '\small');
end
title(expParam);
% figure;
% hold on;
% plot(time, fzOff);
......@@ -231,6 +276,33 @@ function setgca(varargin)
xlabel('t/T [-]');
ylabel('\fz [N]');
xticks([0:0.25:1]);
set(gca, ...
'Box', 'off', ...
'TickDir', 'out', ...
'TickLength', [.02 .02], ...
'XMinorTick', 'off', ...
'YMinorTick', 'off', ...
'YGrid', 'off', ...
'XGrid', 'off', ...
'XColor', 'k', ...
'YColor', 'k', ...
'GridLineStyle', ':', ...
'GridColor', 'k', ...
'GridAlpha', 0.25, ...
'LineWidth', 1, ...
'FontName', 'Helvetica', ...
'Fontsize', 14);
if nargin > 0
set(gca, varargin{:});
end
end
function setgcpres(varargin)
set(gca, ...
'Box', 'off', ...
'TickDir', 'out', ...
......@@ -246,6 +318,10 @@ function setgca(varargin)
'GridAlpha', 0.25, ...
'LineWidth', 1, ...
'FontName', 'Helvetica', ...
'XTickLabel', [], ...
'YTickLabel', [], ...
'XTick', [], ...
'YTick', [], ...
'Fontsize', 14);
if nargin > 0
......
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