您好,我尝试使用 JSL 自动执行导出步骤,我使用了“保存演示文稿”功能,但无法使其工作。.png 文件已在我的计算机上创建,但由于“不支持的文件类型”而无法打开。我的理解是,“保存演示文稿”功能在保存为 .jpg 文件之前没有将 Graph Builder 文件转换为 PNG 文件。有办法解决这个问题吗?谢谢!
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()
);
我发现我应该使用“保存图片”功能,现在已经解决了。