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
0cb0a23e
Commit
0cb0a23e
authored
Apr 05, 2013
by
Houtan Bastani
Browse files
reporting: @graph: add zeroline option
parent
1f9e6dea
Changes
2
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@graph/createGraph.m
View file @
0cb0a23e
...
@@ -101,6 +101,13 @@ end
...
@@ -101,6 +101,13 @@ end
if
~
isempty
(
o
.
title
)
if
~
isempty
(
o
.
title
)
title
(
o
.
title
,
'Interpreter'
,
'LaTex'
);
title
(
o
.
title
,
'Interpreter'
,
'LaTex'
);
end
end
if
o
.
zeroline
a
=
ylim
;
if
0
>
a
(
1
)
&&
0
<
a
(
2
)
plot
(
xlim
,
[
0
0
],
'color'
,
'k'
,
'LineWidth'
,
0.25
);
end
end
drawnow
;
drawnow
;
o
.
figname
=
[
tempname
'.tex'
];
o
.
figname
=
[
tempname
'.tex'
];
...
...
matlab/reports/@graph/graph.m
View file @
0cb0a23e
...
@@ -56,6 +56,8 @@ o.legend_location = 'SouthEast';
...
@@ -56,6 +56,8 @@ o.legend_location = 'SouthEast';
o
.
legend_orientation
=
'horizontal'
;
o
.
legend_orientation
=
'horizontal'
;
o
.
legend_font_size
=
8
;
o
.
legend_font_size
=
8
;
o
.
zeroline
=
false
;
if
nargin
==
1
if
nargin
==
1
assert
(
isa
(
varargin
{
1
},
'graph'
),[
'@graph.graph: with one arg you '
...
assert
(
isa
(
varargin
{
1
},
'graph'
),[
'@graph.graph: with one arg you '
...
'must pass a graph object'
]);
'must pass a graph object'
]);
...
@@ -90,6 +92,7 @@ assert(ischar(o.figname), '@graph.graph: figname must be a string');
...
@@ -90,6 +92,7 @@ assert(ischar(o.figname), '@graph.graph: figname must be a string');
assert
(
islogical
(
o
.
grid
),
'@graph.graph: grid must be either true or false'
);
assert
(
islogical
(
o
.
grid
),
'@graph.graph: grid must be either true or false'
);
assert
(
islogical
(
o
.
legend
),
'@graph.graph: legend must be either true or false'
);
assert
(
islogical
(
o
.
legend
),
'@graph.graph: legend 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'
);
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