feat(matlab): y-tick labels count/rate, batch 4

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Experiments DB Dev
2026-07-24 10:25:55 -04:00
parent f03a1df9d5
commit caa60509a8
12 changed files with 44 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 40 KiB

@@ -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.