Not quite sure what you have in mind, but this may get you started:
NamesDefaultToHere(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
nw = NewWindow("Color",
clb = ColListBox(all, << ModelingType({"Nominal", "Ordinal"}), maxSelected(1)),
LineUpBox(NCol(2),
ButtonBox("OK", OKscript),
ButtonBox("Cancel", nw << closeWindow)
);
);
OKscript =
Expr(
nw << closeWindow;
colorCol = clb << getSelected;
gb = dt << Graph Builder(
Show Control Panel( 0 ),
Variables( Y( :height ), Color( Eval(colorCol)) ),
Elements( Points( Y, Legend( 7 ) ) ),
Column Switcher( :height, {:height, :weight} )
);
);