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

correction d'un bug sur la prise en l'affichage du nom de la variable...

correction d'un bug sur la prise en l'affichage du nom de la variable selectionnée sur l'axe Y, meme quand la variable est vide.
Testé uniquement sur le plot 3, a généraliser par la suite si OK
parent b2d1fe37
No related branches found
No related tags found
No related merge requests found
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
......@@ -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 );
......
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