문제
"그래프 빌더"헤더없이 그래프를 프리젠 테이션 이미지로 저장하고 싶습니다.
해결책
표시 상자 계층 구조에서 그래프 자체에 대한 참조를 잡고 해당 참조를 "그림 저장"메시지를 보냅니다.
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);
원래 토론 및 추가 정보 이리 .
참조
여기 링크가 있거나이 줄을 삭제