forked from dougthor42/jmp_jsl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFTI - Wafer Maps, Box Plots, and Normal Quantile Plots.jsl
131 lines (114 loc) · 2.33 KB
/
FTI - Wafer Maps, Box Plots, and Normal Quantile Plots.jsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
//
// Plots up Wafer Map, Box Plot, and Normal Quantile Plot for some FTI data.
//
//
//
dt1 = Current Data Table();
// Prompt the user to select the item to plot.
r = Column Dialog(
Y = Col List(
"Y, Parameter",
Max Col( 1 ),
Min Col( 1 ),
ModelingType("Continuous"),
DataType("Numeric")
),
Group = Col List(
"Group",
Max Col( 1 ),
Min Col( 1 ),
Columns( :GrowthID )
),
);
Show(r);
// Abort the script if the users says Cancel
If( r["Button"] == -1,
Stop()
);
yData = r["Y"][1];
groupData = r["Group"][1];
// Determine the plot ranges.
plotLow = Floor(Col Quantile(yData, 0.1) * 100) / 100;
plotHigh = Ceiling(Col Quantile(yData, 0.9) * 100) / 100;
plotRange = Matrix({plotLow, plotHigh});
colName = yData << Get Name;
increment = Round((plotHigh - plotLow) / 10);
// Plot the Wafer Map
Graph Builder(
Size( 375, 375 ),
Show Control Panel( 0 ),
Fit to Window( "On" ),
Variables(
X( :X ),
Y( :Y ),
Wrap( groupData ),
Color( yData )
),
Elements( Points( X, Y, Legend( 7 ) ) ),
SendToReport(
Dispatch(
{},
"Y",
ScaleBox,
{Min( 20 ), Max( 0 ), Inc( 5 ), Minor Ticks( 4 ), Label Row Nesting( 1 )
}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
5,
Properties(
0,
{gradient(
{Scale Values( plotRange ),
Label Format( "Fixed Dec", 15, 2), N Labels( 9 )}
)}
)
)}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( colName )}
)
)
);
// Plot the Box Plots
Graph Builder(
Size( 400, 215 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Fit to Window( "On" ),
Variables( X( groupData ), Y( yData ) ),
Elements( Box Plot( X, Y, Legend( 4 ) ) ),
);
// Normal Quantile Plot
Oneway(
Y( yData ),
X( groupData ),
All Graphs( 0 ),
Plot Quantile by Actual( 1 ),
Line of Fit( 0 ),
Points( 0 ),
Box Plots( 0 ),
Connect Means( 1 ),
Histograms( 0 ),
SendToReport(
Dispatch(
{"Normal Quantile Plot"},
"1",
ScaleBox,
{Label Row( {Show Major Grid( 1 ), Show Minor Grid( 1 )} )}
),
Dispatch( {"Normal Quantile Plot"}, "2", ScaleBox, {Format( "Best", 12 )} ),
Dispatch(
{"Normal Quantile Plot"},
"Oneway QuantilePlot",
FrameBox,
{Frame Size( 250, 165 ), Marker Size( 1 )}
)
)
);