reporting: fix legend entry for bar graphs

time-shift
Houtan Bastani 2014-12-29 20:22:14 +01:00
parent 0fbf99232d
commit 544e10fc29
2 changed files with 6 additions and 1 deletions

View File

@ -121,7 +121,7 @@ end
function writeLineOptions(o, fid)
if o.graphBar
fprintf(fid, '[ybar,color=%s,fill=%s,line width=%fpt',...
fprintf(fid, '[ybar,ybar legend,color=%s,fill=%s,line width=%fpt',...
o.graphBarColor, o.graphBarFillColor, o.graphBarWidth);
else
fprintf(fid, '[color=%s,%s,line width=%fpt,line join=round',...

View File

@ -156,6 +156,11 @@ rep = rep.addGraph('title', {'World Real Oil Price Index','SUBTITLE'}, ...
'xTicks', [1,5,10,15,find(srange(1)==prange),length(prange)], ...
'xTickLabels',{startpoint{:},'2008Q1','2009Q2','2010Q3',shaded{:}, endpoint{:}},...
'xTickLabelRotation', 0);
rep = rep.addSeries('data', db_q{'LRPFOOD_BAR_WORLD'}, ...
'graphBar', true, ...
'graphBarColor', 'red', ...
'graphBarFillColor', 'gray', ...
'graphBarWidth', 1);
db_q = db_q.tex_rename('LRPOIL_WORLD', 'Oil Price');
rep = rep.addSeries('data', db_q{'LRPOIL_WORLD'}, ...
'graphLineColor', 'blue', ...