fix(matlab): vertical x-axis (manual text), batch 1

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 09:23:16 -04:00
parent 8f8fc98d6a
commit 0d57846b00
24 changed files with 120 additions and 16 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 42 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 42 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 36 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 37 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);
Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 41 KiB

@@ -38,9 +38,22 @@ 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');
set(gca, 'XTick', xd, 'XTickLabelRotation', 90, ... % vertical x-axis tick labels
% 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; % force layout so the rotation is applied headless
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]);
drawnow;
exportgraphics(fig, outFile, 'Resolution', 150);
close(fig);
fprintf('%s: wrote %s (anodal N=%d, control N=%d)\n', vname, outFile, na, nc);