Skip to content
Permalink
e9ea75dccd
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
104 lines (47 sloc) 1.93 KB
if(~isdeployed)
cd(fileparts(which(mfilename)));
end
DataPath = '.\';
AvailableFiles = dir((fullfile(DataPath, '*.csv')));
mapfig = figure;
animated(1,1,1, 25) = 0;
caxis([0 1]);
OpenFileName = "24HR_CBE_01.fig";
fig = openfig(OpenFileName);
lon = double( fig.Children.Children.XData);
lat = double(fig.Children.Children.YData);
close(gcf)
colour_option = questdlg("could you please choose one colour?", "map colour", "Non-Colour Blind", "Blind colour","Non-Colour Blind");
if colour_option == "Colour-Blind"
cmap = ametrine(256);
colormap ametrine;
end
for idx = 1: size(AvailableFiles,1)
ozone = csvread(AvailableFiles(idx).name);
worldmap('Europe');
load coastlines
plotm(coastlat, coastlon)
colorbar
northarrow('latitude',53.270137,'longitude', -15.465583,'linewidth',1.5);
surfm( lat, lon ,ozone, "edgeColor" , "none", ...
"FaceAlpha", 0.5)
Land = shaperead("landareas",'UseGeoCoords', true);
Lakes = shaperead('worldlakes', 'UseGeoCoords', true);
geoshow(Lakes, 'FaceColor', 'blue')
Rivers = shaperead('worldrivers', 'UseGeoCoords', true);
geoshow(Rivers, 'Color', 'blue')
cities = shaperead('worldcities', 'UseGeoCoords', true);
geoshow(cities, 'Marker', '.', 'Color', 'red')
Plots = findobj( gca, "Type", "Axes");
Plots.SortMethod = "depth";
frame = getframe(gcf);
if idx == 1
[animated, cmap] = rgb2ind(frame.cdata, 256, 'nodither');
else
animated(:,:,1,idx) = rgb2ind(frame.cdata, cmap, 'nodither');
end
end
filename = "map.gif";
imwrite(animated, cmap, filename, 'DelayTime', 0.5, ...
'LoopCount', inf);
web(filename)