source ("config/plot-setup.m");
counts = [18 2; 12 3; 22 1];
percent = 100 .* counts ./ sum (counts, 2);
figure (1); bar (1:3, percent, "stacked");
set (gca, "xtick", 1:3, "ytick", 0:20:100);
xlabel ("Site identifier"); ylabel ("Share of observations (%)");
title ("Composition with unequal sample counts"); ylim ([0 100]);
key = legend ("Accepted", "Rejected", "location", "southoutside");
set (key, "fontsize", 11, "box", "off");
printf ("Normalized row totals: "); fprintf ("%.1f ", sum(percent,2)); printf ("\n");
print (gcf, "figures/OCT-15-003.pdf", "-dpdfcairo");
close all;
