I am not aware of an option within Graph Builder to force the intercept through zero. However, a simple little script can be added to the Graph Builder, that will draw the line.
Names Default To Here( 1 );
dt=open("$sample_data/big class.jmp");
gb = Graph Builder(
Size( 528, 456 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements( Points( X, Y, Legend( 3 ) ) )
);
/*Simple Linear Regression: y = intercept + beta * x + error*/
report(gb)[framebox(1)]<<add graphics script(
goodRows = dt<<get rows where(excluded(rowstate(row()))==0);
y = dt:height[goodRows];
X = dt:weight[goodRows];
{Estimates, Std_Error, Diagnostics} =
Linear Regression( y, X, nointercept );
List1 = { 0, 0};
List2 = {};
insert into(List2, max(x));
insert into(List2, estimates[1]*max(x));
pen color(blue);
line(List1,List2)
);
Jim