Newer
Older
function [scatterHandle, textHandles] = scatterSatDataPositions(pAxesHandle, pSatDataPositions)
%SCATTERSATDATAPOSITIONS Summary of this function goes here
% Detailed explanation goes here
%% Remove NaN
x = pSatDataPositions.lon_sat(~isnan(pSatDataPositions.lon_sat));
y = pSatDataPositions.lat_sat(~isnan(pSatDataPositions.lat_sat));
year = pSatDataPositions.year_sat(~isnan(pSatDataPositions.year_sat));
month = pSatDataPositions.month_sat(~isnan(pSatDataPositions.month_sat));
day = pSatDataPositions.day_sat(~isnan(pSatDataPositions.day_sat));
%% Calculate step size for text
steps = 1:3:(floor(length(x)/3)*3);
%% Prepare text cell
textCell = {};
for i = steps
textCell{end + 1} = {'', [' ' num2str(year(i)) '-' num2str(month(i)) '-' num2str(day(i))]};
end
%% Plot
hold(pAxesHandle, 'on');
scatterHandle = scatter(pAxesHandle, x, y);
textHandles = text(pAxesHandle, x(steps), y(steps), textCell, 'FontSize', 7);
hold(pAxesHandle, 'off');
end