XiangLoh,
You might want to review an earlier post
https://community.jmp.com/t5/Discussions/JSL-Generate-x-y-Plot-that-loops-through-columns-with-diffe...
The recommendations, I made there, I would apply to your data. Here are the steps/ pseudo code:
- create parameterlist (already done)
- Run, summarize( fgrp=By(:Family) ); the fgrp is the list of family values
- nw = New Window("Tests", vl = VListBox());
for( i=1, i<=nitems(fgrp), i++,
fam = fgrp[i];
for(j=1, j<=nitems(parameterlist), j++,
param = parameterlist[j];
idx = dt << get rows where(:Family == fam);
// compute the number of non-missing values for column(param)[idx]
// if that number is greater than 0 or some minimum you set then
myVC = dt << Variability Chart( invisible, Y ( AsColumn(param) ) , X(:Device), By(:Family), where(:Family==fam) );
get rid of the where where textbox and append to VL
); //end j
); //end i
This method gives you a lot of flexibility. You could save a different HTML for each family, or change the order and plot by variable then family. Instead of the code for the 2 commented steps, you could use a Try()
Try( myVC = dt << Variability Chart( invisible, Y ( AsColumn(param) ) , X(:Device), By(:Family), where(:Family==fam) );
// get rid of the where where textbox and append to VL
, //else do nothing
Show( "variable " || param || " for Family == " || fam || "has no valid data." )
);
It looks like a lot of work, but I have found that most scripters after they have done this once, and realize the amount of options this method offers, they use it often.
Good luck!