figure patch(x,y,'r') % make a red circular patch patch(x+0.8,y,'g') % make a green circular path patch(x+0.4,y+0.8,'b') % make a blue circular path axis square tight % set axis to square
[px,py,pz] = sphere(50); % generate coordinates for a 50 x 50 sphere
cla sEarth = surface(py, px ,flip(pz)); sEarth.FaceColor = 'texturemap'; % set color to texture mapping sEarth.EdgeColor = 'none'; % remove surface edge color sEarth.CData = earth; % set color data
hold on sCloud = surface(px*1.02,py*1.02,flip(pz)*1.02);
sCloud.FaceColor = 'texturemap'; % set color to texture mapping sCloud.EdgeColor = 'none'; % remove surface edge color sCloud.CData = clouds; % set color data
sCloud.FaceAlpha = 'texturemap'; % set transparency to texture mapping sCloud.AlphaData = max(clouds,[],3); % set transparency data hold off
view([80 2]) % specify viewpoint daspect([1 1 1]) % set aspect ratio axis off tight % remove axis andset limits to data range