Subscribe Bookmark RSS Feed

JSL + A script that extracts textbox information from a bivariate fit report

rct

Community Trekker

Joined:

Jun 30, 2015

Hi,

  I have a set of data on which I have performed a linear fit. I am trying to write a script that would extract the text box information which is basically the fit equation from the bivariate fit report . Any help is highly appreciated !

1 ACCEPTED SOLUTION

Accepted Solutions
ms

Super User

Joined:

Jun 23, 2011

Solution

The pathway to the text edit box may vary depending on the complexity of your report. The code below works for that particular report and probably for many other simple bivariate reports. Use the tree structure display for your particular report to find out the relative (or absolute) pathway.

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(Y(:weight), X(:height), Fit Line());

rbiv=report(biv);

// Two equivalent ways to address the text box with the equation

eq1=rbiv[Outline Box(2)][1, 1] << get text; // "First item of the first item of the second outline box"

eq2=rbiv[Text Edit Box(4)] << get text; // Direct address. Numbering not always predictable.

show(eq1,eq2);

// Explore the tree structure to detrmine the pathway to the displaybox of interest

rbiv<<show tree structure;

2 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Solution

The pathway to the text edit box may vary depending on the complexity of your report. The code below works for that particular report and probably for many other simple bivariate reports. Use the tree structure display for your particular report to find out the relative (or absolute) pathway.

dt = Open("$SAMPLE_DATA/Big Class.jmp");

biv = dt << Bivariate(Y(:weight), X(:height), Fit Line());

rbiv=report(biv);

// Two equivalent ways to address the text box with the equation

eq1=rbiv[Outline Box(2)][1, 1] << get text; // "First item of the first item of the second outline box"

eq2=rbiv[Text Edit Box(4)] << get text; // Direct address. Numbering not always predictable.

show(eq1,eq2);

// Explore the tree structure to detrmine the pathway to the displaybox of interest

rbiv<<show tree structure;

rct

Community Trekker

Joined:

Jun 30, 2015

Thanks a ton ! It was of great help