Skip to content
Snippets Groups Projects
Commit 78e408c6 authored by leprob001's avatar leprob001
Browse files

Moved initialization of TOA plot axes to GUI package.

/ Changed background color of axes to white
/ Changed colormap to gray skipping the first 44 steps of 300
parent 2607d114
No related branches found
No related tags found
No related merge requests found
......@@ -48,9 +48,8 @@ if isfield(artoaGui.editTimeOfArrival, 'scatterTimeOfArrival') ...
return
end
%% Create a new plot if non existent
%% Generate plot
artoaGui.editTimeOfArrival.axesScatterTimeOfArrival = axes(artoaGui.figures.editTimeOfArrival);
hold(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'on');
% get all points that are not deleted
......@@ -63,31 +62,6 @@ artoaGui.editTimeOfArrival.scatterTimeOfArrival = scatter( ...
'filled' ...
);
%% Set colormap
artoaGui.editTimeOfArrival.axesScatterTimeOfArrival.CLim = [0, 255];
colormap(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, colormap);
%% Setup gui
grid on;
% set background color
set(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Color', [.3 .3 .3], 'XColor', 'blue', 'YColor', 'blue');
% set plot title
titleVal = [ ...
'Project: ' artoaWorkspace.float.projectname ...
' FloatId: ' num2str(artoaWorkspace.float.floatname) ...
' Cycle: ' num2str(artoaWorkspace.float.cycle(1)) ...
' - Time of arrival' ...
];
titleHandle = title(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, titleVal, 'FontSize', 10);
set(titleHandle, 'Color', 'blue');
% set x and y label
xlabel(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Message Date', 'FontSize', 10);
ylabel(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Time of arrival rel. to window start time', 'FontSize', 10);
%% Setup GPS information plot
artoa.controller.edit.timeOfArrival.plotSoundsourceToaFromGps(artoaWorkspace.filteredSoundsources);
......
function [] = timeOfArrival()
%TIMEOFARRIVAL Defines the ARTOA4 edit time of arrival window.
global artoaGui artoaWorkspace;
global artoaGui artoaWorkspace artoaDataInput;
%% Initialize required variables
......@@ -25,6 +25,33 @@ set( ...
'Units', 'normalized' ...
);
%% Setup axes
artoaGui.editTimeOfArrival.axesScatterTimeOfArrival = axes(artoaGui.figures.editTimeOfArrival);
% set colormap
artoaGui.editTimeOfArrival.axesScatterTimeOfArrival.CLim = [0, 255];
cmap = flipud(gray(300));
colormap(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, cmap(1:256, :));
grid on;
% set background and axes font color
set(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Color', [1 1 1], 'XColor', 'blue', 'YColor', 'blue');
% set plot title
titleVal = [ ...
'Project: ' artoaWorkspace.float.projectname ...
' FloatId: ' num2str(artoaWorkspace.float.floatname) ...
' Cycle: ' num2str(artoaWorkspace.float.cycle(1)) ...
' - Time of arrival' ...
];
titleHandle = title(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, titleVal, 'FontSize', 10);
set(titleHandle, 'Color', 'blue');
% set x and y label
xlabel(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Message Date', 'FontSize', 10);
ylabel(artoaGui.editTimeOfArrival.axesScatterTimeOfArrival, 'Time of arrival rel. to window start time', 'FontSize', 10);
%% Generate Plot
artoa.controller.edit.timeOfArrival.plot();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment