-
Notifications
You must be signed in to change notification settings - Fork 0
/
ay_plot_bound.m
45 lines (41 loc) · 1010 Bytes
/
ay_plot_bound.m
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
function ay_plot_bound(mode, x ,y, y_low, y_high, x_title,y_title,fig_title,color)
% plot figures
if nargin < 5
disp('Not enough input, quit');
return;
end
if nargin ==5
x_title = [];
y_title = [];
fig_title = [];
color =[ 0.9 0.9 0.9];
end
if nargin ==6
y_title = [];
fig_title = [];
color =[ 0.9 0.9 0.9];
end
if nargin ==7
fig_title = [];
color =[ 0.9 0.9 0.9];
end
% plots the data plus its bound
x_inc = x;
x_dec = x(end:-1:1);
set(fill([x_inc x_dec],[y_high y_low(end:-1:1)],color),'EdgeColor',color);
hold on;
h=plot(x,y,'b:');
set(h,'LineWidth',2);
if mode == 1 % single figure
hold off;
end
if isempty(x_title)==0
xlabel(x_title);
end
if isempty(y_title)==0
ylabel(x_title);
end
if isempty(fig_title)==0
title(fig_title);
end
end