From 6dcf4e6545191481be02ed97dd97105fdcc1e0cf Mon Sep 17 00:00:00 2001 From: Christian Beckmann <c.beckmann@donders.ru.nl> Date: Wed, 13 Mar 2013 20:22:35 +0000 Subject: [PATCH] fixed timeseries plot width segfault --- Makefile | 2 +- melreport.cc | 13 +++++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 991a311..91d6883 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ include ${FSLCONFDIR}/default.mk -OPTFLAGS = -O3 -Wno-deprecated +OPTFLAGS = -O3 -Wno-deprecated -ggdb OPTFLAGS_alphaev6-dec-osf5.0-gcc2.95.2 = -O3 -mieee -mfp-trap-mode=sui PROJNAME = melodic diff --git a/melreport.cc b/melreport.cc index 76fe5c6..de801aa 100644 --- a/melreport.cc +++ b/melreport.cc @@ -144,6 +144,8 @@ namespace Melodic{ 0.05*(tmptc.Row(1).Maximum()-tmptc.Row(1).Minimum())); newplot.grid_swapdefault(); + newplot.set_xysize(750,150); + newplot.timeseries(tmptc, report.appendDir(string("t")+num2str(cnum)+".png"), string("Timecourse No. ")+num2str(cnum), @@ -180,6 +182,8 @@ namespace Melodic{ newplot.set_Ylabel_fmt("%.0f"); newplot.set_yrange(0.0,1.02*fmixtc.Maximum()); newplot.grid_swapdefault(); + newplot.set_xysize(750,150); + if(opts.tr.value()>0.0){ newplot.add_xlabel(string("Frequency (in Hz / ")+num2str(fact)+ " )"); newplot.timeseries(empty | fmixtc.t(), @@ -278,7 +282,9 @@ namespace Melodic{ newplot.grid_swapdefault(); newplot.set_Ylabel_fmt("%.2f"); newplot.add_xlabel(" Subject Number"); -// newplot.set_xysize(smode.Nrows()*80,150); + + + newplot.set_xysize(750,150); newplot.timeseries(smode.t(), report.appendDir(string("s")+num2str(cnum)+".png"), string("Subject/Session mode No. ") + num2str(cnum)); @@ -789,7 +795,10 @@ namespace Melodic{ outMsize("allmodes", allmodes); newplot.add_xlabel("Component No."); newplot.add_ylabel(""); - newplot.set_xysize(100+30*allmodes.Ncols(),300); + if(allmodes.Ncols()<100) + newplot.set_xysize(100+30*allmodes.Ncols(),300); + else + newplot.set_xysize(1200,300); newplot.boxplot(allmodes,report.appendDir(string("bp_Smodes.png")), string("Subject/Session modes")); report << "<img BORDER=0 SRC=\"bp_Smodes.png\"><p>" << endl; -- GitLab