Ciao, stavo cercando di automatizzare la fase di esportazione utilizzando JSL, sto utilizzando la funzione Salva presentazione ma non sono riuscito a farlo funzionare. Il file .png viene creato sul mio computer ma non può essere aperto a causa di un "tipo di file non supportato". Da quanto ho capito, la funzione Salva presentazione non ha convertito il file del Costruttore di grafici in un file PNG prima di salvarlo come file .jpg. C'è un modo per risolvere questo problema? Grazie!
Names Default To Here(1);
MyGraph = Function({yCol}, {default local},
vars = Eval Expr(Variables(
X(:Test Stage),
Group X(:Temperature)
));
pts = Expr(Box Plot(X));
For(j = 1, j <= Min(8, N Items(yCol)), j++,
Insert Into(vars, Eval Expr(Y(Expr(yCol[j]),Position( 1 ))));
);
gb = Expr(
Graph Builder(
Size(1255, 981),
Show Control Panel(0),
// Variables section will be inserted here
Elements(Box Plot(X, Y(1), Y(2), Y(3), Y(4), Y(5), Y(6), Y(7), Y(8))),
Local Data Filter(
Add Filter(
columns(:Test Stage, :Sublot, :Temperature, :Soft Bin),
Display(:Test Stage, N Items(4)),
Display(:Soft Bin, N Items(15))
)
)
)
);
Insert Into(gb, Name Expr(vars));
// Save graph to a PNG file
png_path = "box_plots.png";
gb << Save Presentation("boxplot.png");
Return(gb);
);
dt = Current Data Table();
graph = MyGraph(::yColName);
New Window("My report",
VListBox(
graph,
HCenter Box(
btn = Button Box("show distribution")
)
)
);
btn << setScript(
My Histograms()
);
Ho capito che avrei dovuto usare la funzione "salva immagine", ora è risolto.