From d60de76e4e5ececb98b8529dcf0773eb01356cf6 Mon Sep 17 00:00:00 2001 From: "Abdullah Ejrf (ejrfa)" Date: Fri, 24 Apr 2020 14:31:29 +0100 Subject: [PATCH] changing file --- FigDataExtract.m | 112 ----------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 FigDataExtract.m diff --git a/FigDataExtract.m b/FigDataExtract.m deleted file mode 100644 index ba958b8..0000000 --- a/FigDataExtract.m +++ /dev/null @@ -1,112 +0,0 @@ -if(~isdeployed) - cd(fileparts(which(mfilename))); -end -DataPath = '.\'; -AvailableFiles = dir((fullfile(DataPath, '*.csv'))); % list available data files - -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?", "Colour Map", "Non-Colour Blind", "Colour Blind","Non-Colour Blind"); -if colour_map_option == "Colour-Blind" - cmap = ametrine(256); - colormap ametrine; -end - - - - - -for idx = 1: size(AvailableFiles,1) - - - %OpenFileName = AvailableFiles(idx).name; - %fig = openfig(OpenFileName); - %Ozone = fig.Children.Children.ZData; - - % close(gcf) - - ozone = csvread(AvailableFiles(idx).name); - %POINTS = [LON(:), LAT(:), Ozone(:)]; - - worldmap('Europe'); - - load coastlines - plotm(coastlat, coastlon) - - %plot the data - % setm(gca,'mapprojection','eqdcylin') - %cmap = ametrine(256); - %colormap morgenstemning; - 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); - % geoshow(gca, land, 'FaceColor', [0.5 0.7 0.5]) - - 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 - - - - - - - - %Name = strsplit(OpenFileName,'.'); - %writematrix(Ozone, strcat(Name{1},'.csv')) -end - -filename = "map.gif"; -imwrite(animated, cmap, filename, 'DelayTime', 0.5, ... - 'LoopCount', inf); -web(filename) \ No newline at end of file