How to add reference lines automatically to variability charts?<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />I need to make many graphs such as the one below and add limits using the reference limits in the axis settings. The limits are different for each graph. Is there a way to automate this so I do not have to manually add to each graph? The upper and lower limits could be included in the data set in extra columns.

Re: How to add reference lines automatically to variability charts?Thanks for this feedback. I used it in the following way since I needed to set many reference lines.
VarChartObj=Graph builder(..)
M=[1,20,30,....];//many as 20 different values
For (i=1,i<=size matrix M, i++,
report(varChartObj)[axisbox(1)]<< add ref line (M[i], solid, red);
);
I noticed that execution is very slow although is only about 20 ref lines. I was wondering if there is a way to pass the Matrix argument to the line below without having to make a For loop (I thought perhaps the problem is the loop). Something like:
report(varChartObj)[axisbox(1)]<< add ref line (Matrix, solid, red);
or any other method...thanks in advance for your help!!
Re: How to add reference lines automatically to variability charts?Thank you for this.
Especially the part below:
eval(substitute(nameexpr(myAxis), expr(aaa), 0.4, expr(bbb), 1.2));
For some reason this substitution is necessary in jmp 12 but not jmp 11 if variables are used instead of the numbers.
I don't know why this is but I am glad I found this structure in your post.
Re: How to add reference lines automatically to variability charts?I have an older revision (8) and it does not have that checkbox. I noticed that it adds the limits to the distribution but not to the variability. I will see about getting an upgrade to a recent version.
Re: How to add reference lines automatically to variability charts?If you have the spec limit in the table as columns, then you can use overlay plot. But it doesn't provide any statistics.



Re: How to add reference lines automatically to variability charts?For my version of JMP (11 standard) it has a checkbox to show reference lines at the spec limits. If it is not checked, distribution platform will show limit lines but the variability platform won't. If it is checked then variability gauge platform will show the limits reference lines.
You might be on some other version of JMP in which case you might also want to add reference lines to the column properties in addition to the limits.
Re: How to add reference lines automatically to variability charts?Here is the thread about adding ref. line. There is a check box "Show as graph reference lines" at the bottom of the spec limit box if you use JMP 10 or greater.
JSL - showing spec limits as graph reference lines
Re: How to add reference lines automatically to variability charts?I added the spec limits to the column properties per below but the charts are not showing the reference lines when I re-plot. Am I doing something wrong?


Re: How to add reference lines automatically to variability charts?Hi Kevin,
First of all, I am not familiar with running scripts in JMP. I am willing to learn though but will require some other training.
For these graphs, the limits for each particular dataset will not change. I will do this fairly frequently and there will be multiple columns of data with each column having different limits. The dataset has at least a few hundred columns of data but I only need to graph maybe 20 of the columns. Only these 20 columns would therefore need spec limits (reference lines) added to the graphs.
Thanks,
Rick
Re: How to add reference lines automatically to variability charts?"There are a million ways to get things done..." Talking Heads
I'll answer your question with some questions of my own:
Is this something you will do once, or many times over and over?
If many, do the limits change over time?
If many, will you alone run the script, or will others?
Depending on the answers to these, I might seriously consider using an iterative loop with Associative Arrays from a look-up table.
Re: How to add reference lines automatically to variability charts?Or you can use the column property "Spec Limits".
:Column 1<<SET property=""></SET>
After you set the LSL and USL for a given column, all charts will show the reference lines.
Re: How to add reference lines automatically to variability charts?You can get your limits into a list, then use a variation of code snippet here to add reference lines. Note that there are two ways to do it via script that I know of. One is to set the column property (limit of 4 lines, stays with table and resulting plots), one is to the output, no limitation i know of, but does not get store to table for later use.
You can copy / paste to a script window and run it. Of course you'd need to loop through the parameters to fully automate to your needs.
Clear Log();
Names Default To Here( 1 );
dtData = open( "$SAMPLE_DATA\Variability Data\2 Factors Crossed.jmp");
// 1. add ref lines to the column property. It will be there for other plots as well.
// this first attempt doesn't work...
//column(dtData, "Measurement")<<SET property=""></SET>