Commit 41b11709 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @graph: write title directly in latex file (as opposed to Matlab plot).

If you don't do this, the title will be centered over the plot (not including YTickLabel width) as opposed to within the cell. This can be weird if you have one table in the section as the plot title will not center with the page title.
parent 86952b06
......@@ -114,10 +114,6 @@ end
if ~isempty(o.ylabel)
ylabel(['$\textbf{\footnotesize ' o.ylabel '}$'], 'Interpreter', 'LaTex');
end
if ~isempty(o.title)
title( o.title, 'Interpreter', 'LaTex');
end
drawnow;
o.figname = [tempname '.tex'];
......
......@@ -34,7 +34,15 @@ if isempty(o.figname)
o = createGraph(o);
end
if ~isempty(o.title)
fprintf(fid,'\\begin{tabular}[x]{@{}c@{}}%s\\\\',o.title);
end
if ~isempty(o.figname)
fprintf(fid, '\\input{%s}', o.figname);
end
if ~isempty(o.title)
fprintf(fid,'\\end{tabular}',o.title);
end
end
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment