From 77102c214353263a37e9c7e36d32f9c69da28b05 Mon Sep 17 00:00:00 2001 From: Jacques Grelet <jacques.grelet@ird.fr> Date: Thu, 14 Jan 2010 14:35:31 +0000 Subject: [PATCH] =?UTF-8?q?correction=20d'un=20bug=20sur=20la=20prise=20en?= =?UTF-8?q?=20l'affichage=20du=20nom=20de=20la=20variable=20selectionn?= =?UTF-8?q?=C3=A9e=20sur=20l'axe=20Y,=20meme=20quand=20la=20variable=20est?= =?UTF-8?q?=20vide.=20Test=C3=A9=20uniquement=20sur=20le=20plot=203,=20a?= =?UTF-8?q?=20g=C3=A9n=C3=A9raliser=20par=20la=20suite=20si=20OK?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tsg_util/plot_Tsg.m | 48 +++++++++++++++++++------------------- tsg_util/plot_Validation.m | 4 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/tsg_util/plot_Tsg.m b/tsg_util/plot_Tsg.m index 9156ece..c781562 100644 --- a/tsg_util/plot_Tsg.m +++ b/tsg_util/plot_Tsg.m @@ -1,5 +1,5 @@ function plot_Tsg( hTsgGUI, hAxes, PlotNum, X, Y, QC, para, colVal, ... - lineType, markType, markSize ) + lineType, markType, markSize ) % % Function to plot TSG parameters % The program can plot parameter of style SSPS or SSPS_ADJUSTED @@ -15,7 +15,7 @@ function plot_Tsg( hTsgGUI, hAxes, PlotNum, X, Y, QC, para, colVal, ... % QC ............. QC array - If empty plot using Color specification % para % colVal ..........[] - Draw Para taking into account color QC code -% 'k''b'... - Draw Para using Color code +% 'k''b'... - Draw Para using Color code % lineType ....... Matlab type : 'none', '-', '--', ':', '-.' % markType ....... Matlab type % markSize ....... Integer @@ -32,55 +32,55 @@ if ~isempty( X ) && ~isempty( Y ) % get axes % -------- axes( hAxes(PlotNum) ); - + % Plot using QC % ------------- if ~isempty(QC) - + % get list of keys from hashtable tsg.qc.hash, defined inside % tsg_initialisation.m % ----------------------------------------------------------- qc_list = keys(tsg.qc.hash); - + % Plot Sample/TSG differences on axe 2 % iterate (loop) on each key store inside hastable % ------------------------------------------------ for key = qc_list - + % get key and some values in hashtable % ------------------------------------ - qcState = tsg.qc.hash.(key).state; - qcCode = tsg.qc.hash.(key).code; - qcColor = tsg.qc.hash.(key).color; -% qcState = get(tsg.qc.hash, key, 'state'); -% qcCode = get(tsg.qc.hash, key, 'code'); -% qcState = get(tsg.qc.hash, key, 'color'); - + qcState = tsg.qc.hash.(key).state; + qcCode = tsg.qc.hash.(key).code; + qcColor = tsg.qc.hash.(key).color; + % qcState = get(tsg.qc.hash, key, 'state'); + % qcCode = get(tsg.qc.hash, key, 'code'); + % qcState = get(tsg.qc.hash, key, 'color'); + % plot tsg salinity sample with right code/color % ---------------------------------------------- ind = find( QC == qcCode ); if ~isempty( ind ) - + line( X(ind), Y(ind), ... 'Tag', ['TAG_PLOT' num2str(PlotNum) '_LINE_' para '_' char(key)],... 'LineStyle', lineType, ... 'Marker', markType, 'MarkerSize', markSize, 'Color', qcColor); - + end end - + else - + line( X, Y, 'Tag', ['TAG_PLOT' num2str(PlotNum) '_LINE_' para], ... - 'LineStyle', lineType, ... - 'Marker', markType, 'MarkerSize', markSize, 'Color', colVal); + 'LineStyle', lineType, ... + 'Marker', markType, 'MarkerSize', markSize, 'Color', colVal); end -% hold off; +end + +% Write some 'Y' label +% ------------------ +set(get(hAxes(PlotNum), 'Ylabel'), 'Interpreter', 'none', 'String', para); - % Write some 'Y' label - % ------------------ - set(get(hAxes(PlotNum), 'Ylabel'), 'Interpreter', 'none', 'String', para); -end diff --git a/tsg_util/plot_Validation.m b/tsg_util/plot_Validation.m index d257675..224e827 100644 --- a/tsg_util/plot_Validation.m +++ b/tsg_util/plot_Validation.m @@ -83,10 +83,10 @@ switch nPlot % --------------------------------------------------------------------- case 3 erase_Line( hPlotAxes, 3 ); - if ~isempty( tsg.(PARA) ) +% if ~isempty( tsg.(PARA) ) plot_Tsg( hMainFig, hPlotAxes, 3, tsg.DAYD, tsg.(PARA),[],... PARA, 'k', lineType, '*', 2); - end + % end end axesCommonProp( hPlotAxes ); -- GitLab