Hi. I'm having some issues modifying some Distribution platform options in JSL (e.g. Outlier Box Plot, Normal Quantile Plot, etc). I'm writing a script that would allow users to create distributions for an arbitrary list of columns. Additionally, I'd like to give the user the ability to specify if Outlier Box Plots or Normal Quantile Plots are enabled for all plots. Having some problems though and hoping someone can offer some insight.
For the record, I'm running JMP Pro 14.3.0 on a Mac.
First I tried this:
Names Default To Here(1);
dt = Open("$SAMPLE_DATA/Big Class.jmp");
tcol_lis = {"height", "weight"};
//First approach
nqplopt = 1; //This is meant to turn on the Normal Quantile Plot option
Distribution(
Column(EvalList(tcol_lis)),
Normal Quantile Plot(nqplopt),
);
nqplopt = 0; //But it has no effect
Distribution(
Column(EvalList(tcol_lis)),
Normal Quantile Plot(nqplopt),
);
Seems like it should've worked, but setting "nqplopt" to 1 or 0 has no effect. In my case the quantile plot was generated both times. Interesting since that option is off in my preferences.
Next, I tried to send a message to the distribution after creation instead.
//Second approach - send the Normal Quantile option as a message
nqplopt = 1;
dist = Distribution(
Column(EvalList(tcol_lis))
);
dist << Normal Quantile Plot(nqplopt);
nqplopt = 0;
dist = Distribution(
Column(EvalList(tcol_lis))
);
dist << Normal Quantile Plot(nqplopt); //No difference from when nqplopt = 1
As before, no difference when nqplopt is 1 or 0. I'm doubtful this would work for me anyway since the object "dist" refers to multiple distributions and I'm not sure how JSL would handle sending a message to that.
Lastly, I went to my go-to solution, force the substitutions I want using a JSL Quote:
//Third approach - make substitutions via JSL Quote
nqplopt = 0;
dist_jst = JSL Quote(
Distribution(
Column(EvalList(tcol_lis)),
Normal Quantile Plot(nqplopt_ph),
);
);
SubstituteInto(dist_jst,
Expr(nqplopt_ph), nqplopt
);
Show(dist_jst); //The "nqplopt_ph" remains unchanged for some reason.
Eval(Parse(dist_jst)); //Dist. created with a Normal Quantile Plot, as if nqplopt = 1
Still, like an out-of-work croupier, no dice. When I show the modified dist_jst string, it's as if the SubstituteInto command were never issued. I'm curious why is this? I've used JSL Quote before many times, but I cannot understand why it seems unable to make this modification?
Any thoughts or workarounds?