
% seahorse3D.m
% makes a beautiful 3D plot of SeaHorse data

% Load SeaHorse data
load sh_ctd.mat


% data points for seahorse track
load .\positions\Argos_interp.mat

for ii = 1:250
    LatCube(ii,2:156) = lat_med;
    LonCube(ii,2:156) = lon_med;
end

% scatter3(LonCube(1,:), LatCube(1,:),ones(82),10,Temp(1,:),'filled')
% hold on
% for ii=1:250
%     scatter3(LonCube(ii,:),LatCube(ii,:)ii*ones(82), 20, Temp(ii,:), 'filled')
% end

%Plots data
subplot(221)
surf(LonCube, LatCube, Pres, Temp)
shading interp
set(gca, 'zdir','rev')
view(-10,60)
axis([-69.9 -69.1 29.5 29.9 1 220])
title('Temperature')
ylabel('Latitude')
xlabel('Longitude')
zlabel('Depth')
colorbar

subplot(222)
surf(LonCube, LatCube, Pres, Sal)
shading interp
set(gca, 'zdir', 'rev')
view(-10,60)
axis([-69.9 -69.1 29.5 29.9 1 220])
title('Salinity')
ylabel('Latitude')
xlabel('Longitude')
zlabel('Depth')
caxis([36.55 36.75])
colorbar

subplot(223)
surf(LonCube, LatCube, Pres, Fluor)
shading interp
set(gca, 'zdir', 'rev')
view(-10,60)
axis([-69.9 -69.1 29.5 29.9 1 220])
title('Fluorescence')
ylabel('Latitude')
xlabel('Longitude')
zlabel('Depth')
caxis([0 3.5])
colorbar

subplot(224)
surf(LonCube, LatCube, Pres, SigTheta)
shading interp
set(gca, 'zdir', 'rev')
view(-10,60)
axis([-69.9 -69.1 29.5 29.9 1 220])
title('\sigma_\theta')
ylabel('Latitude')
xlabel('Longitude')
zlabel('Depth')
colorbar

