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
a961069a
Commit
a961069a
authored
Jul 22, 2013
by
Houtan Bastani
Browse files
reporting: @graph: add new option graphSize
parent
29552327
Changes
3
Hide whitespace changes
Inline
Side-by-side
doc/dynare.texi
View file @
a961069a
...
...
@@ -8240,7 +8240,7 @@ command. Default: @code{`!'}
@
end
table
@
end
defmethod
@defmethod Report addGraph data, figname, showGrid, showLegend, showLegendBox, legendLocation, legendOrientation, legendFontSize, seriesToUse, shade, shadeColor, shadeOpacity, title, xlabel, ylabel, xrange, yrange, showZeroline
@
defmethod
Report
addGraph
data
,
figname
,
graphSize
,
showGrid
,
showLegend
,
showLegendBox
,
legendLocation
,
legendOrientation
,
legendFontSize
,
seriesToUse
,
shade
,
shadeColor
,
shadeOpacity
,
title
,
xlabel
,
ylabel
,
xrange
,
yrange
,
showZeroline
Adds
a
@
code
{
Graph
}
to
a
@
code
{
Section
}.
@
optionshead
@
table
@
code
...
...
@@ -8253,6 +8253,12 @@ The @code{dynSeries} that provides the data for the graph. Default:
The
name
to
use
when
saving
this
figure
.
Default
:
@
code
{[
tempname
`.
tex
']}
@item graphSize, @code{NUMERICAL_VECTOR}
The width and height to be passed to the third and fourth elements of
the array passed to the @code{`Position'
}
option
of
Matlab
's
@code{figure} command, passed as a vector of size @math{2}. Default:
Matlab sets width and height
@item showGrid, @code{BOOLEAN}
Whether or not to display the minor grid on the graph. Default:
@code{true}
...
...
matlab/reports/@graph/createGraph.m
View file @
a961069a
...
...
@@ -38,7 +38,11 @@ if ~o.seriesElements.numSeriesElements()
return
;
end
h
=
figure
(
'visible'
,
'off'
);
if
isempty
(
o
.
graphSize
)
h
=
figure
(
'visible'
,
'off'
);
else
h
=
figure
(
'visible'
,
'off'
,
'position'
,[
1
,
1
,
o
.
graphSize
(
1
),
o
.
graphSize
(
2
)]);
end
hold
on
;
box
on
;
if
o
.
showGrid
...
...
matlab/reports/@graph/graph.m
View file @
a961069a
...
...
@@ -59,6 +59,8 @@ o.legendFontSize = 8;
o
.
showZeroline
=
false
;
o
.
graphSize
=
[];
if
nargin
==
1
assert
(
isa
(
varargin
{
1
},
'graph'
),[
'@graph.graph: with one arg you '
...
'must pass a graph object'
]);
...
...
@@ -127,6 +129,10 @@ assert(isempty(o.data) || isa(o.data, 'dynSeries'), ['@graph.graph: data must '
assert
(
isempty
(
o
.
seriesToUse
)
||
iscellstr
(
o
.
seriesToUse
),
[
'@graph.graph: '
...
'series to use must be a cell array of string(s)'
]);
assert
(
isempty
(
o
.
graphSize
)
||
((
isfloat
(
o
.
graphSize
)
&&
length
(
o
.
graphSize
)
==
2
)),
...
[
'@graph.graph: graphSize is specified as an array with two float '
...
'entries, [width height]'
]);
% using o.seriesToUse, create series objects and put them in o.seriesElements
if
~
isempty
(
o
.
data
)
if
isempty
(
o
.
seriesToUse
)
...
...
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