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

le trace de la clim se fait en recuperant le handle parent d'une 'line'

parent ca4a1866
No related branches found
No related tags found
No related merge requests found
......@@ -71,7 +71,6 @@ ssps = tsg.SSPS( ind );
% LATX(80) = -0.5 et LATX(81) = 0.5
% LONX(180) = -0.5 et LONX(181) = 0.5
% ----------------
axes( hPlotAxes(1) );
mean_sstp = zeros(size(ind));
mean_ssps = zeros(size(ind));
std_sstp = zeros(size(ind));
......@@ -85,28 +84,45 @@ for ii=1:length(ind)
std_ssps(ii) = tsg.levitus.data.WOA01_STD_SSPS(time_dim,1,ilat,ilon);
end
% Plot mean salinity climatology
% ------------------------------
line(dayd, mean_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_MEAN_SSPS', 'Linestyle', '-', 'Color','k');
% Plot with 3 standard deviation
% ------------------------------
line(dayd, mean_ssps + 3 * std_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_PLUS_SSPS', 'Linestyle', '-', 'Color','r');
line(dayd, mean_ssps - 3 * std_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_MINUS_SSPS', 'Linestyle', '-', 'Color','r');
% Plot mean temperature climatology
% ---------------------------------
axes(hPlotAxes(2));
line(dayd, mean_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_MEAN_SSTP', 'Linestyle', '-', 'Color','k');
line(dayd, mean_sstp + 3 * std_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_PLUS_SSTP', 'Linestyle', '-', 'Color','r');
line(dayd, mean_sstp - 3 * std_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_MINUS_SSTP', 'Linestyle', '-', 'Color','r');
% get handle of axe when SSPS is plotted
% --------------------------------------
hdls = findobj('-regexp','Tag', 'TAG_PLOT\d_LINE_SSPS');
if ~isempty(hdls)
hdl_current_axes = get(hdls(1),'parent');
axes( hdl_current_axes );
% Plot mean salinity climatology
% ------------------------------
line(dayd, mean_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_MEAN_SSPS', 'Linestyle', '-', 'Color','k');
% Plot with 3 standard deviation
% ------------------------------
line(dayd, mean_ssps + 3 * std_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_PLUS_SSPS', 'Linestyle', '-', 'Color','r');
line(dayd, mean_ssps - 3 * std_ssps, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_MINUS_SSPS', 'Linestyle', '-', 'Color','r');
end
% get handle of axe when SSTP is plotted
% --------------------------------------
hdls = findobj('-regexp','Tag', 'TAG_PLOT\d_LINE_SSJT');
if isempty(hdls)
hdls = findobj('-regexp','Tag', 'TAG_PLOT\d_LINE_SSPS');
end
if ~isempty(hdls)
hdl_current_axes = get(hdls(1),'parent');
axes( hdl_current_axes );
% Plot mean temperature climatology
% ---------------------------------
line(dayd, mean_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_MEAN_SSTP', 'Linestyle', '-', 'Color','k');
line(dayd, mean_sstp + 3 * std_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_PLUS_SSTP', 'Linestyle', '-', 'Color','r');
line(dayd, mean_sstp - 3 * std_sstp, ...
'Tag', 'TAG_LINE_CLIMATO_STDDEV_MINUS_SSTP', 'Linestyle', '-', 'Color','r');
end
% Store the handle of the bucketline
% ----------------------------------
%set( hPlotAxes(1), 'UserData', hLine1 );
......
......@@ -7,8 +7,7 @@ tsg = getappdata( hMainFig, 'tsg_data');
% Initialise axis limits
% ----------------------
for i = 1 : length( hPlotAxes )
set( hPlotAxes(i),...
'Visible', 'off', 'box', 'on', 'XLimMode', 'auto', 'YLimMode', 'auto');
set( hPlotAxes(i),...
'Visible', 'off', 'box', 'on', 'XLimMode', 'auto', 'YLimMode', 'auto');
end
end
\ No newline at end of file
......@@ -1984,9 +1984,22 @@ end
% Draw the 3 plots of the validation figure
% -----------------------------------------
resetAxes( hMainFig, hPlotAxes )
% test if climatology is selected
% -------------------------------
if strcmp(get(findobj('Tag','PUSHTOOL_CLIM'), 'enable'), 'on')
Clim_OffMenuCallback;
end
plot_Validation( hMainFig, hPlotAxes, 1, PARA );
plot_Validation( hMainFig, hPlotAxes, 2, 'SSJT' );
plot_Validation( hMainFig, hPlotAxes, 3, 'SPDC' );
% test if climatology is selected
% -------------------------------
if strcmp(get(findobj('Tag','PUSHTOOL_CLIM'), 'enable'), 'on')
Clim_OnMenuCallback;
end
else
msgbox( ['No ' PARA ' data in the file'], 'Parameter choice', 'warn', 'modal');
......
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