Hello,
I am using the Bivariate function just to generate Linear fit statistics for my main graph. I am using V List box and H List box to generate a plot using graph builder, and then Bivariate to generate the linear fit statistics for each lot number in an H List box beside the plot. Each graph builder plot may have up to 20-30 Bivariates associated with it.
If you can suggest a better alternative, I would love to hear it! Below is an example of my script, sorry if it is confusing, I had to hide specific file paths and columns names.
// Generating Graphs
setup = Function({dt}, {Default Local},
dt = Open ( "file.JMP" );
dt << Select Where(:"column example" == "string example" );
cfg1 = EvalList({dt << Data View, { "col1", "col2", "col3", "coln"}});
EvalList({cfg1});
);
build_graphs = Function({cfgs}, {Default Local},
win = New Window( "window", vlb = V List Box() );
ncfg = NItems(cfgs);
for(i = 1, i <= ncfg, i++,
{this_dt, this_cols} = cfgs[i];
ncols = NItems(this_cols);
for(j = 1, j <= ncols, j++,
vlb << Append(H List Box (
this_dt << Graph Builder(
Show Control Panel( 0 ),
Size( 600, 400),
Variables(
X( :"X axis" ),
Y( Column(this_dt, this_cols[j]) ),
Overlay( :"overlay" )
),
Elements(
Points( X, Y, Legend(12) )
),
SendToReport(
Dispatch(
{},
"",
ScaleBox,
{Format( "Fixed Dec", 10, 0 ), Min(0), Max(50), Inc(6),
Minor Ticks(0)}
)
)
),
this_dt << Bivariate(
Y( Column(this_dt, this_cols[j])),
X( :"X axis" ),
By( :"overlay" ),
Fit Line,
SendToReport( Dispatch( {}, "", ListBox, {Visibility( "Collapse" )} ) )
)
));
)
);
win
);
dt = Open ( "file.JMP" );
cfgs = setup(dt);
Show(cfgs);
win = build_graphs(cfgs);
Show(win);
win << Save Journal("file.jrn", embed data(1));