Skip to content
Snippets Groups Projects
plot_Validation.m 1.83 KiB
Newer Older
function plot_Validation( hMainFig, hPlotAxes, nPlot, PARA )

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

switch nPlot
  
  % ---------------------------------------------------------------------
  case 1
    
    erase_Line( hPlotAxes, 1 );

    if ~isempty( tsg.(PARA) )
      plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD, tsg.(PARA), tsg.([PARA '_QC']),...
                PARA,'','none','*',2);
    % Plot PARA bucket
    % -----------------------------
    if ~isempty( tsg.([PARA '_SPL']) )
      ind   = 1: length( tsg.([PARA '_SPL_TYPE']));
      indWS = strmatch( 'WS', tsg.([PARA '_SPL_TYPE']), 'exact');
      if ~isempty(ind)
        plot_Tsg( hMainFig, hPlotAxes, 1,...
                  tsg.DAYD_SPL(indWS), tsg.([PARA '_SPL'])(indWS),...
                  tsg.([PARA '_SPL_QC'])(indWS), ...
                  [PARA '_SPL_1'],'','none','square',5);
      end
        indEXT = setxor(ind, indWS);
        if ~isempty(indEXT)
        plot_Tsg( hMainFig, hPlotAxes, 1, tsg.DAYD_SPL(indEXT),...
                  tsg.([PARA '_SPL'])(indEXT),...
                  tsg.([PARA '_SPL_QC'])(indEXT),...
                  [PARA '_SPL_2'],'','none','o',5);
      end
    end

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

axesCommonProp( hPlotAxes );

end