Add text annotation on the Graph BuilderHello,
Is there a way to write a graphics script to add text annotation to each reticles on the wafer map?
Additionally, I want to color two columns - 'Ret' and '%Fail', create a heat map with %Fail col and overlay Ret col. Is this possible on GB?
TIA
Automation and ScriptingData Exploration and VisualizationRe: Add text annotation on the Graph BuilderHow would you color with two columns in this case? Reticle would define the main color and %Fail the gradient or something similar? Have you considered creating shape map file for this type of analysis?
You can use graphic script to add the text annotation
Names Default To Here(1);
dt = Current Data Table();
gb = dt << Graph Builder(
Size(979, 588),
Variables(X(:X), Y(:Y), Overlay(:Ret)),
Elements(Points(X, Y, Legend(10)), Smoother(X, Y, Legend(11)))
);
Summarize(dt, rets = By(:Ret), mx = Mean(:X), my = Mean(Y));
// Lazy option without evaluation
Report(gb)[FrameBox(1)] << Add Graphics Script(
For(i = 1, i <= N Items(rets), i++,
Text Color("Black");
Text Size(12);
Pen Color("Black");
Pen Size(3);
Text(Boxed, Erased, Center Justified, {mx[i], my[i]}, rets[i]);
);
);

Re: Add text annotation on the Graph BuilderHi @jthi ,
I have tried the shap map, but it slows down JMP because I have 1 million rows.
I was thinking if there's a way to draw the border around the reticles using graphic script, I can border those reti on wafer map and this will let me distinguish the reticles, and then I can add %Fail to the color selection on the legend
Thanks,
Re: Add text annotation on the Graph BuilderYou can do something like this

or maybe with a heatmap

Re: Add text annotation on the Graph Builder@jthi This looks great. Can you share the code?
Re: Add text annotation on the Graph Builder/*""" Reticle outline and names
Author: jthi
Creation Date: 2025-06-25
Creation JMP Version: JMP Pro 18.2.0
"""*/
Names Default To Here(1);
dt = Open("$DOWNLOADS/dataTable.jmp");
Summarize(dt, rets = By(:Ret));
aa = Associative Array();
For Each({curret}, rets,
r = dt << Get Rows Where(:Ret == curret);
tri = Triangulation(X(dt[r, "X"], dt[r, "Y"]));
path = tri << Get Hull Path;
aa[curret] = Associative Array();
aa[curret]["Path"] = path;
aa[curret]["X"] = Median(dt[r, "X"]);
aa[curret]["Y"] = Median(dt[r, "Y"]);
);
gb = dt << Graph Builder(
Size(937, 542),
Show Control Panel(0),
Variables(X(:X), Y(:Y), Color(:"%Fail"n)),
Elements(Points(X, Y, Legend(10)))
);
For Each({{retname, param}}, aa,
Eval(EvalExpr(
Report(gb)[FrameBox(1)] << Add Graphics Script(
Pen Color("Red"); // outline color for reticles
Pen Size(3); // reticle outline size
Path(Expr(param["Path"]), 0); // plots reticle outline
Text Color("Black"); // text color
Text Size(10); // text size for reticle
Pen Color("Black"); // text box outline color
Pen Size(2); // outline size for text box
Text(Boxed, Erased, Center Justified, {Expr(param["X"]), Expr(param["Y"])}, Expr(retname));
);
));
);
You could potentially move the loop inside graphic script and not create looped scripts (I haven't tested which would be better).
Edit: Added image of the final solution
