Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

Regarding Plotting

2 vues (au cours des 30 derniers jours)
Uday
Uday le 14 Août 2011
Clôturé : MATLAB Answer Bot le 20 Août 2021
I have 9 years pollution data and I would like to plot monthly maps. I have code those can process all data, but I do not know how to save each and every image (jpg,pdf). It will be nice if somebody can tell me how to fix this problem.

Réponses (2)

Jan
Jan le 14 Août 2011
Look in the documentation:
help saveas
help print
help imwrite
  2 commentaires
Uday
Uday le 14 Août 2011
do I need to write loop for saving all images ?
my codes are
for i=1:length(dir_list)
if strfind(dir_list(i).name,'2003')==19
data=dlmread(strcat(path,dir_list(i).name),'',55);
end
latitude=data(:,7);
lon_t=data(:,8);
longitude=rem((lon_t+180),360)-180
co=data(:,38);
figure(1)
load coast
h1=axesm('MapProjection','eqdcylin',... % There are many different map projections available. I don't claim this is the best.
'Grid','off',... % The default is to have a grid over the whole map, which I usually get rid of.
'MapLatLimit',[15-d_deg/2 45+d_deg/2],... %This defines the latitude and longitude limits of the plot. These include the whole globe
'MapLonLimit',[(-105-d_deg/2) (-75+d_deg/2)],...
'MeridianLabel','off',... %This turns off the meridian labels altogether
'Frame','on'); %This turns off the frame around the whole plot.
plotm(lat,long,'k')
hold on
tightmap on
colormap(jet);
grid on
h=surfacem(latgrid,longrid,grid_ch4);
colorbar
% legend('show')
xlabel('Longitude');
ylabel('Latitude');
title('SCIAMACHY XCH4 Jan 2003');
saveas(h1,'jpg');
Uday
Uday le 14 Août 2011
I wanted to save every month image separately and I have give them different name too for e.g Jan 2003 , March 2004 ..

Walter Roberson
Walter Roberson le 14 Août 2011

Cette question est clôturée.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by