diff --git a/tsgqc_GUI.m b/tsgqc_GUI.m index b07c97fbbfd10d40fe8a585f6e47e589120d7c9e..a00147cf8c8719b42e3a2f0d0cb450cf41125239 100644 --- a/tsgqc_GUI.m +++ b/tsgqc_GUI.m @@ -724,7 +724,8 @@ function tsgqc_GUI % Get data % ----------------------- tsg = getappdata( hMainFig, 'tsg_data' ); - hLine = get( hPlotAxes(1), 'UserData'); + hLine1 = get( hPlotAxes(1), 'UserData'); + hLine2 = get( hPlotAxes(2), 'UserData'); % Read Climatology % ---------------- @@ -793,17 +794,26 @@ function tsgqc_GUI end % Plot mean salinity climatology - hLine.meanClim = line( ... + hLine1.meanClim = line( ... time, mean_psal,'Linestyle', '-', 'Color','k'); % Plot 2 standard deviation - hLine.stdClimPlus = line( ... + hLine1.stdClimPlus = line( ... time, mean_psal + 3 * std_psal ,'Linestyle', '-', 'Color','r'); - hLine.stdClimMinus = line( ... + hLine1.stdClimMinus = line( ... time, mean_psal - 3 * std_psal ,'Linestyle', '-', 'Color','r'); - + % Plot mean temperature climatology + axes( hPlotAxes(2)); + hLine2.meanClim = line( ... + time, mean_temp,'Linestyle', '-', 'Color','k'); + hLine2.stdClimPlus = line( ... + time, mean_temp + 3 * std_temp ,'Linestyle', '-', 'Color','r'); + hLine2.stdClimMinus = line( ... + time, mean_temp - 3 * std_temp ,'Linestyle', '-', 'Color','r'); + % Store the handle of the bucketline % ---------------------------------- - set( hPlotAxes(1), 'UserData', hLine ); + set( hPlotAxes(1), 'UserData', hLine1 ); + set( hPlotAxes(2), 'UserData', hLine2 ); end else @@ -813,12 +823,16 @@ function tsgqc_GUI % The bucket pushbutton has been pressed again : % Delete the bucket on figure % ---------------------------------------------- - hLine = get( hPlotAxes(1), 'UserData'); + hLine1 = get( hPlotAxes(1), 'UserData'); + hLine2 = get( hPlotAxes(2), 'UserData'); % bug...... try - delete(hLine.stdClimMinus); - delete(hLine.stdClimPlus); - delete(hLine.meanClim); + delete(hLine1.stdClimMinus); + delete(hLine1.stdClimPlus); + delete(hLine1.meanClim); + delete(hLine2.stdClimMinus); + delete(hLine2.stdClimPlus); + delete(hLine2.meanClim); catch end end