Skip to content
Permalink
Browse files
Finish the code for the final look of visualization
Finish the general user interface which has all the possible ozone
layers and option to change the colormap to whatever user chooses
  • Loading branch information
goldberr committed Jul 31, 2020
1 parent 53db327 commit d1fe64296d71bf48740b85f7fec3452367b9c369
Showing 1 changed file with 91 additions and 11 deletions.
@@ -1,5 +1,5 @@
function varargout = Project(varargin)
% Last Modified by GUIDE v2.5 15-July-2020 14:07:33
% Last Modified by GUIDE v2.5 31-Jul-2020 18:45:12

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
@@ -50,7 +50,7 @@ for k = 1 : length(fileName)
hold on;
s = plot(long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end
% Choose default command line output for Project
handles.output = hObject;
@@ -134,7 +134,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -169,7 +169,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -203,7 +203,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -218,7 +218,7 @@ guidata(hObject, handles);

% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
%%LOTOSEUROS BUTTON
%%LOTOSEUROS BUTTON
ncfile = 'surface.nc';

lati = ncread(ncfile, 'lat');
@@ -238,7 +238,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(1)
pause(0.8)
end

% Choose default command line output for Project
@@ -269,7 +269,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -304,7 +304,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -338,7 +338,7 @@ for k = 1 : 25
hold on;
s = plot(handles.axes1,long,lat,'k');
showmap;
pause(0.1)
pause(0.8)
end

% Choose default command line output for Project
@@ -353,22 +353,102 @@ guidata(hObject, handles);

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
%Tritanopia button

% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
colormap("pink");
colormap("copper");
colorbar();

% Choose default command line output for Project
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);


% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
%Deuteranopia button

colormap("bone");
colorbar();

% Choose default command line output for Project
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
%Protanopia button

colormap("summer");
colorbar();

% Choose default command line output for Project
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton13.
function pushbutton13_Callback(hObject, eventdata, handles)
ncfile = 'surface.nc';

lati = ncread(ncfile, 'lat');
longe = ncread(ncfile, 'lon');
time = ncread(ncfile, 'hour');
fileName = dir('24HR_CBE_*.csv');

for k = 1 : length(fileName)
theFiles = fileName(k).name;
newMatrix = readmatrix(theFiles);
newMatrix(400,:) = [0];
newMatrix(:,700) = [0];
showmap = pcolor(longe,lati,newMatrix);
showmap.EdgeAlpha =0;
title(sprintf('The time is : %.0f',time(k)));
caxis(handles.axes1, [-0.5 1.5]);
colorbar();
c.Label.String = 'Levels';
load coast;
hold on;
s = plot(long,lat,'k');
showmap;
pause(0.8)
end

% Choose default command line output for Project
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% hObject handle to pushbutton13 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton12.
function pushbutton12_Callback(hObject, eventdata, handles)
colormap("default");
colorbar();
% Choose default command line output for Project
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);
% hObject handle to pushbutton12 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

0 comments on commit d1fe642

Please sign in to comment.