Skip to content
Snippets Groups Projects
Verified Commit 130105a6 authored by Houtan Bastani's avatar Houtan Bastani
Browse files

use inplace dseries functions

parent 47487b39
Branches
No related tags found
No related merge requests found
Pipeline #1696 failed
...@@ -23,10 +23,10 @@ longNames = {'Coca Cola', 'Kinder Bueno', 'Pizza', ... ...@@ -23,10 +23,10 @@ longNames = {'Coca Cola', 'Kinder Bueno', 'Pizza', ...
rep.addSeries('tableSubSectionHeader', 'A group', ... rep.addSeries('tableSubSectionHeader', 'A group', ...
'tableRowColor', 'red!22'); 'tableRowColor', 'red!22');
for i = 1:length(shortNames) for i = 1:length(shortNames)
db_a = db_a.tex_rename([seriesRootName shortNames{i}], longNames{i}); db_a = db_a.tex_rename_([seriesRootName shortNames{i}], longNames{i});
rep.addSeries('data', db_a{[seriesRootName shortNames{i}]}); rep.addSeries('data', db_a{[seriesRootName shortNames{i}]});
delta = dc_a{[seriesRootName shortNames{i}]}-db_a{[seriesRootName shortNames{i}]}; delta = dc_a{[seriesRootName shortNames{i}]}-db_a{[seriesRootName shortNames{i}]};
delta = delta.tex_rename('$\Delta$'); delta = delta.tex_rename_('$\Delta$');
rep.addSeries('data', delta, ... rep.addSeries('data', delta, ...
'tableShowMarkers', true, ... 'tableShowMarkers', true, ...
'tableAlignRight', true); 'tableAlignRight', true);
... ...
......
...@@ -30,7 +30,7 @@ rep.addTable('title', 'Commodities', ... ...@@ -30,7 +30,7 @@ rep.addTable('title', 'Commodities', ...
for i = 1:length(seriesNames) for i = 1:length(seriesNames)
rep.addSeries('data', db_q{seriesNames{i}{1}}); rep.addSeries('data', db_q{seriesNames{i}{1}});
delta = db_q{seriesNames{i}{1}} - dc_q{seriesNames{i}{1}}; delta = db_q{seriesNames{i}{1}} - dc_q{seriesNames{i}{1}};
delta = delta.tex_rename('$\Delta$'); delta = delta.tex_rename_('$\Delta$');
rep.addSeries('data', delta, ... rep.addSeries('data', delta, ...
'tableShowMarkers', true, ... 'tableShowMarkers', true, ...
'tableAlignRight', true); 'tableAlignRight', true);
... ...
......
...@@ -52,14 +52,14 @@ for i = 1:length(seriesNames) ...@@ -52,14 +52,14 @@ for i = 1:length(seriesNames)
any(strcmp(seriesNames{i}{1}, notForOtherThree)) any(strcmp(seriesNames{i}{1}, notForOtherThree))
continue continue
end end
db_q = db_q.tex_rename([seriesNames{i}{1} countryAbbr], seriesNames{i}{2}); db_q = db_q.tex_rename_([seriesNames{i}{1} countryAbbr], seriesNames{i}{2});
rep.addSeries('data', db_q{[seriesNames{i}{1} countryAbbr]}, ... rep.addSeries('data', db_q{[seriesNames{i}{1} countryAbbr]}, ...
'tableDataRhs', db_a{[seriesNames{i}{1} countryAbbr]}); 'tableDataRhs', db_a{[seriesNames{i}{1} countryAbbr]});
delta = db_q{[seriesNames{i}{1} countryAbbr]}-dc_q{[seriesNames{i}{1} countryAbbr]}; delta = db_q{[seriesNames{i}{1} countryAbbr]}-dc_q{[seriesNames{i}{1} countryAbbr]};
delta = delta.tex_rename('$\Delta$'); delta = delta.tex_rename_('$\Delta$');
deltaa = db_a{[seriesNames{i}{1} countryAbbr]}-dc_a{[seriesNames{i}{1} countryAbbr]}; deltaa = db_a{[seriesNames{i}{1} countryAbbr]}-dc_a{[seriesNames{i}{1} countryAbbr]};
deltaa = deltaa.tex_rename('$\Delta$'); deltaa = deltaa.tex_rename_('$\Delta$');
rep.addSeries('data', delta, ... rep.addSeries('data', delta, ...
'tableShowMarkers', true, ... 'tableShowMarkers', true, ...
'tableRowIndent', 2, ... 'tableRowIndent', 2, ...
... ...
......
...@@ -57,7 +57,7 @@ for i=1:length(seriesNames) ...@@ -57,7 +57,7 @@ for i=1:length(seriesNames)
end end
rep.addSeries('data', db_q{[seriesNames{i}{1} countryAbbr]}); rep.addSeries('data', db_q{[seriesNames{i}{1} countryAbbr]});
delta = db_q{[seriesNames{i}{1} countryAbbr]}-dc_q{[seriesNames{i}{1} countryAbbr]}; delta = db_q{[seriesNames{i}{1} countryAbbr]}-dc_q{[seriesNames{i}{1} countryAbbr]};
delta = delta.tex_rename('$\Delta$'); delta = delta.tex_rename_('$\Delta$');
rep.addSeries('data', delta, ... rep.addSeries('data', delta, ...
'tableShowMarkers', true, ... 'tableShowMarkers', true, ...
'tableAlignRight', true); 'tableAlignRight', true);
... ...
......
...@@ -108,10 +108,10 @@ rep.addVspace('number', 2); ...@@ -108,10 +108,10 @@ rep.addVspace('number', 2);
% Table 2 % Table 2
rep.addTable('title', 'Output Gap', 'range', larange, ... rep.addTable('title', 'Output Gap', 'range', larange, ...
'vlineAfter', dates('2011y'), 'tableDirName', 'page4table2'); 'vlineAfter', dates('2011y'), 'tableDirName', 'page4table2');
db_a = db_a.tex_rename('Y_WORLD', 'World'); db_a = db_a.tex_rename_('Y_WORLD', 'World');
rep.addSeries('data', db_a{'Y_WORLD'}); rep.addSeries('data', db_a{'Y_WORLD'});
delta = db_a{'Y_WORLD'}-dc_a{'Y_WORLD'}; delta = db_a{'Y_WORLD'}-dc_a{'Y_WORLD'};
delta = delta.tex_rename('$\Delta$'); delta = delta.tex_rename_('$\Delta$');
rep.addSeries('data', delta, ... rep.addSeries('data', delta, ...
'tableShowMarkers', true, ... 'tableShowMarkers', true, ...
'tableAlignRight', true); 'tableAlignRight', true);
...@@ -163,14 +163,14 @@ rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ... ...@@ -163,14 +163,14 @@ rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ...
'graphBarColor', 'red', ... 'graphBarColor', 'red', ...
'graphBarFillColor', 'gray', ... 'graphBarFillColor', 'gray', ...
'graphBarWidth', 1); 'graphBarWidth', 1);
db_q = db_q.tex_rename('LRPOIL_WORLD', 'Oil Price'); db_q = db_q.tex_rename_('LRPOIL_WORLD', 'Oil Price');
rep.addSeries('data', db_q{'LRPOIL_WORLD'}, ... rep.addSeries('data', db_q{'LRPOIL_WORLD'}, ...
'graphLineColor', 'blue', ... 'graphLineColor', 'blue', ...
'graphLineWidth', 1.5, ... 'graphLineWidth', 1.5, ...
'graphMarker', 'triangle*', ... 'graphMarker', 'triangle*', ...
'graphMarkerEdgeColor','black', ... 'graphMarkerEdgeColor','black', ...
'graphMarkerSize',4); 'graphMarkerSize',4);
db_q = db_q.tex_rename('LRPOIL_BAR_WORLD', 'Equilibrium Oil Price'); db_q = db_q.tex_rename_('LRPOIL_BAR_WORLD', 'Equilibrium Oil Price');
rep.addSeries('data', db_q{'LRPOIL_BAR_WORLD'}, ... rep.addSeries('data', db_q{'LRPOIL_BAR_WORLD'}, ...
'graphLineColor', 'green', ... 'graphLineColor', 'green', ...
'graphLineStyle', 'solid', ... 'graphLineStyle', 'solid', ...
...@@ -189,11 +189,11 @@ rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ... ...@@ -189,11 +189,11 @@ rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ...
'graphBarColor', 'green', ... 'graphBarColor', 'green', ...
'graphBarFillColor', 'yellow', ... 'graphBarFillColor', 'yellow', ...
'graphBarWidth', 1); 'graphBarWidth', 1);
db_q = db_q.tex_rename('LRPFOOD_WORLD', 'Food Price'); db_q = db_q.tex_rename_('LRPFOOD_WORLD', 'Food Price');
rep.addSeries('data', db_q{'LRPFOOD_WORLD'}, ... rep.addSeries('data', db_q{'LRPFOOD_WORLD'}, ...
'graphLineColor', 'blue', ... 'graphLineColor', 'blue', ...
'graphLineWidth', 1.5); 'graphLineWidth', 1.5);
db_q = db_q.tex_rename('LRPFOOD_BAR_WORLD', 'Equilibrium Food Price'); db_q = db_q.tex_rename_('LRPFOOD_BAR_WORLD', 'Equilibrium Food Price');
rep.addSeries('graphVline', dates('2009q2'), ... rep.addSeries('graphVline', dates('2009q2'), ...
'graphLineColor', 'red', ... 'graphLineColor', 'red', ...
'graphLineWidth', 1.5); 'graphLineWidth', 1.5);
...@@ -296,6 +296,14 @@ rep.addSeries('data', d, ... ...@@ -296,6 +296,14 @@ rep.addSeries('data', d, ...
'graphLegendName', 'control', ... 'graphLegendName', 'control', ...
'graphFanShadeColor', 'red', 'graphFanShadeOpacity', 20); 'graphFanShadeColor', 'red', 'graphFanShadeOpacity', 20);
% Page 26
% rep.addPage('title', {'report\_data test'}, ...
% 'titleFormat', {'\large\bfseries', '\large'});
% rep.addSection('cols', 1);
% rep.addTable('title', {'Table Data', 'subtitle 2'});
% rep.addData('data', [repmat({'a'},10,1) num2cell(rand(10,6))]);
%% Write & Compile Report %% Write & Compile Report
rep.write(); rep.write();
rep.compile(); rep.compile();
... ...
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment