clear all file_name='upwelling.z.nc'; bathy=getnc(file_name,'bathymetry'); temp=getnc(file_name,'temp'); %tmax=289; tmax=1; for j=1:tmax; h=figure(1); clf temp_t=temp(j,:,2,:); pcolor(squeeze(temp_t)) shading interp; hold on axis([0 200 0 40]) get(gca,'XTick') get(gca,'YTick') set(gca,'XTickLabel',[0;10;20],'fontsize',20); set(gca,'YTickLabel',[40;30;20;10;0],'fontsize',20); title('temperature in upwelling test case','fontsize',24) xlabel('x /km','fontsize',20); ylabel('depth /m','fontsize',20); caxis([10 20]); cb=colorbar('fontsize',20); set(get(cb,'ylabel'),'string','temperature / °C','fontsize',20) tmp=strcat('print -djpeg',' /yourfolder/getm_data/',num2str(j+1000),'.jpg'); eval(tmp); end