reporting: cosmetic changes

time-shift
Houtan Bastani 2013-03-15 17:48:46 +01:00
parent ed5f2a8bf0
commit d8ae22cebd
8 changed files with 62 additions and 17 deletions

View File

@ -81,8 +81,8 @@ if ~isempty(o.shade)
% From ShadePlotForEmpahsis (Matlab Exchange) % From ShadePlotForEmpahsis (Matlab Exchange)
% use patch bc area doesn't work with matlab2tikz % use patch bc area doesn't work with matlab2tikz
patch([repmat(x1, 1, 2) repmat(x2, 1, 2)], [yrange fliplr(yrange)], ... patch([repmat(x1, 1, 2) repmat(x2, 1, 2)], ...
'b', 'FaceAlpha', .2); [yrange fliplr(yrange)], 'b', 'FaceAlpha', .2);
end end
set(gca,'XTick', x); set(gca,'XTick', x);

View File

@ -1,5 +1,16 @@
function ps = addPage(ps, varargin) function o = addPage(o, varargin)
% function ps = addPage(ps, varargin) % function o = addPage(o, varargin)
% Sections Class Constructor
%
% INPUTS
% o [pages] pages object
% varargin options to @page.page
%
% OUTPUTS
% o [pages] pages object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team % Copyright (C) 2013 Dynare Team
% %
@ -18,5 +29,5 @@ function ps = addPage(ps, varargin)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
ps.objArray = ps.objArray.addObj(page(varargin{:})); o.objArray = o.objArray.addObj(page(varargin{:}));
end end

View File

@ -3,7 +3,7 @@ function display(o)
% Display a Pages object % Display a Pages object
% %
% INPUTS % INPUTS
% none % ps [pages] pages object
% %
% OUTPUTS % OUTPUTS
% none % none

View File

@ -1,5 +1,16 @@
function e = getPages(ps, varargin) function e = getPages(ps, varargin)
% function e = getPages(ps, varargin) % function e = getPages(ps, varargin)
% Sections Class Constructor
%
% INPUTS
% ps [pages] pages object
% varargin options to @objArray.getObjs
%
% OUTPUTS
% ps [pages] array of page objects
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team % Copyright (C) 2013 Dynare Team
% %

View File

@ -1,5 +1,15 @@
function np = numPages(ps) function n = numPages(o)
% function np = numPages(ps) % function n = numPages(o)
% Sections Class Constructor
%
% INPUTS
% o [page] pages object
%
% OUTPUTS
% n [integer] number of pages in o
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team % Copyright (C) 2013 Dynare Team
% %
@ -18,5 +28,5 @@ function np = numPages(ps)
% You should have received a copy of the GNU General Public License % You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>. % along with Dynare. If not, see <http://www.gnu.org/licenses/>.
np = ps.objArray.numObjs(); n = o.objArray.numObjs();
end end

View File

@ -3,10 +3,11 @@ function ps = pages(varargin)
% Pages Class Constructor % Pages Class Constructor
% %
% INPUTS % INPUTS
% Optional pages object % varargin 0 args : empty pages object
% 1 arg : must be pages object (return a copy of arg)
% %
% OUTPUTS % OUTPUTS
% pages object % ps [pages] pages object
% %
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none
@ -33,8 +34,8 @@ switch nargin
ps = class(struct, 'pages', objArray()); ps = class(struct, 'pages', objArray());
case 1 case 1
assert(isa(varargin{1}, 'pages'), ... assert(isa(varargin{1}, 'pages'), ...
['@pages.pages: With one arg to pages constructor, you must ' ... ['@pages.pages: With one arg to pages constructor, you must ' ...
'pass an pages object or a char.']); 'pass an pages object or a char.']);
ps = varargin{1}; ps = varargin{1};
otherwise otherwise
error('@pages.pages: invalid number of arguments'); error('@pages.pages: invalid number of arguments');

View File

@ -3,10 +3,11 @@ function o = write(o, fid)
% Write Pages object % Write Pages object
% %
% INPUTS % INPUTS
% fid - int, file id % o [pages] pages object
% fid [integer] file id
% %
% OUTPUTS % OUTPUTS
% o - this % o [pages] pages object
% %
% SPECIAL REQUIREMENTS % SPECIAL REQUIREMENTS
% none % none

View File

@ -1,5 +1,16 @@
function s = sections(varargin) function s = sections(varargin)
%function s = sections(varargin) %function s = sections(varargin)
% Sections Class Constructor
%
% INPUTS
% varargin 0 args : empty sections object
% 1 arg : must be sections object (return a copy of arg)
%
% OUTPUTS
% ps [sections] sections object
%
% SPECIAL REQUIREMENTS
% none
% Copyright (C) 2013 Dynare Team % Copyright (C) 2013 Dynare Team
% %
@ -22,8 +33,8 @@ switch nargin
case 0 case 0
s = class(struct, 'sections', objArray()); s = class(struct, 'sections', objArray());
case 1 case 1
assert(isa(varargin{1}, 'sections'), ['Sections constructor: the only ' ... assert(isa(varargin{1}, 'sections'), ['@sections.sections: the ' ...
'valid arguments are sections objects']); 'only valid arguments are sections objects']);
s = varargin{1}; s = varargin{1};
otherwise otherwise
error('@sections.sections: invalid number of arguments'); error('@sections.sections: invalid number of arguments');