Skip to content
GitLab
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
57836895
Commit
57836895
authored
Mar 07, 2013
by
Houtan Bastani
Browse files
reporting (WIP)
parent
f89edf47
Changes
6
Hide whitespace changes
Inline
Side-by-side
matlab/reports/@graph/createGraph.m
View file @
57836895
...
...
@@ -3,10 +3,10 @@ function o = createGraph(o)
% Create the graph
%
% INPUTS
%
none
%
o - Graph Object
%
% OUTPUTS
%
none
%
o - Graph Object
%
% SPECIAL REQUIREMENTS
% none
...
...
@@ -37,9 +37,14 @@ end
%o = readConfig(o);
disp
(
'creating plot..........'
);
h
=
figure
(
'visible'
,
'off'
);
hold
on
;
box
on
;
if
o
.
grid
grid
on
;
set
(
gca
,
'GridLineStyle'
,
'--'
);
end
%set(0, 'CurrentFigure',h);
%set(h, 'PaperPositionMode', 'auto');
%set(h, 'units', 'normalized', 'outerposition', [0 0 1 1]);
...
...
@@ -90,16 +95,18 @@ if ~isempty(o.ylabel)
end
if
~
isempty
(
o
.
title
)
title
(
[
'$\textbf{\large '
o
.
title
'}$'
],
'I
nterpreter'
,
'LaTex'
);
title
(
o
.
title
,
'i
nterpreter'
,
'none'
,
'FontSize'
,
20
);
end
drawnow
;
o
.
figname
=
[
'figure-'
num2str
(
cputime
)
'.tex'
];
disp
(
' converting to tex....'
);
matlab2tikz
(
'filename'
,
o
.
figname
,
...
'showInfo'
,
false
,
...
'showWarnings'
,
false
,
...
'checkForUpdates'
,
false
);
grid
off
;
box
off
;
hold
off
;
close
(
h
);
...
...
matlab/reports/@graph/graph.m
View file @
57836895
...
...
@@ -44,6 +44,8 @@ o.data = '';
o
.
seriestoplot
=
'all'
;
o
.
shade
=
''
;
%{1959q1:1964q4}
o
.
grid
=
true
;
o
.
legend
=
false
;
o
.
legend_location
=
'SouthEast'
;
o
.
legend_orientation
=
'horizontal'
;
...
...
matlab/reports/@page/page.m
View file @
57836895
...
...
@@ -33,6 +33,7 @@ o = struct;
o
.
paper
=
''
;
o
.
title
=
''
;
o
.
orientation
=
''
;
o
.
footnote
=
''
;
o
.
sections
=
sections
();
if
nargin
==
1
...
...
matlab/reports/@page/write.m
View file @
57836895
...
...
@@ -32,8 +32,15 @@ assert(fid ~= -1);
fprintf
(
fid
,
'\n%% Page Object\n'
);
if
~
isempty
(
o
.
title
)
fprintf
(
fid
,
'\\centerline{
{
\\
L
arge
%s}}\n'
,
o
.
title
);
fprintf
(
fid
,
'\\centerline{\\
l
arge
\\textbf{
%s}}\n'
,
o
.
title
);
end
if
~
isempty
(
o
.
footnote
)
for
i
=
1
:
length
(
o
.
footnote
)
fprintf
(
fid
,
'\\blfootnote{\\tiny %d. %s}'
,
i
,
o
.
footnote
{
i
});
end
end
if
strcmpi
(
o
.
orientation
,
'landscape'
)
fprintf
(
fid
,
'\\begin{landscape}\n'
)
end
...
...
matlab/reports/@report/report.m
View file @
57836895
...
...
@@ -34,10 +34,11 @@ o = struct;
o
.
title
=
''
;
o
.
orientation
=
'portrait'
;
o
.
paper
=
'a4'
;
o
.
margin
=
'2cm'
;
o
.
margin
=
'2
.5
cm'
;
o
.
pages
=
pages
();
o
.
filename
=
'report.tex'
;
o
.
config
=
''
;
o
.
showdate
=
true
;
if
nargin
==
1
assert
(
isa
(
varargin
{
1
},
'report'
),[
'With one arg to Report constructor, '
...
...
...
matlab/reports/@report/write.m
View file @
57836895
...
...
@@ -41,10 +41,18 @@ if strcmpi(o.orientation, 'landscape')
fprintf
(
fid
,
',landscape'
);
end
fprintf
(
fid
,
']{geometry}\n'
);
fprintf
(
fid
,
'\\usepackage{graphicx}\n'
);
fprintf
(
fid
,
'\\usepackage{pdflscape}\n'
);
fprintf
(
fid
,
'\\usepackage{pgf}\n'
);
fprintf
(
fid
,
'\\usepackage{pgfplots}\n'
);
fprintf
(
fid
,
'\\usepackage{graphicx, pdflscape, pgf, pgfplots}\n'
);
fprintf
(
fid
,
[
'\\makeatletter\n'
...
'\\def\\blfootnote{\\gdef\\@thefnmark{}\\@footnotetext}\n'
...
'\\makeatother\n'
]);
if
o
.
showdate
fprintf
(
fid
,
'\\usepackage{fancyhdr, datetime}\n'
);
fprintf
(
fid
,
'\\newdateformat{reportdate}{\\THEDAY\\ \\shortmonthname\\ \\THEYEAR}\n'
);
fprintf
(
fid
,
'\\pagestyle{fancy}\n'
);
fprintf
(
fid
,
'\\renewcommand{\\headrulewidth}{0pt}\n'
);
fprintf
(
fid
,
'\\renewcommand{\\footrulewidth}{0.5pt}\n'
);
fprintf
(
fid
,
'\\rfoot{\\scriptsize\\reportdate\\today\\ -- \\currenttime}\n'
);
end
fprintf
(
fid
,
'\\begin{document}\n'
);
o
.
pages
.
write
(
fid
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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