问题
我想将图形保存为图像以进行演示,而不使用“Graph Builder”标题。
解
在Display Box层次结构中获取对图形本身的引用,并将该引用发送到“保存图片”消息。
save_graph_only = function({gb, pic_file}, {Default Locals},
rpt = gb << report;
(rpt << Child) << save picture(pic_file);
);
讨论
这是一个完整的例子:
Names Default to Here(1);
save_graph_only = function({gb, pic_file}, {Default Locals},
rpt = gb << report;
(rpt << Child) << save picture(pic_file);
);
pic_file = "$TEMP/graph_no_outline.png";
dt = Open("$SAMPLE_DATA/Iris.jmp");
gb = dt << Graph Builder(
Show Control Panel( 0 ),
Variables( X( :Sepal length ), Y( :Sepal width ), Overlay( :Species ) ),
Elements(
Contour( X, Y, Legend( 3 ), Number of Levels( 3 ) ),
Points( X, Y, Legend( 4 ) )
),
SendToReport(
Dispatch(
{},
"Sepal length",
ScaleBox,
{Min( 4.02451368343195 ), Max( 8.24903846153846 ), Inc( 1 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Sepal width",
ScaleBox,
{Min( 1.75 ), Max( 5.00400457665904 ), Inc( 1 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {3, [0, 1, 2], 4, [-1, -1, -1]} ),
Position( {0, 1, 2, -1, -1, -1} )}
)
)
);
save_graph_only(gb, pic_file);
dt << Close Window();
open(pic_file);
原始讨论和其他信息这里 。
也可以看看
您的链接在这里或删除此行