If you look at the scripts that get created, you see that the values are not there

This is because you will have to evaluate them. Something like this should work
Names Default To Here(1);
dt = open("$SAMPLE_DATA/Big Class.jmp");
Column(dt, "height") << Set Name("M");
nw = New Window("window", vlb = V List Box());
For Each Row(dt,
Eval(EvalExpr(
vlb << Append(Graph Box(Y Function(Expr(dt[Row(), "M"]) * x ,x)));
))
);

Also use for each row when looping over data table as it is meant for it
-Jarmo