こんにちは、
私は対話的に "New window"によって提供される様々な値に基づいて再実行されるスクリプトを書くことを試みています。
これがスキームです:
1 /ボタンがあるウィンドウを開きます( "Select Master File")。
2 /このボタンをクリックすると「pick file」が表示されファイルを選択します
3 /選択したファイルの内容に基づいて、スクリプトを実行してグラフを生成する必要があります
これが私の質問です。
1 /新しいファイルを選択するたびにsurを作る方法、スクリプト全体が再実行され、グラフが更新されますか?
2 /ファイルを選択した「新しいウィンドウ」にグラフを埋め込むにはどうすればいいですか?
3 /実行しなければならないスクリプトはかなり長く、いくつかのグラフを生成する必要があります。すべてのコードを "New window"コードに入れずにこのスクリプトを呼び出す方法はありますか?(関数の呼び出しなど)
どうもありがとう。
コードの簡略版(コードをテストするために2つのファイルが添付されています)を以下に示します。
// Collect location of the Master file and the data...
New Window( "Window Controls",
Lineup Box( N Col( 1 ), Spacing( 3 ),
Panel Box( "1/ Select location of Data...", Button Box( "Select Data", Folder = Pick Directory( "Please pick a folder", ShowFiles ) ) ),
Panel Box( "2/ Select Data Master File...", g1=Button Box( "Select Master File", MasterFile = Pick File()
) ),
Col List Box( all ); //g1 << updateWindow;
),
);
MasterTable = Open( MasterFile );
Lots = Column( MasterTable, "Lot" ) << GetAsMatrix;
Factors = Column( MasterTable, "Factor" ) << GetAsMatrix;
x = Factors * [10, 50, 90];
y = Factors * [10, 90, 10];
New Window( "Poly Seg Example", g = Graph Box( Poly Seg( x, y ) ) );
それは項目3 /を完全に解決します。
どうもありがとう !!!!!!!!!
1 /と2 /を解決する方法について何かアイデアは?
グラフを式として保存し、後で新しいウィンドウで使用する1つの方法があります。
dt = open("$sample_data\Big Class.jmp");
g1_expr = expr(
gb1 = dt << Graph Builder(Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ), Overlay( :sex ) ),
Elements( Points( X, Y, Legend( 6 ) ) )
);
);
g2_expr = expr(
gb2 = dt << Graph Builder(Show Control Panel( 0 ),
Variables( X( :age ) ),
Elements( Pie( X, Legend( 3 ), Label( "Label by Value" ) ) ),
SendToReport( Dispatch( {}, "Y title", TextEditBox, {Set Wrap( 2 )} ) )
);
);
nw = new window("Sample Graphs",
hlistbox(
g1_expr,
g2_expr
),
);