fix(matlab): adopt user's compact plot layout for all variations

Port the unmerge_d0_5 fix (b6dc69c) into variation_plot.m: tight centred plot
box (Position [0.2 0.30 0.60 0.60]), TickDir out, and xticklabels('auto') --
which keeps x labels horizontal when they fit (<=~10 days) and auto-rotates
them when crowded (e.g. 14-day windows). Replaces the manual rotated-text hack.
Regenerated all learning-curve figures; removed the stray plotcurve.asv and
gitignored *.asv.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 09:53:25 -04:00
parent b6dc69c315
commit 5ba141a9be
3 changed files with 7 additions and 94 deletions
+6 -15
View File
@@ -38,21 +38,12 @@ legend([e1 e2], {sprintf('anodal, N = %d', na), sprintf('control, N = %d', nc)},
'Location', 'northwest', 'Box', 'off');
xlabel('training day'); ylabel(ylab);
title(vname, 'Interpreter', 'none');
% Vertical x-axis tick labels. XTickLabelRotation / xtickangle are NOT honored
% by exportgraphics on a headless invisible figure, so draw the labels manually
% as rotated text objects (which always render).
set(gca, 'XTick', xd, 'XTickLabel', {}, 'Position', [0.13 0.20 0.80 0.70], ...
'FontName', 'Arial', 'FontSize', 13, 'LineWidth', 1.5, 'Box', 'off');
drawnow;
yl = ylim(gca);
yb = yl(1) - 0.015 * (yl(2) - yl(1));
for k = 1:numel(xd)
text(xd(k), yb, num2str(xd(k)), 'Parent', gca, 'Rotation', 90, ...
'HorizontalAlignment', 'right', 'VerticalAlignment', 'middle', ...
'FontName', 'Arial', 'FontSize', 13, 'Clipping', 'off');
end
xlh = get(gca, 'XLabel'); % push the axis label below the vertical ticks
set(xlh, 'Units', 'normalized', 'Position', [0.5 -0.15 0]);
% Compact publication layout with a tight centred plot box and ticks pointing
% out. Setting XTickLabel {} then xticklabels('auto') resets the labels cleanly
% after the Position change.
set(gca, 'XTick', xd, 'XTickLabel', {}, 'Position', [0.2 0.30 0.60 0.60], ...
'FontName', 'Arial', 'FontSize', 13, 'LineWidth', 1.5, 'Box', 'off', 'TickDir', 'out');
xticklabels('auto')
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);