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

joute une fonction d'affichache des statistiques sur les codes de qualité

parent a2e4d9ab
No related branches found
No related tags found
No related merge requests found
......@@ -53,22 +53,12 @@ for i=1:numel(qc_list)
strcat('.', color));
end
end
% ind = find(tsg.SSPS_QC == tsg.qc.Code.GOOD );
% plot(hAxes(1), tsg.DAYD(ind), tsg.SSPS(ind), ...
% strcat('.',tsg.qc.Color.GOOD));
%
% ind = find(tsg.SSPS_QC == tsg.qc.Code.PROBABLY_GOOD );
% plot(hAxes(1), tsg.DAYD(ind), tsg.SSPS(ind), ...
% strcat('.',tsg.qc.Color.PROBABLY_GOOD));
%
% ind = find(tsg.SSPS_QC == tsg.qc.Code.PROBABLY_BAD );
% plot(hAxes(1), tsg.DAYD(ind), tsg.SSPS(ind), ...
% strcat('.',tsg.qc.Color.PROBABLY_BAD));
%
% ind = find(tsg.SSPS_QC == tsg.qc.Code.BAD );
% plot(hAxes(1), tsg.DAYD(ind), tsg.SSPS(ind), ...
% strcat('.',tsg.qc.Color.BAD));
hold off;
hold off;
% refresh QC statistic panel
% --------------------------
display_QC( hTsgGUI, hAxes );
% set HandleVisibility 'On' to 'Callback' on first axes
% -----------------------------------------------------
......@@ -88,7 +78,7 @@ datetick(hAxes(3), 'x');
% Write some 'Y' label
% ------------------
set(get(hAxes(1), 'Ylabel'), 'String', 'Salinity');
set(get(hAxes(2), 'Ylabel'), 'String', 'Temperature (°C)');
set(get(hAxes(2), 'Ylabel'), 'String', 'Temperature (C)');
set(get(hAxes(3), 'Ylabel'), 'String', 'Ship Velocity (knots)');
% Make the axes visible
......
......@@ -456,6 +456,63 @@ for i=1:numel(qc_list)
end
end
%% Construct display Quality codes
% --------------------------------
hQcPanel = uipanel(...
'Parent', hMainFig, ...
'tag', 'TAG_QC_DISPLAY_PANEL',...
'HandleVisibility','on',...
'Visible', 'off',...
'BorderType', 'none',...
'Position', [.85, .75, .1, .15]);
% iterate (loop) on each key store inside hastable
% ------------------------------------------------
for i=1:numel(qc_list)
% get key and some values in hashtable
% ------------------------------------
key = qc_list{i};
label = get(tsg.qc.hash, key, 'label');
color = get(tsg.qc.hash, key, 'color');
state = get(tsg.qc.hash, key, 'state');
% construct context menu with only code set to 'on' (valid)
% ---------------------------------------------------------
if strcmp( state, 'on')
% add text QC display label
% -------------------------
uicontrol(...
'Parent', hQcPanel,...
'Style', 'text',...
'Units', 'normalized', ...
'Style', 'Text', ...
'Fontsize', 11, ...
'HorizontalAlignment', 'left', ...
'HandleVisibility','on', ...
'String', label,...
'ForegroundColor', color,...
'Position', [.1, .9-i*.12, .5, 0.12]);
% add edit QC display
% -------------------
uicontrol(...
'Parent', hQcPanel,...
'Style', 'text',...
'Units', 'normalized', ...
'Style', 'Text', ...
'Fontsize', 11, ...
'HorizontalAlignment', 'right', ...
'HandleVisibility','on', ...
'String', 'N/A',...
'ForegroundColor', color,...
'Tag', ['TAG_QC_TEXT_' key],...
'Position', [.7, .9-i*.12, .3, 0.12]);
end
end
% -------------------------
% Callbacks for tsgcqc_GUI
% ------------------------
......@@ -736,6 +793,9 @@ end
axes(hPlotAxes(1));
hold on
color = ['.' tsg.qc.active.Color];
% plot selected data with selected code
% --------------------------------------
plot(tsg.DAYD(ind), tsg.SSPS(ind), color );
hold off
......@@ -747,6 +807,10 @@ end
% ----------------------
setappdata( hMainFig, 'tsg_data', tsg);
% refresh QC statistic panel
% --------------------------
display_QC( hMainFig, hPlotAxes );
% enable ButtonMotion on main fig after select QC area
% ----------------------------------------------------
set( hMainFig, 'WindowButtonMotionFcn', @MouseMotion);
......
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