1function rep = CountryGraphPage(rep, countryAbbr, db_q, dc_q, prange, srange) 2% Copyright (C) 2013-2019 Dynare Team 3% 4% This file is part of Dynare. 5% 6% Dynare is free software: you can redistribute it and/or modify 7% it under the terms of the GNU General Public License as published by 8% the Free Software Foundation, either version 3 of the License, or 9% (at your option) any later version. 10% 11% Dynare is distributed in the hope that it will be useful, 12% but WITHOUT ANY WARRANTY; without even the implied warranty of 13% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14% GNU General Public License for more details. 15% 16% You should have received a copy of the GNU General Public License 17% along with Dynare. If not, see <http://www.gnu.org/licenses/>. 18 19startpoint = strings(prange(1)); 20shaded = strings(srange(1)); 21endpoint = strings(prange(end)); 22rep.addGraph('title', 'Interest Rate', ... 23 'xrange', prange, ... 24 'shade', srange, ... 25 'showZeroline', true, ... 26 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 27 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 28 'xTickLabelRotation', 0, ... 29 'writeCSV', true); 30rep.addSeries('data', db_q{['RS_' countryAbbr]}, ... 31 'graphLineColor', 'blue', ... 32 'graphLineStyle', 'dashed', ... 33 'graphLineWidth', 1.5); 34rep.addSeries('data', dc_q{['RS_' countryAbbr]}, ... 35 'graphLineColor', 'blue', ... 36 'graphLineWidth', 1.5); 37 38rep.addGraph('title', 'Output Gap', ... 39 'xrange', prange, ... 40 'shade', srange, ... 41 'showZeroline', true, ... 42 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 43 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 44 'xTickLabelRotation', 0); 45rep.addSeries('data', db_q{['Y_' countryAbbr]}, ... 46 'graphLineColor', 'blue', ... 47 'graphLineStyle', 'dashed', ... 48 'graphLineWidth', 1.5); 49rep.addSeries('data', dc_q{['Y_' countryAbbr]}, ... 50 'graphLineColor', 'blue', ... 51 'graphLineWidth', 1.5); 52 53rep.addGraph('title', 'Headline Inflation (y/y)', ... 54 'xrange', prange, ... 55 'shade', srange, ... 56 'showZeroline', true, ... 57 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 58 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 59 'xTickLabelRotation', 0); 60rep.addSeries('data', db_q{['PCH_PIE4_' countryAbbr]}, ... 61 'graphLineColor', 'blue', ... 62 'graphLineStyle', 'dashed', ... 63 'graphLineWidth', 1.5); 64rep.addSeries('data', dc_q{['PCH_PIE4_' countryAbbr]}, ... 65 'graphLineColor', 'blue', ... 66 'graphLineWidth', 1.5); 67 68rep.addGraph('title', 'Headline Inflation (q/q)', ... 69 'xrange', prange, ... 70 'shade', srange, ... 71 'showZeroline', true, ... 72 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 73 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 74 'xTickLabelRotation', 0); 75rep.addSeries('data', db_q{['PCH_PIE_' countryAbbr]}, ... 76 'graphLineColor', 'blue', ... 77 'graphLineStyle', 'dashed', ... 78 'graphLineWidth', 1.5); 79rep.addSeries('data', dc_q{['PCH_PIE_' countryAbbr]}, ... 80 'graphLineColor', 'blue', ... 81 'graphLineWidth', 1.5); 82 83rep.addGraph('title', 'GDP Growth (q/q)', ... 84 'xrange', prange, ... 85 'shade', srange, ... 86 'showZeroline', true, ... 87 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 88 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 89 'xTickLabelRotation', 0); 90rep.addSeries('data', db_q{['PCH_GROWTH_' countryAbbr]}, ... 91 'graphLineColor', 'blue', ... 92 'graphLineStyle', 'dashed', ... 93 'graphLineWidth', 1.5); 94rep.addSeries('data', dc_q{['PCH_GROWTH_' countryAbbr]}, ... 95 'graphLineColor', 'blue', ... 96 'graphLineWidth', 1.5); 97 98rep.addGraph('title', 'Core Inflation (y/y)', ... 99 'titleFormat', '\Huge', ... 100 'xrange', prange, ... 101 'shade', srange, ... 102 'showZeroline', true, ... 103 'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ... 104 'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},... 105 'xTickLabelRotation', 0); 106rep.addSeries('data', db_q{['PCH_PIEX4_' countryAbbr]}, ... 107 'graphLineColor', 'blue', ... 108 'graphLineStyle', 'dashed', ... 109 'graphLineWidth', 1.5); 110rep.addSeries('data', dc_q{['PCH_PIEX4_' countryAbbr]}, ... 111 'graphLineColor', 'blue', ... 112 'graphLineWidth', 1.5); 113end