From d8875866a192ac9c1be6ac27f26f7a7995be7f8d Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Thu, 17 Jan 2008 16:19:00 +0000 Subject: [PATCH] =?UTF-8?q?ajout=20tsg=5Futil/display=5FQC.m=20oubli=C3=A9?= =?UTF-8?q?=20au=20commit=20pr=C3=A9c=C3=A9dent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsg_util/display_QC.m | 59 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 tsg_util/display_QC.m diff --git a/tsg_util/display_QC.m b/tsg_util/display_QC.m new file mode 100644 index 0000000..7b1cdd6 --- /dev/null +++ b/tsg_util/display_QC.m @@ -0,0 +1,59 @@ +function display_QC( hGUI, hAxes ) +% +% Function to plot the Water Sample measurements +% +% Input +% ----- +% hGUI ............... Handel to the user interface +% hAxes .............. Handels to the graphic axes +% +% Output +% ------ +% + +% Retrieve named application data +% ------------------------------- +tsg = getappdata( hGUI, 'tsg_data'); + +% set panel visible +% ----------------- +hdlPanel = findobj(hGUI, 'tag', 'TAG_QC_DISPLAY_PANEL'); +set(hdlPanel, 'visible', 'on'); + +% get list of keys from hashtable tsg.qc.hash, defined inside +% tsg_initialisation.m +% ----------------------------------------------------------- +qc_list = get(tsg.qc.hash); + +% Plot the Salinity with the right color code +% ------------------------------------------- +%bgColor = get(hAxes(1), '); + +% 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}; + code = get(tsg.qc.hash, key, 'code'); + + % get the uicontrol handle from tag construct with key + % ---------------------------------------------------- + hdlText = findobj(hGUI, 'tag', ['TAG_QC_TEXT_' key]); + + % find number of sample flag with this QC code + % -------------------------------------------- + ind = find(tsg.SSPS_QC == code); + + % if index empty, no data with this flag, set field to zero (char) + % ---------------------------------------------------------------- + if isempty(ind) + set(hdlText, 'String', '0'); + else + set(hdlText, 'String', num2str(numel(ind))); + end + +end + + -- GitLab