I would like to draw a histogram using a journal script with data selected previously using a Data Filter. But I need to print the 'where clause' on the output. The "Save where clause" copies this manually. Is there a way of doing this in a script?
Not quite sure of your intended result, but perhaps something like this?
dt = Open("$SAMPLE_DATA/Big Class.JMP");
nw = NewWindow("Distribution with Where Clause",
dist = dt << Distribution(
Automatic Recalc( 1 ),
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) ),
ldf = dist << Local Data Filter( Mode, Add Filter( columns( :sex ), Where( :sex == "M" ) ) );
ldf << To Journal;
nw << Journal;
nw << CloseWindow;