i have
Z1={{rand(1,3)},[{rand(1,3)} {rand(1,3)} {rand(1,3)} {rand(1,3)} {rand(1,3)} {rand(1,3)} {rand(1,3)}],[{rand(1,3)} {rand(1,3)} ] } cl='gbrcmykw'; for k4=1:numel(Z1) y=cell2mat(Z1{k4}'); plot3(y(:,1),y(:,2),y(:,3),[ cl(k4) 's'],'MarkerSize',12,'DisplayName',sprintf('Zhluk %k4',y)) hold on end title('Priebeh zhlukovania','FontSize',16,'Color','k') legend('show','Location','NorthEastOutside') hold on and i have TAZ4=[ 1 2 7; 1 2 8; 1 2 3; 7 4 1; 4 5 6 ]for k4=1:size(TAZ4,1)plot3(TAZ4(k4,1),TAZ4(k4,2),TAZ4(k4,3),[cl(k4)'X'],'MarkerSize',10,'DisplayName',sprintf('Tazisko %k4',TAZ))hold onendlegend('show','Location','SouthEastOutside')
How do I add two legends to a single plot ?
Thanks.
Best Answer