function dotplot(data)
% dotplot
[b, index]=unique(sort(data));
index(2:length(index)) = index(2:length(index))-index(1:(length(index)-1));
y=zeros(1, length(data));j=1;
for i=1:length(index)
    y(j:(j+index(i)-1)) = (1:index(i));
    j=j+index(i);
end
plot(sort(data), y, '.');
set(gca, 'YLim', [0 max(y)*2]);
