IRIS report/graph

31 views
Skip to first unread message

Yaroslav Hul

unread,
Nov 4, 2011, 9:56:03 AM11/4/11
to iris-toolbox-discussion
Mirek hi,

When I'm running the following piece of code...

sty = struct();
sty.legend.location='SouthOutside';
sty.legend.orientation='horizontal';

t1=tseries(1:20,@rand);
t2=tseries(1:20,@rand);
t3=tseries(1:20,@rand);

x = report.new('My report');
x.pagebreak();
x.figure('My plots', 'subplot',[2,2],
'style',sty,'dateformat','YY:P','range',1:20);

x.graph('My tseries I','legend',false);
x.series('',[t1]);

x.graph('My tseries II','legend',true);
x.series({'Legend 1','Legend 2','Legend 3'},[t1 t2 t3]);

x.publish('my_report.pdf','maketitle',false,'papersize','a4paper');

... the second plot (the one with the legend) is vertically squeezed
compared to the first one.
How can I omit this? (I want the two plots to be exactly the same in
size, with the legend appearing below)

Thanks,

YH

nul0m

unread,
Nov 7, 2011, 1:33:36 AM11/7/11
to iris-t...@googlegroups.com
Hi, Slavko!

Try to play with report.graph option 'axesOptions'. Seems that such modification of your piece of code should work properly:

<...>

x.graph('My tseries I','legend',false);
x.series('',[t1]);

x.graph('My tseries II','legend',true,...
    'axesOptions',{'outerposition',[0.5 0.5 0.377 0.457]}); % <--- here
x.series({'Legend 1','Legend 2','Legend 3'},[t1 t2 t3]);

i've also attached report ps-file which was generated using this modification

hul.ps
Reply all
Reply to author
Forward
0 new messages