Skip to content
Snippets Groups Projects
Commit ad2b5fed authored by Houtan Bastani's avatar Houtan Bastani
Browse files

reporting: @graph: legend uses tex

parent 4841f700
Branches
Tags
No related merge requests found
......@@ -98,10 +98,11 @@ set(gca,'XTick', x);
set(gca,'XTickLabel', xlabels);
if o.legend
lh = legend(o.seriesElements.getNames());
lh = legend(o.seriesElements.getTexNames());
set(lh, 'orientation', o.legend_orientation);
set(lh, 'Location', o.legend_location);
set(lh, 'FontSize', o.legend_font_size);
set(lh, 'interpreter', 'latex');
legend('boxoff');
end
......
function s = getTexName(o)
%function s = getTexName(o)
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
assert(~isempty(o.data) && size(o.data, 2) == 1);
s = o.data(1).tex();
end
\ No newline at end of file
function names = getTexNames(o, varargin)
%function names = getTexNames(o, varargin)
% Copyright (C) 2013 Dynare Team
%
% This file is part of Dynare.
%
% Dynare is free software: you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation, either version 3 of the License, or
% (at your option) any later version.
%
% Dynare is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
se = o.objArray.getObjs(varargin{:});
names = {};
for i=1:length(se)
names(i) = se{i}.getTexName();
end
end
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment