From 1c25b7ddaae7ce84dfaf1b8f126800e45cc79613 Mon Sep 17 00:00:00 2001 From: Houtan Bastani <houtan@dynare.org> Date: Mon, 27 Apr 2015 18:17:38 +0200 Subject: [PATCH] reporting: update test for fan charts, #867 --- tests/reporting/runDynareReport.m | 28 ++++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/tests/reporting/runDynareReport.m b/tests/reporting/runDynareReport.m index c1c48311f7..61057946b7 100644 --- a/tests/reporting/runDynareReport.m +++ b/tests/reporting/runDynareReport.m @@ -257,26 +257,46 @@ rep = rep.addSeries('graphHline', 460, ... 'graphLineColor', 'red', ... 'graphLineWidth', 1.5); +a=dseries([1:200]', '1984q1'); +b=a; +c=a; +d=a; +b(dates('2012q2'):dates('2015q2'))=b(dates('2012q2'):dates('2015q2'))+2; +c(dates('2012q2'):dates('2015q2'))=c(dates('2012q2'):dates('2015q2'))+4; +d(dates('2012q2'):dates('2015q2'))=d(dates('2012q2'):dates('2015q2'))+6; rep = rep.addGraph('title', 'Equilibrium World Real Food Price', ... 'xrange', prange, ... 'shade', srange, ... 'showLegend', true, ... 'xTickLabelRotation', 0); -rep = rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ... +rep = rep.addSeries('data', a, ... 'graphLineColor', 'blue', ... 'graphLineWidth', 1.5, ... 'graphLegendName', 'baseline', ... 'graphMiscTikzAddPlotOptions', 'mark=halfcircle*,color=red'); -rep = rep.addSeries('data', dc_q{'LRPFOOD_BAR_WORLD'}, ... +rep = rep.addSeries('data', b, ... 'graphLineColor', 'blue', ... 'graphLineStyle', 'dashed', ... 'graphLineWidth', 1.5, ... 'graphLegendName', 'control', ... - 'graphMiscTikzAddPlotOptions', 'mark=halfcircle*,mark options={rotate=90,scale=3}'); + 'graphMiscTikzAddPlotOptions', 'mark=halfcircle*,mark options={rotate=90,scale=3}', ... + 'graphFanShadeColor', 'red', 'graphFanShadeOpacity', 40); +rep = rep.addSeries('data', c, ... + 'graphLineColor', 'blue', ... + 'graphLineStyle', 'dashed', ... + 'graphLineWidth', 1.5, ... + 'graphLegendName', 'control', .... + 'graphFanShadeColor', 'red', 'graphFanShadeOpacity', 30); +rep = rep.addSeries('data', d, ... + 'graphLineColor', 'blue', ... + 'graphLineStyle', 'dashed', ... + 'graphLineWidth', 1.5, ... + 'graphLegendName', 'control', ... + 'graphFanShadeColor', 'red', 'graphFanShadeOpacity', 20); %% Write & Compile Report rep.write(); rep.compile(); toc -end \ No newline at end of file +end -- GitLab