function IOdisplay(number, data1, data2, label)
global h_Fig;
dim = size(data1, 2);

h_Fig = figure( 'position', [200 100 600 600], 'menubar', 'figure', 'resize', 'off', 'numbertitle', 'off', 'name', 'Pre-assignment');

if dim == 1
    data1(:, 2) = 1;
    data2(:, 2) = 1;
end;
%subplot (2, 1, 1);

if dim <3
    scatter(data1(:, 1), data1(:, 2), 'go', 'filled');
    hold on;
    scatter(data2(:, 1), data2(:, 2), 'ro');
else
    scatter3(data1(:, 1), data1(:, 2), data1(:, 3), 50, 'go', 'filled');
    hold on;
    plot3(data2(:, 1), data2(:, 2), data2(:, 3), 'ro');
end;
grid on;

%h_text = uicontrol( h_Fig, 'style', 'text', 'string', 'Cluster ID Assigned  (1 or 2)', 'position', [200 300 150 20]);
%h_num = uicontrol(h_Fig, 'style', 'edit', 'position', [400 300 100 20]);
%h_next =  uicontrol(h_Fig, 'style', 'pushbutton', 'position', [400 200 100 25], 'string', 'Next>', 'callback', 'nextone');

%for i = 1 : number,      
%    plot(data(i, 1), data(i, 2), 'r.');
%    if i > 1
%        plot(data(i-1, 1), data(i-1, 2), '.');
%    end;
%    uiwait(h_Fig);  
%    if isempty(get(h_num, 'string'))
%        h_error = uicontrol( h_Fig, 'style', 'text', 'string', 'Warning: please input the ID before pressing enter!', 'position', [400 150 250 20]);
%        uiwait(h_Fig);
%        delete(h_error);
%        initial(i) = str2num(get(h_num, 'string'));
%    else
%        initial(i) = str2num(get(h_num, 'string'));
%    end;      
    
%    if i < number                     
%        set(h_num, 'string', '');
%    else
%        h_finish =  uicontrol(h_Fig, 'style', 'pushbutton', 'position', [400 200 100 25], 'string', 'Finish>', 'callback', 'nextone');
%        uiwait(h_Fig);
%    end;
%end;
