Commit cc923e53 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @graph: add shade_color option

parent e3bb2760
...@@ -87,7 +87,7 @@ if ~isempty(o.shade) ...@@ -87,7 +87,7 @@ if ~isempty(o.shade)
% From ShadePlotForEmpahsis (Matlab Exchange) % From ShadePlotForEmpahsis (Matlab Exchange)
% use patch bc area doesn't work with matlab2tikz % use patch bc area doesn't work with matlab2tikz
sh = patch([repmat(x1, 1, 2) repmat(x2, 1, 2)], ... sh = patch([repmat(x1, 1, 2) repmat(x2, 1, 2)], ...
[yrange fliplr(yrange)], [0 1 0], ... [yrange fliplr(yrange)], o.shade_color, ...
'facealpha', o.shade_opacity); 'facealpha', o.shade_opacity);
children =get(gca(), 'children'); children =get(gca(), 'children');
children = [children(2:end); sh]; children = [children(2:end); sh];
......
...@@ -49,6 +49,7 @@ o.xrange = ''; ...@@ -49,6 +49,7 @@ o.xrange = '';
o.yrange = ''; o.yrange = '';
o.shade = ''; o.shade = '';
o.shade_color = [0 1 0];
o.shade_opacity = .2; o.shade_opacity = .2;
o.grid = true; o.grid = true;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment