From 319ca6feeabe7e76ce51538c1e19b582464d5cdf Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Mon, 26 Nov 2007 19:46:28 +0000 Subject: [PATCH] =?UTF-8?q?ajout=20du=20trac=C3=A9=20de=20la=20climato=20e?= =?UTF-8?q?n=20temp=C3=A9rature?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsgqc_GUI.m | 34 ++++++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/tsgqc_GUI.m b/tsgqc_GUI.m index b07c97f..a00147c 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 -- GitLab