Try subplot :
figure; subplot(1,2,1) plot(firstdata) subplot(1,2,2) plot(seconddata)
This will create two axis areas inside the same shapes window ... from your description, this is my best guess about what you want.
Edit: from the comments below, here is what you do
n=50; X = 500*rand([n,2]); subplot(1,2,1); #% <---- add 'subplot' here plot(X(:,1),X(:,2),'r.') symbs= {'r+','g.','bv','m*','ko'}; subplot(1,2,2); #% <---- add 'subplot' here (with different arguments) hold on for i = 1: length(I) plot(X(C==i,1),X(C==i,2),symbs{i}) end
If all you need is a second figure window, instead of doing subplot
, you can just say figure
in the place where I put the second subplot
call and a new figure window will be created.
figure;
source share