doc -e W
{
if("%[%H,5]"=="Data") // skip if it's a slopes wks
{
%W=%H; // save wks name
wo -s 0 0 0 0; // select all columns
wo -p 201; // create scatter plots
page.label$=Data from %W; // label the graph
page.title=3;
%A=%H; // save graph name
win -i %W; // minimize data wks
win -t D; // create new wks
%B=Slopes%[%A,>5] ;
win -r %H %B;
// prepare columns
wks.col1.name$=Dataset;
wks.col2.name$=Slope;
wks.AddCol(yErr);
wks.col3.type=3;
page.label$=Linear fits of %A; // label the slopes wks
page.title=3;
win -a %A;
ii=1; // perform linear regression on all dataplots, store slopes
doc -e D
{
if("%[%C,>'_']"!="Line")
{
lr %C; // perform linear regression
%B_Dataset[ii]$=%C; // save dataset name to slopes wks
%B_Slope[ii]=lr.b; // save slope
%B_yErr[ii]=lr.sdb; // save std dev of slope
ii++;
};
};
win -a %B; // restore slopes wks
wo -s 0 0 0 0; // select all columns
wo -p 201; // create scatter plots
win -i %B; // minimize slopes wks
page.label$=Data from %B; // label the graph
page.title=3;
};
};
Mike Buess
Origin WebRing Member
Edited by - Mike Buess on 01/18/2007 12:10:01 PM