Skip to content
Snippets Groups Projects
plot_Interpolation.m 1.46 KiB
Newer Older
Yves Gouriou's avatar
Yves Gouriou committed
function plot_Interpolation( hMainFig, hPlotAxes, nPlot )

% Get tsg application data
% ------------------------
tsg  = getappdata( hMainFig, 'tsg_data');

switch nPlot
  
  % ---------------------------------------------------------------------
  case 1

    erase_Line( hPlotAxes, 1 );

    % Find records with no position
    % -----------------------------
    if ~isempty( tsg.LATX ) && ~isempty( tsg.SSPS)

      ind = find( isnan(tsg.LATX) == 1 | isnan(tsg.LONX) == 1);
      if ~isempty( tsg.ssps_smooth )
        plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD(ind), tsg.SSPS(ind), [],...
          'SSPS_NOPOS','r','none','*',2);
      end

      ind = find( isnan(tsg.LATX) == 0 | isnan(tsg.LONX) == 0);
      if ~isempty( tsg.SSPS )
        plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD(ind), tsg.SSPS(ind), [],...
          'SSPS','k','none','*',2);
      end
    end

  % ---------------------------------------------------------------------
  case 2
    
    erase_Line( hPlotAxes, 2 );
    if ~isempty( tsg.LATX )
      plot_Tsg( hMainFig, hPlotAxes, 2, tsg.DAYD, tsg.LATX,[],...
                'LATX','k','none','*',2);
    end
    
  % ---------------------------------------------------------------------
  case 3
    erase_Line( hPlotAxes, 3 );
    if ~isempty( tsg.LONX )
      plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.LONX,[],...
                'LONX','k','none','*',2);
    end
end

axesCommonProp( hPlotAxes );

end