맞춤형 PPT 템플릿을 사용할 수 있는 옵션이 있는지 물어봐도 될까요? 템플릿이 있는 경우 하나의 슬라이드에 여러 그래프를 추가할 수 있는 곳은 어디입니까?
나는 당신이 무엇을 요구하는지 충분히 이해합니다. 그러나 대화형 사용을 목표로 하는 JMP의 기능이 스크립팅 세계에 잘 적용되지 않는 경우가 있습니다. 로컬 데이터 필터가 그 중 하나입니다. 이는 정말 환상적인 대화형 도구이지만 아래 스크립트에서 이 도구가 스크립트에서 어떻게 사용되는지 볼 수 있으며 이는 스크립트를 더욱 복잡하게 만듭니다. 그리고 필터 목록에 잘 표시되는 다양한 값을 JSL에서 사용할 때 필터에서 사용할 수 없는 대화형 기능도 있습니다.
다음은 스크립팅된 로컬 데이터 필터를 사용하는 스크립트입니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Get the levels of the Sex column. The Summarize function will
// create a list of the different levels of whatever column is
// specified in the "By" claue
Summarize( dt, GroupBy = By( :Sex ) );
gb = Graph Builder(
invisible,
Size( 517, 437 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Box Plot( X, Y, Legend( 3 ) ) )
);
For( i = 1, i <= N Items( GroupBy ), i++,
gb << Local Data Filter( Add Filter( columns( :Sex ), Where( :sex == GroupBy[i] ) ), Mode( Show( 1 ), Include( 1 ) ) );
If( i == 1,
gb << Save Presentation( "$TEMP/jmp_example2.pptx" ),
gb << Save Presentation( "$TEMP/jmp_example2.pptx", Append )
);
gb << remove data filter;
);
Open( "$TEMP/jmp_example2.pptx" );
다음은 귀하의 질문에 답변하는 데 사용한 예입니다. 이는 로컬 데이터 필터를 사용하지 않고 실제로 원하는 출력의 더 나은 버전을 얻습니다.
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Get the levels of the Sex column. The Summarize function will
// create a list of the different levels of whatever column is
// specified in the "By" claue
Summarize( dt, GroupBy = By( :Sex ) );
For( i = 1, i <= N Items( GroupBy ), i++,
gb = dt << Graph Builder(
// The invisible option helps to keep the desktop clean
invisible,
Size( 517, 437 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Box Plot( X, Y, Legend( 3 ) ) ),
// Here is an easy way to subset the data used in the grap
Where( :sex == GroupBy[i] )
);
If(i==1,
gb << Save Presentation( "$TEMP/jmp_example.pptx" ),
gb << Save Presentation( "$TEMP/jmp_example.pptx", Append );
);
);
Open( "$TEMP/jmp_example.pptx" );
두 번째 예는 훨씬 간단한 코드입니다.
코드가 실행 중이지만 ppt에 기록되지 않은 동안 차트가 표시되지 않도록 하려면 플랫폼 내에서 "보이지 않음" 옵션을 지정할 수 있습니다. 또한 필터링을 처리하는 방법을 추가하여 이를 처리하는 쉬운 방법을 확인할 수 있습니다.
또한 이러한 모든 옵션 등이 @ 예제를 통해 문서화되고 설명되어 있음을 지적하겠습니다.
도움말==>스크립팅 색인
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
gb = dt << Graph Builder(
// The invisible option helps to keep the desktop clean
invisible,
Size( 517, 437 ),
Show Control Panel( 0 ),
Variables( X( :age ), Y( :height ) ),
Elements( Box Plot( X, Y, Legend( 3 ) ) ),
// Here is an easy way to subset the data used in the grap
Where( :sex == "F" )
);
New Window( "the graph", myvlb = V List Box() );
myvlb << append( Report( gb ) );
다음은 샘플 스크립트입니다.
Names Default to Here( 1 );
// The open function below, just need to point to the .xls or .xlsx file you want to open
dt=open("$SAMPLE_DATA\Big Class.jmp");
// Run the Distribution Platform
dis=dt<<DISTRIBUTION></DISTRIBUTION>