Lo script di esempio seguente fa ciò di cui ho bisogno per un numero limitato di parametri che voglio tracciare sull'asse Y.
Come automatizzarlo per un elenco fornito a Y dall'alto?
(La variabile/colonna X rimane fissa ma il numero di elementi che vanno a Y può cambiare e viene fornito da un altro script)
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 ) ) )
);Inoltre, come si gestiscono gli Elements () in questo caso.