feat(matlab): count labels every 10 (ticks every 5); rate minor ticks every 0.02

variation_plot: count y-axis keeps 5-unit ticks/grid but labels only multiples
of 10; rate y-axis adds tick-only minor marks every 0.02 (major labels stay at
0.2). Regenerated all figures.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 10:25:54 -04:00
parent 2fd311277c
commit 7e4dcbe4ce
+11 -2
View File
@@ -46,9 +46,18 @@ set(gca, 'XTick', xd, 'XTickLabel', {}, 'Position', [0.2 0.30 0.60 0.60], ...
xticklabels('auto')
set(gca, 'XTickLabelRotation', 0); % keep x labels horizontal (no auto-rotate)
xlim([min(xd) - 0.5, max(xd) + 0.5]); % half-day padding so points aren't on the edges
if strcmp(metric, 'count') % success count: y-ticks every 5 units
if strcmp(metric, 'count') % count: tick every 5, but label only every 10
yl = ylim(gca);
set(gca, 'YTick', floor(yl(1) / 5) * 5 : 5 : ceil(yl(2) / 5) * 5);
yt = floor(yl(1) / 5) * 5 : 5 : ceil(yl(2) / 5) * 5;
lbl = cell(1, numel(yt));
for k = 1:numel(yt)
if mod(yt(k), 10) == 0; lbl{k} = num2str(yt(k)); else; lbl{k} = ''; end
end
set(gca, 'YTick', yt, 'YTickLabel', lbl);
else % rate: fine minor tick marks every 0.02 (no labels)
yl = ylim(gca);
set(gca, 'YMinorTick', 'on');
ax = gca; ax.YAxis.MinorTickValues = 0 : 0.02 : ceil(yl(2) / 0.02) * 0.02;
end
grid on
% Add breathing room between the y-axis label and the tick numbers.