Agregar anotación de texto en el generador de gráficosHola,
¿Hay alguna manera de escribir un script de gráficos para agregar anotaciones de texto a cada retícula en el mapa de oblea?
Además, quiero colorear dos columnas (Ret) y %Fail), crear un mapa de calor con la columna %Fail y superponer la columna Ret. ¿Es posible en GB?
AMAR
Automatización y scriptingExploración y visualización de datosRe: Agregar anotación de texto en el generador de gráficos¿Cómo colorearías con dos columnas en este caso? Reticle definiría el color principal y %Fail el degradado o algo similar. ¿Has considerado crear un archivo de mapa de formas para este tipo de análisis?
Puede utilizar un script gráfico para agregar la anotación de texto.
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: Agregar anotación de texto en el generador de gráficosHola @jthi ,
Probé el mapa de formas, pero hace que JMP sea más lento porque tengo 1 millón de filas.
Estaba pensando si hay una manera de dibujar el borde alrededor de las retículas usando un script gráfico, puedo bordear esas retículas en un mapa de oblea y esto me permitirá distinguir las retículas, y luego puedo agregar %Fail a la selección de color en la leyenda.
Gracias,
Re: Agregar anotación de texto en el generador de gráficosPuedes hacer algo como esto

o tal vez con un mapa de calor

Re: Agregar anotación de texto en el generador de gráficos@jthi ¡Qué bien se ve! ¿Podrías compartir el código?
Re: Agregar anotación de texto en el generador de gráficos/*""" 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));
);
));
);
Potencialmente podrías mover el bucle dentro del script gráfico y no crear scripts en bucle (no he probado cuál sería mejor).
Editar: Se agregó imagen de la solución final.
