reporting test: pass xTickLabels explicitly

time-shift
Houtan Bastani 2014-02-11 15:50:07 +01:00
parent e64d1e0952
commit 2942be0e69
2 changed files with 41 additions and 12 deletions

View File

@ -16,10 +16,14 @@ function rep = CountryGraphPage(rep, countryAbbr, db_q, dc_q, prange, srange)
% You should have received a copy of the GNU General Public License
% along with Dynare. If not, see <http://www.gnu.org/licenses/>.
shaded = strings(srange(1));
endpoint = strings(prange(end));
rep = rep.addGraph('title', 'Interest Rate', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['RS_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...
@ -31,7 +35,9 @@ rep = rep.addSeries('data', dc_q{['RS_' countryAbbr]}, ...
rep = rep.addGraph('title', 'Output Gap', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['Y_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...
@ -43,7 +49,9 @@ rep = rep.addSeries('data', dc_q{['Y_' countryAbbr]}, ...
rep = rep.addGraph('title', 'Headline Inflation (y/y)', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['PCH_PIE4_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...
@ -55,7 +63,9 @@ rep = rep.addSeries('data', dc_q{['PCH_PIE4_' countryAbbr]}, ...
rep = rep.addGraph('title', 'Headline Inflation (q/q)', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['PCH_PIE_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...
@ -67,7 +77,9 @@ rep = rep.addSeries('data', dc_q{['PCH_PIE_' countryAbbr]}, ...
rep = rep.addGraph('title', 'GDP Growth (q/q)', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['PCH_GROWTH_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...
@ -79,7 +91,9 @@ rep = rep.addSeries('data', dc_q{['PCH_GROWTH_' countryAbbr]}, ...
rep = rep.addGraph('title', 'Core Inflation (y/y)', ...
'xrange', prange, ...
'shade', srange, ...
'showZeroline', true);
'showZeroline', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{['PCH_PIEX4_' countryAbbr]}, ...
'graphLineColor', 'blue', ...
'graphLineStyle', 'dashed', ...

View File

@ -23,6 +23,9 @@ prange = dates('2007q1'):dates('2013q4');
forecast_date = dates('2012q2');
srange = forecast_date:prange(end);
shaded = strings(srange(1));
endpoint = strings(prange(end));
shortNames = {'US', 'EU', 'JA', 'EA6', 'LA6', 'RC6'};
longNames = {'Coca Cola', 'Kinder Bueno', 'Pizza', ...
'Vegetarianism Is Good', 'OS X', 'Dothraki'};
@ -147,7 +150,9 @@ rep = rep.addSection('height', '60mm');
rep = rep.addGraph('title', 'World Real Oil Price Index', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
db_q = db_q.tex_rename('LRPOIL_WORLD', 'Oil Price');
rep = rep.addSeries('data', db_q{'LRPOIL_WORLD'}, ...
'graphLineColor', 'blue', ...
@ -162,7 +167,9 @@ rep = rep.addSeries('data', db_q{'LRPOIL_BAR_WORLD'}, ...
rep = rep.addGraph('title', 'World Real Food Price Index', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
db_q = db_q.tex_rename('LRPFOOD_WORLD', 'Food Price');
rep = rep.addSeries('data', db_q{'LRPFOOD_WORLD'}, ...
'graphLineColor', 'blue', ...
@ -182,7 +189,9 @@ rep = rep.addSection('cols', 2);
rep = rep.addGraph('title', 'World Real Oil Price', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{'LRPOIL_WORLD'}, ...
'graphLineColor', 'blue', ...
'graphLineWidth', 1.5);
@ -194,7 +203,9 @@ rep = rep.addSeries('data', dc_q{'LRPOIL_WORLD'}, ...
rep = rep.addGraph('title', 'Equilibrium World Real Oil Price', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{'LRPOIL_BAR_WORLD'}, ...
'graphLineColor', 'blue', ...
'graphLineWidth', 1.5);
@ -206,7 +217,9 @@ rep = rep.addSeries('data', dc_q{'LRPOIL_BAR_WORLD'}, ...
rep = rep.addGraph('title', 'World Real Food Price', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{'LRPFOOD_WORLD'}, ...
'graphLineColor', 'blue', ...
'graphLineWidth', 1.5);
@ -218,7 +231,9 @@ rep = rep.addSeries('data', dc_q{'LRPFOOD_WORLD'}, ...
rep = rep.addGraph('title', 'Equilibrium World Real Food Price', ...
'xrange', prange, ...
'shade', srange, ...
'showLegend', true);
'showLegend', true, ...
'xTicks', [5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}});
rep = rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ...
'graphLineColor', 'blue', ...
'graphLineWidth', 1.5);