Ciao comunità JMP,
Ho scritto un semplice script per assegnare una sfumatura di colore alle colonne con valori continui in base al quantile 0,05 dei valori delle colonne.
Names Default To Here(1);
dt = current data table ();
scol = dt << Get Selected Columns ();
For (i = 1, i <= N items (scol), i++,
column (dt, scol[i]) << Format("Fixed Dec", 12, 3);
low_mark = Col Quantile(column (dt, scol[i]), 0.05);
high_mark = Col Quantile(column (dt, scol[i]), 0.95);
if(abs(low_mark) > high_mark, bound = -low_mark, bound = high_mark);
range_list = {-bound, bound, 0};
column (dt, scol[i]) << Set Property ("Color Gradient",
{"Blue White Red", Range (Eval list (range_list)),
Color cell by value (1)})
);
Sebbene l'assegnazione dei colori sia corretta, JMP restituisce un errore quando successivamente modifico manualmente la sfumatura (vedi sotto):

Pertanto, ho bisogno di un metodo per passare i valori dell'intervallo di gradiente senza che si verifichi un errore durante le successive modifiche manuali.
Grazie.
Migliore,
TS
Manca la valutazione dell'espressione
Names Default To Here(1);
dt = Current Data Table();
scol = dt << Get Selected Columns("String");
For Each({colname}, scol,
Column(dt, colname) << Format("Fixed Dec", 12, 3);
low_mark = Col Quantile(Column(dt, colname), 0.05);
high_mark = Col Quantile(Column(dt, colname), 0.95);
If(Abs(low_mark) > high_mark,
bound = -low_mark,
bound = high_mark
);
range_list = Eval List({-bound, bound, 0});
Eval(EvalExpr(
Column(dt, colname) << Set Property(
"Color Gradient",
{"Blue White Red", Range(Expr(range_list)), Color cell by value(1)}
)
));
);