function [] = tdplot(res);
% PURPOSE: Graphic output of temporal disaggregation methods
% ------------------------------------------------------------
% SYNTAX: tdlot(res) 
% ------------------------------------------------------------
% OUTPUT: Graphic output
% ------------------------------------------------------------
% INPUT: res: structure generated by td programs
% ------------------------------------------------------------
% LIBRARY: tduni_plot, td_plot, mtd_plot
% ------------------------------------------------------------
% SEE ALSO: 

% written by:
%  Enrique M. Quilis
%  Macroeconomic Research Department
%  Ministry of Economy and Competitiveness
%  <enrique.quilis@mineco.es>

% Version 1.2 [December 2011]

if (nargin == 1)
    switch res.meth
        case {'Boot-Feibes-Lisman','Denton','Stram-Wei'}
            tduni_plot(res);
        case {'Fernandez','Chow-Lin','Litterman','Santos Silva-Cardoso','Proietti'}
            td_plot(res);
        case {'Multivariate Denton','Proportional Multivariate Denton', ...
                'Multivariate Di Fonzo','Multivariate Rossi'}
            mtd_plot(res);
    end
else
    switch res.meth
        case {'Boot-Feibes-Lisman','Denton','Stram-Wei'}
            tduni_plot(res,file_sal);
        case {'Fernandez','Chow-Lin','Litterman','Santos Silva-Cardoso'}
            td_plot(res,file_sal);
        case {'Multivariate Denton','Proportional Multivariate Denton', ...
                'Multivariate Di Fonzo','Multivariate Rossi'}
            mtd_plot(res,file_sal);
    end
end

