% tst_spy.m
load match9.mat # has a single boolean variable called soln, of size 48x48x28

for r = 1:size(soln,3)
  figure
  spy (soln(:,:,r), ".", 20);
  hold on; axis equal; axis off;

  for i = 0.5:3:48.5
    line ([0.5 48.5], [i i], "Color", [0.8 0.8 0.8])
    line ([i i], [0.5 48.5], "Color", [0.8 0.8 0.8])
    # There are 34 lines per spy plot, so 28*34 = 952 lines in total.
    # Commenting out the calls to line and leaving only the 28 spy plots
    # does not cause any warning or segfault.
    # The behavior depends on how many graphics objects there are to clean up.
  end
end
clear i r

# While exiting, several instances of
#     warning: base_graphics_object::get_properties: invalid graphics object
# show up. But no segfault.

