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
Dynare
reporting
Commits
f02e7f77
Commit
f02e7f77
authored
Jun 24, 2014
by
Houtan Bastani
Browse files
reporting: support a different shape for the axis in a graph
parent
168acbe6
Changes
2
Hide whitespace changes
Inline
Side-by-side
@graph/graph.m
View file @
f02e7f77
...
...
@@ -40,6 +40,8 @@ o.titleFormat = '';
o
.
ylabel
=
''
;
o
.
xlabel
=
''
;
o
.
axisShape
=
'box'
;
o
.
graphDirName
=
'tmpRepDir'
;
o
.
graphName
=
''
;
o
.
data
=
''
;
...
...
@@ -140,7 +142,8 @@ assert(any(strcmp(o.shadeColor, valid_shadeColor)), ['@graph.graph: shadeColor m
strjoin
(
valid_shadeColor
)]);
assert
(
any
(
strcmp
(
o
.
zeroLineColor
,
valid_shadeColor
)),
...
[
'@graph.graph: zeroLineColor must be one of '
strjoin
(
valid_shadeColor
)]);
assert
(
any
(
strcmp
(
o
.
axisShape
,
{
'box'
,
'L'
})),
[
'@graph.graph: shadeColor '
...
'must be one of
''
box
''
or
''
L
''
'
]);
valid_legend_locations
=
...
{
'south west'
,
'south east'
,
'north west'
,
'north east'
,
'outer north east'
};
assert
(
any
(
strcmp
(
o
.
legendLocation
,
valid_legend_locations
)),
...
...
...
@graph/writeGraphFile.m
View file @
f02e7f77
...
...
@@ -119,9 +119,14 @@ fprintf(fid, ['},\n',...
'width=%fin,\n'
...
'height=%fin,\n'
...
'scale only axis,\n'
...
'axis lines=box,\n'
...
'unbounded coords=jump,\n'
],
o
.
width
,
o
.
height
);
if
strcmpi
(
o
.
axisShape
,
'box'
)
fprintf
(
fid
,
'axis lines=box,\n'
);
elseif
strcmpi
(
o
.
axisShape
,
'L'
)
fprintf
(
fid
,
'axis x line=bottom,\naxis y line=left,\n'
);
end
if
~
isempty
(
o
.
title
{
1
})
fprintf
(
fid
,
'title style={align=center'
);
if
~
isempty
(
o
.
titleFormat
)
...
...
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