我有一个表,其中有 100 个设备,测试了 300 个测试项目。 我的规格列分别包含 LSL、USL。 我想绘制带有规格限制的变异性属性仪表图。 请告诉我如何操作,或者如果该主题中有任何现有讨论,请指出给我。谢谢。
样本数据表:
| 设备 | 测试名称 | 测量 | LSL | 超级激光实验室 |
| 1 | 测试1 | 230 | 200 | 240 |
| 1 | 测试2 | 20 | 15 | 25 |
| 1 | 测试3 | 30 | 25 | 35 |
| 2 | 测试1 | 234 | 200 | 240 |
| 2 | 测试2 | 22 | 15 | 25 |
| 2 | 测试3 | 29 | 25 | 35 |
| 3 | 测试1 | 229 | 200 | 240 |
| 3 | 测试2 | 21 | 15 | 25 |
| 4 | 测试1 | 230 | 200 | 240 |
| 4 | 测试2 | 21 | 15 | 25 |

您想要的主要问题是您的数据不适合运行变异性属性图平台。下面的脚本将包含您指定的列的数据表转换为可用于生成您想要的图表的数据表。
Names Default To Here( 1 );
dt = Current Data Table();
// Make a list of the Tests
Summarize( dt, testList = by( :Test Name ) );
dtSplit = dt << Split(
Split By( :Test Name ),
Split( :Measurement, :LSL, :USL ),
Group( :Device ),
Sort by Column Property
);
// Rename the test columns and set the Spec Limits
For( i = 2, i <= N Items( testList ) + 1, i++,
// Assign the new names
Column( dtSplit, i ) << set name( Substr( Column( dtSplit, i ) << get Name, 13 ) );
// Set the Spec Limits
Eval(
Substitute(
Expr(
Column( dtSplit, i ) << set property(
"Spec Limits ",
{LSL( __LSL__ ), USL( __USL__ ), Show Limits( 1 )}
)
),
Expr( __LSL__ ), Col Mean( As Column( dtSplit, i + N Items( (testList) ) ) ),
Expr( __USL__ ),
Col Mean( As Column( dtSplit, i + 2 * N Items( (testList) ) ) )
)
);
);
// Delete unwanted limits columns
dtSplit << delete columns( Index( N Items( testList ) + 2, N Cols( dtSplit ) ) );