hardner: excellent, thanks for the info. I also hijacked some of your scripting above to add spec limits by group in a variability chart. I did have a few more questions:
1) How do I change the type and color of line used for the reference lines (i.e. dotted, dashed, etc.)
2) Using the addgraphicsscript function, is there a way to tell JMP which X subgroup to reference when drawing the length of the line (in the x-axis direction)? For example, the way I've scripted this I'm able to create the reference lines using "Run #" but what if I want use "Group" to define the length of the reference line?
3) If adding my own column property, I assume you're talking about column property --> Other....and then what? Just copy some scripting into the column property submenu? [Maybe this should be it's own thread if it doesn't already exist]
Thanks in advance!
Here is my test script for the table:
New Table( "Variability Spec Limits By Group Test_Data",
Add Rows( 15 ),
New Script(
"Variability Chart",
o = Variability Chart(
Y( :Parametric Response ),
X( :GROUP, :Run # ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
Process Variation( 0 ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for Parametric Response"},
"2",
ScaleBox,
{Min( 8.92666666666667 ), Max( 15.35 ), Inc( 1 ),
Minor Ticks( 1 )}
)
)
);
r = o << report;
r[framebox( 1 )] << addgraphicsscript( Line( {0, 12}, {5, 12} ) );
r[framebox( 1 )] << addgraphicsscript( Line( {0, 14}, {5, 14} ) );
r[framebox( 1 )] << addgraphicsscript( Line( {5, 13}, {10, 13} ) );
r[framebox( 1 )] << addgraphicsscript( Line( {5, 15}, {10, 15} ) );
r[framebox( 1 )] << addgraphicsscript( Line( {10, 10.5}, {15, 10.5} ) );
r[framebox( 1 )] << addgraphicsscript( Line( {10, 13.5}, {15, 13.5} ) );
),
New Column( "GROUP",
Character( 4 ),
Nominal,
Set Selected,
Set Values(
{"1", "1", "1", "1", "1", "2", "2", "2", "2", "2", "3", "3", "3", "3",
"3"}
)
),
New Column( "Run #",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values( [1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, 3, 4, 5] )
),
New Column( "Parametric Response",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values(
[13.02, 13.05, 12.98, 12.62, 12.79, 13.9, 13.86, 14.1, 14, 13.99, 12.21,
12.56, 12.89, 11.3, 12]
)
),
Set Row States( [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0] )
)
Here is my test script for the graph:
o=Variability Chart(
Y( :Parametric Response ),
X( :GROUP, :Run # ),
Max Iter( 100 ),
Conv Limit( 0.00000001 ),
Number Integration Abscissas( 128 ),
Number Function Evals( 65536 ),
Analysis Type( Name( "Choose best analysis (EMS REML Bayesian)" ) ),
Process Variation( 0 ),
Std Dev Chart( 0 ),
SendToReport(
Dispatch(
{"Variability Chart for Parametric Response"},
"2",
ScaleBox,
{Min( 8.92666666666667 ), Max( 15.35 ), Inc( 1 ), Minor Ticks( 1 )}
)
)
);
r=o<
r[framebox(1)]<
r[framebox(1)]<
r[framebox(1)]<
r[framebox(1)]<
r[framebox(1)]<
r[framebox(1)]<Re: Multiple spec limits in one column
I don't know if you were interested in scripting but you could certainly do a script to achieve the things you mention. 2 things that you could do in scripting:
1) you could save multiple spec levels to the column, just create your own column properties instead of using the Spec Limits property.
2) you can draw your own lines on the plot by adding a graphics script. It's not obvious what the X values should be but I can offer that if you did it with a Oneway the X scale appeasr to run in integer steps one for each group. Here's an example that shows drawing lines on a Oneway... and I just checked in on variability plot - it works the same way - X values from 0 to 1 are the first group...
New Table( "testdata",
Add Rows( 24 ),
New Column( "GROUP",
Character( 4 ),
Nominal,
Set Property( "Value Ordering", {"REF1", "MED1", "MED2", "REF2"} ),
Set Values(
{"REF1", "REF1", "REF1", "REF1", "REF1", "MED1", "MED1", "MED1", "MED1",
"MED2", "MED2", "MED2", "MED2", "MED2", "MED2", "MED2", "REF2", "REF2",
"REF2", "REF2", "REF2", "REF2", "REF2", "REF2"}
)
),
New Column( "X",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values(
[27, 28, 30, 32, 34, 34, 36, 38, 41, 31, 33, 34, 37, 39, 42, 44, 30, 31,
33, 35, 37, 39, 41, 43]
)
),
New Column( "Y",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values(
[52, 57, 62, 64, 66, 54, 56, 58, 59, 58, 57, 60, 64, 66, 75, 76, 50, 51,
55, 58, 60, 63, 71, 72]
)
),
New Column( "Y SIGMA",
Numeric,
Continuous,
Format( "Best", 12 ),
Set Values(
[4, 5, 3, 6, 8, 6, 8, 4, 6, 9, 7, 8, 6, 7, 6, 5, 3, 4, 2, 6, 5, 8, 5, 9]
)
)
);
o=Oneway(
Y( :Y ),
X( :GROUP ),
Box Plots( 1 ),
X Axis Proportional( 0 ),
Grand Mean( 0 ),
SendToReport(
Dispatch(
{},
"Oneway Plot",
FrameBox,
{DispatchSeg(
Box Plot Seg( 1 ),
{Box Style( "Outlier" ), Line Color( "Red" )}
), DispatchSeg(
Box Plot Seg( 2 ),
{Box Style( "Outlier" ), Line Color( "Red" )}
), DispatchSeg(
Box Plot Seg( 3 ),
{Box Style( "Outlier" ), Line Color( "Red" )}
), DispatchSeg(
Box Plot Seg( 4 ),
{Box Style( "Outlier" ), Line Color( "Red" )}
)}
)
)
);
r=o<
r[framebox(1)]<
r[framebox(1)]<
Of course to make this more general you'd need to work out which group on the plot is going to match which of your stored specs..