该帮助的版本不再更新,请参见https://www.jmp.com/support/help/zh-cn/15.2 获取最新的版本.


project = New Project();
project << Add Bookmarks({
File( "$SAMPLE_DATA/Big Class.jmp" )
Run Script opens the data table and creates output inside the project.
project << Run Script(
Open(
"$SAMPLE_DATA/Big Class.jmp",
Set Window ID( "data" ) // unique window ID
Distribution(
Set Window ID( "distrib" ),
Continuous Distribution( Column( :weight ) ),
Nominal Distribution( Column( :age ) )
Graph Builder(
Set Window ID( "graphbuilder" ),
Size( 443, 409 ),
Fit to Window( "Maintain Aspect Ratio" ),
Elements( Position( 1, 1 ), Line( X, Y, Legend( 1 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 2 ) ) )
Set Layout specifies the layout of the tabs that show the data table and output.
project << Set Layout(
H Splitter Box(
<<Set Sizes( {0.15, 0.85} ),
V Splitter Box(
Size( 182, 700 ),
<<Set Sizes( {0.5, 0.5} ),
Tab Page Box( // show the Bookmarks pane
Window ID( "Bookmarks" )
Tab Page Box( // show the Windows pane
Window ID( "Windows" )
V Splitter Box(
<<Set Sizes( {0.85, 0.15} ),
H Splitter Box(
<<Set Sizes( {0.43, 0.57} ),
Tab Page Box( // show the data table
Window ID( "data" )
Tab Box(
Tab Page Box( // show the Distribution graph and reports
Window ID( "distrib" )
Tab Page Box( // show the Graph Builder graph
Window ID( "graphbuilder" )
Tab Page Box(
Window ID( "Log" ) )
Save saves the project.
project << Save( "$DOCUMENTS/Big Class.jmpprj" );
图 15.2 Example of a Complex Project