아래 예제 스크립트는 Y축에 플롯하려는 고정된 소수의 매개변수에 필요한 작업을 수행합니다.
위에서 Y에 제공되는 목록에 대해 이를 자동화하는 방법은 무엇입니까?
(X 변수/열은 고정된 상태로 유지되지만 Y로 가는 요소 수는 변경될 수 있으며 다른 스크립트에서 제공됩니다.)
Names Default To Here (1);
Clear Log ();
dt = open("$sample_data\Big Class.jmp");
y_values = {"name", "age", "sex", "weight"};
Graph Builder(
Show Control Panel( 0 ),
Variables( X( :height),
Y( column(dt, y_values[1]) ),
Y( column(dt, y_values[2]) ),
Y( column(dt, y_values[3]) ),
Y( column(dt, y_values[4]) )
),
Elements( Position( 1, 1 ), Points( X, Y, Legend( 1 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 2 ) ) ),
Elements( Position( 1, 3 ), Points( X, Y, Legend( 3 ) ) ),
Elements( Position( 1, 4 ), Points( X, Y, Legend( 4 ) ) )
);또한 이 경우 Elements()를 어떻게 처리합니까?