Script for distribution plot ( multiple column and group by row name)Hi All,
I would like to create a script for below distribution. Where should I edit in the script to have "by" grouping.
And if I just want to display lot_id=lot01 how can I filter that in the script
.
Appreciate if anyone can help me on this.
I get this script from https://community.jmp.com/t5/Discussions/Script-multiple-columns-grouped-in-distribution-plot/m-p/162798#M40093
Basic Data Analysis and ModelingRe: Script for distribution plot ( multiple column and group by row name)names default to here(1);
dt=open("$SAMPLE_DATA/semiconductor capability.jmp");
colList = dt << get column names(continuous,string);
// For this illustration I want to use just the NPNn columns
for(i=nitems(colList), i>=1,i--,
If(substr(colList[i],1,3)!="NPN", remove from(colList,i,1))
);
// build the JSL string
theExpr =
"Dis = Distribution(
Continuous Distribution( Column( :" || colList[1] || " ),
Process Capability( Use Column Property Specs ) )";
For( i = 2, i <= N Items( colList ), i++,
theExpr = theExpr || "," || "Continuous Distribution( Column( :" || colList[i] ||
" ), Process Capability( Use Column Property Specs ) )"
);
theExpr=theExpr||");";
// run the built JSL string
eval(parse(theexpr));
// Standardize the settings
disr = Dis << report;
disr[colList[1]]["Quantiles"]<<CLOSE all="" like="" this=""></CLOSE>here the script
Re: Script for distribution plot ( multiple column and group by row name)All you have to do is to run the Distribution platform as you want it to be, and then go to the red triangle and select
"Save By Group Script"

and it will give you the script with the By element included.
Distribution(
Stack( 1 ),
Continuous Distribution(
Column( :NPN1 ),
Horizontal Layout( 1 ),
Vertical( 0 ),
Process Capability( Use Column Property Specs )
),
By( :lot_id )
);
Re: Script for distribution plot ( multiple column and group by row name)hi Jim,
Thanks a lot for your prompt respond. I would like to generate a script which I can reused that for other data type ( different column name). Is there any way I can automate that using script.
Thanks,
Maya
Re: Script for distribution plot ( multiple column and group by row name)The script that you displayed from a previous Discussion is an example of dynamically generating Distributions, by finding the column names in the data table it is pointing at, and then running those distributions. Assuming you are familiar with programming, you should be able to follow the script. Any of the functions used can be looked up in the Scripting Index, where a definition and usage example(s) are shown.
As you work to perfect your script, the Community will always be there to help you with issues you may come across.