function u = spymcl(m)
% function u = spymcl(m)
%
% good for looking at non-zero entries of m

figure(2)
clf
hold on

mc = round(1000*m(:))/1000;
n = length(m);

x = kron(1:n, ones(1,n));
y = kron(ones(1,n), 1:n);

set(gca,'YDir','reverse')
axis([1 n 1 n])

u = unique(mc);
u = u(u > 0);
colors = hsv(length(u));

hold on

for i = 1:length(u),
  ind = find(mc == u(i));
  plot(x(ind),y(ind),'*','Color',colors(i,:));
end

for i = 1:length(u),
  s{i} = num2str(u(i));
end

legend(s,'Location','EastOutside');

d = diag(diag(m) > .001);
dc = d(:);
ind = find(dc);
plot(x(ind),y(ind),'ko','MarkerSize',6);
