source ("config/plot-setup.m");
readings = [10 12 15; 11 NaN 17; 13 16 18]; missing = isnan (readings);
shown = readings; shown(missing) = 10;
figure (1); imagesc (shown); colormap (viridis(64)); caxis ([10 18]); hold on;
[row, column] = find (missing);
for k = 1:numel(row)
  fill (column(k)+[-.5 .5 .5 -.5], row(k)+[-.5 -.5 .5 .5], ...
        [1 1 1], "edgecolor", [.6 .6 .6]);
  text (column(k), row(k), "NA", "horizontalalignment", "center");
endfor
set (gca, "xtick", 1:3, "ytick", 1:3); axis image;
xlabel ("Visit"); ylabel ("Site"); title ("White NA cells are outside the numeric scale");
cb = colorbar (); ylabel (cb, "Reading (C)");
printf ("Missing cells: %d\n", sum(missing(:)));
print (gcf, "figures/OCT-18-004.pdf", "-dpdfcairo");
close all;
