Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

Regarding Plotting

2 visualizzazioni (ultimi 30 giorni)
Uday
Uday il 14 Ago 2011
Chiuso: MATLAB Answer Bot il 20 Ago 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.

Risposte (2)

Jan
Jan il 14 Ago 2011
Look in the documentation:
help saveas
help print
help imwrite
  2 Commenti
Uday
Uday il 14 Ago 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 il 14 Ago 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 il 14 Ago 2011

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by