Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
function plot_TsgAdjusted( hTsgGUI, hPlotAxes )
% Function to plot :
% 1 - tsg.SSPS raw data on axes 2
% 2 - tsg.SSPS_ADJUSTED on axe 3
%
% Input
% -----
% hTsgGUI ........ Handel to the user interface
% hPlotAxes ...... Handels to the graphic axes
%
% TO DO :
% plot_TsgAdjusted : plot the computed error
FILLVALUE = 99.99;
% Retrieve named application data
% -------------------------------
tsg = getappdata( hTsgGUI, 'tsg_data');
% Only plot valid values
% ----------------------
ind = find(tsg.SSPS_ADJUSTED < FILLVALUE-1);
% Plot tsg.SSPS (raw data) on axes 3
% ----------------------------------
axes(hPlotAxes(3))
plot(tsg.DAYD, tsg.SSPS, 'k' );
hold on
% Plot tsg.SSPS_ADJUSTED (corrected data) on axes 3
% -------------------------------------------------
if ~isempty( ind )
plot(tsg.DAYD(ind), tsg.SSPS_ADJUSTED(ind), 'b' );
end
hold off
% Plot the difference tsg.SSPS_ADJUSTED-tsg.SSPS on axe 2
% -------------------------------------------------------
axes(hPlotAxes(2));
hold on
if ~isempty( ind )
plot(tsg.DAYD(ind), tsg.SSPS_ADJUSTED(ind)-tsg.SSPS(ind), 'b' );
end
hold off
% Formatted x-TIME axes
% ---------------------
set(hPlotAxes(3), 'Xlim', [tsg.DAYD(1)-1 tsg.DAYD(end)+1]);
set(hPlotAxes(3),'XTickMode','auto')
datetick(hPlotAxes(3),'x','keeplimits')
hold off