diff --git a/matlab/reporting/@graph/createGraph.m b/matlab/reporting/@graph/createGraph.m index e3ca66c485fba3503e7bbce34c150a907202775b..22391ed0f7567bdb2553b5a74fb44eb41bbf6a58 100644 --- a/matlab/reporting/@graph/createGraph.m +++ b/matlab/reporting/@graph/createGraph.m @@ -88,7 +88,7 @@ if ~isempty(o.shade) % use patch bc area doesn't work with matlab2tikz sh = patch([repmat(x1, 1, 2) repmat(x2, 1, 2)], ... [yrange fliplr(yrange)], [0 1 0], ... - 'FaceAlpha', .2); + 'facealpha', o.shade_opacity); children =get(gca(), 'children'); children = [children(2:end); sh]; set(gca(), 'children', children); diff --git a/matlab/reporting/@graph/graph.m b/matlab/reporting/@graph/graph.m index 94b174eb5ed1aef8f0f31f80a7a3bb3a3c82125c..5f933dade60b29d55eb1dace67a074a3b039500b 100644 --- a/matlab/reporting/@graph/graph.m +++ b/matlab/reporting/@graph/graph.m @@ -45,10 +45,12 @@ o.footnote = ''; o.figname = ''; o.data = ''; o.seriestouse = ''; -o.shade = ''; o.xrange = ''; o.yrange = ''; +o.shade = ''; +o.shade_opacity = .2; + o.grid = true; o.legend = false; @@ -95,6 +97,9 @@ assert(islogical(o.legend), '@graph.graph: legend must be either true or false') assert(islogical(o.legend_boxoff), '@graph.graph: legend_boxoff must be either true or false'); assert(isint(o.legend_font_size), '@graph.graph: legend_font_size must be an integer'); assert(islogical(o.zeroline), '@graph.graph: zeroline must be either true or false'); +assert(isfloat(o.shade_opacity) && length(o.shade_opacity)==1 && ... + o.shade_opacity >= 0 && o.shade_opacity <= 1, ... + '@graph.graph: o.shade_opacity must be a real in [0 1]']); valid_legend_locations = ... {'North', 'South', 'East', 'West', ... 'NorthEast', 'SouthEast', 'NorthWest', 'SouthWest', ...