Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dóra Kocsis
dynare
Commits
e3bb2760
Commit
e3bb2760
authored
Apr 25, 2013
by
Houtan Bastani
Browse files
reporting: @graph: add option shade_opacity
parent
75b5f1d1
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@graph/createGraph.m
View file @
e3bb2760
...
@@ -88,7 +88,7 @@ if ~isempty(o.shade)
...
@@ -88,7 +88,7 @@ if ~isempty(o.shade)
% 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
)],
[
0
1
0
],
...
'
F
ace
A
lpha'
,
.
2
);
'
f
ace
a
lpha'
,
o
.
shade_opacity
);
children
=
get
(
gca
(),
'children'
);
children
=
get
(
gca
(),
'children'
);
children
=
[
children
(
2
:
end
);
sh
];
children
=
[
children
(
2
:
end
);
sh
];
set
(
gca
(),
'children'
,
children
);
set
(
gca
(),
'children'
,
children
);
...
...
matlab/reports/@graph/graph.m
View file @
e3bb2760
...
@@ -45,10 +45,12 @@ o.footnote = '';
...
@@ -45,10 +45,12 @@ o.footnote = '';
o
.
figname
=
''
;
o
.
figname
=
''
;
o
.
data
=
''
;
o
.
data
=
''
;
o
.
seriestouse
=
''
;
o
.
seriestouse
=
''
;
o
.
shade
=
''
;
o
.
xrange
=
''
;
o
.
xrange
=
''
;
o
.
yrange
=
''
;
o
.
yrange
=
''
;
o
.
shade
=
''
;
o
.
shade_opacity
=
.
2
;
o
.
grid
=
true
;
o
.
grid
=
true
;
o
.
legend
=
false
;
o
.
legend
=
false
;
...
@@ -95,6 +97,9 @@ assert(islogical(o.legend), '@graph.graph: legend must be either true or 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
(
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
(
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
(
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
=
...
valid_legend_locations
=
...
{
'North'
,
'South'
,
'East'
,
'West'
,
...
{
'North'
,
'South'
,
'East'
,
'West'
,
...
'NorthEast'
,
'SouthEast'
,
'NorthWest'
,
'SouthWest'
,
...
'NorthEast'
,
'SouthEast'
,
'NorthWest'
,
'SouthWest'
,
...
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment