Skip to content
Snippets Groups Projects
Commit b85b43e1 authored by jacques.grelet_ird.fr's avatar jacques.grelet_ird.fr
Browse files

convert tsg.LATX and tsg.LONX from single to double before calling m_grid

this patch correct a bug when m_grid call text with xx & yy arrays with single
parent 92b0b955
No related branches found
No related tags found
No related merge requests found
...@@ -30,18 +30,23 @@ tsg = getappdata( hTsgGUI, 'tsg_data'); ...@@ -30,18 +30,23 @@ tsg = getappdata( hTsgGUI, 'tsg_data');
dateLim = get(hPlotAxes(1), 'Xlim'); dateLim = get(hPlotAxes(1), 'Xlim');
ind = find( tsg.DAYD >= dateLim(1) & tsg.DAYD <= dateLim(2)); ind = find( tsg.DAYD >= dateLim(1) & tsg.DAYD <= dateLim(2));
% m_grid need the use of double instead single
% --------------------------------------------
latx = double(tsg.LATX);
lonx = double(tsg.LONX);
if ~isempty( ind ) if ~isempty( ind )
latMin = min( tsg.LATX(ind) ); latMin = min(latx(ind) );
if latMin < -90 if latMin < -90
latMin = -90; latMin = -90;
end end
latMax = max( tsg.LATX(ind) ); latMax = max( latx(ind) );
if latMax > 90 if latMax > 90
latMax = 90; latMax = 90;
end end
lonMin = min( tsg.LONX(ind) ); lonMin = min( lonx(ind) );
lonMax = max( tsg.LONX(ind) ); lonMax = max( lonx(ind) );
% Oversize window due to the large frame % Oversize window due to the large frame
%-------------------------------------- %--------------------------------------
...@@ -103,8 +108,8 @@ if ~isempty( ind ) ...@@ -103,8 +108,8 @@ if ~isempty( ind )
% Plot the ship track - Check if LAT-LON in deg-decimal % Plot the ship track - Check if LAT-LON in deg-decimal
% ----------------------------------------------------- % -----------------------------------------------------
%m_line(tsg.LONX,tsg.LATX, 'TAG', 'TAG_PLOT4_LINE_SHIPTRACK', 'marker','.','markersize',3,'color','b'); %m_line(lonx, latx, 'TAG', 'TAG_PLOT4_LINE_SHIPTRACK', 'marker','.','markersize',3,'color','b');
% m_line(tsg.LONX,tsg.LATX, 'LineStyle', 'none', 'marker','*','markersize',2,'color','b'); % m_line(lonx, latx, 'LineStyle', 'none', 'marker','*','markersize',2,'color','b');
% Plot using QC % Plot using QC
% ------------- % -------------
...@@ -132,8 +137,8 @@ if ~isempty( ind ) ...@@ -132,8 +137,8 @@ if ~isempty( ind )
% Create line on the map % Create line on the map
% ---------------------- % ----------------------
m_line( mod(tsg.LONX(ind) + tsg.lonplus, tsg.lonmod) - tsg.lonplus,... m_line( mod(lonx(ind) + tsg.lonplus, tsg.lonmod) - tsg.lonplus,...
tsg.LATX(ind), 'LineStyle', 'none', 'marker','*',... latx(ind), 'LineStyle', 'none', 'marker','*',...
'markersize', 2, 'color', qcColor); 'markersize', 2, 'color', qcColor);
end end
end end
......
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