ユーザーが選択した3Dグラフの向きから2DXY座標列の生成を自動化するスクリプトを生成しています。スクリプトは計算を実行するためにRコードを呼び出しますが、XYZ列データと回転設定をRに提供する必要があります。
保存された散布図3Dスクリプトから、XYZ列名(zue1 ...)と回転設定(-8 ....)を確認できます。これらの列を選択してcsvファイルをエクスポートするにはjslコードが必要です。そして、回転設定の値を選択してエクスポートするコード。
何かアドバイスをいただければ幸いです。
散布図3D ((
Y(:zue1、:zue2、:zue3)、
Frame3D ((
グラブハンドルを設定する( 0 )、
Set Rotation(- 8.15592033195416 、 47.3040538060599 、 75.4291344975828 )。
)。
);
CSVファイルを仲介として使用するのではなく、 JMPとRの統合。
@ian_jmp JMPからRルーチンを呼び出すという提案は、問題を解決するための優れた方法かもしれません。
本当にcsvパススルーデータテーブルを使用する必要がある場合は、csvファイルの作成を実行する1つの方法の簡単な例を次に示します。
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
sp = Scatterplot 3D(
Y( :age, :height, :weight ),
Frame3D( Set Grab Handles( 0 ), Set Rotation( -54, 0, 38 ) )
);
sp << on close(
theScript = Char( (Report( sp ) << get scriptable object) << get script );
varsList = {};
Insert Into( varsList, Word( 2, Substr( theScript, Contains( theScript, "Y(" ) ), ":," ) );
Insert Into( varsList, Word( 4, Substr( theScript, Contains( theScript, "Y(" ) ), ":," ) );
Insert Into( varsList, Word( 6, Substr( theScript, Contains( theScript, "Y(" ) ), ":,)" ) );
rotationList = {};
Insert Into( rotationList, Word( 2, Substr( theScript, Contains( theScript, "Rotation(" ) ), "()," ) );
Insert Into( rotationList, Word( 3, Substr( theScript, Contains( theScript, "Rotation(" ) ), "()," ) );
Insert Into( rotationList, Word( 4, Substr( theScript, Contains( theScript, "Rotation(" ) ), "()," ) );
dtSub = dt << subset( columns( Eval( varsList ) ), selected rows( 0 ) );
dtSub << New Column( "_Vars_", character, set values( varsList ) );
dtSub << New Column( "_Rotation_", character, set values( rotationList ) );
dtSub << Save( "$TEMP/passvalues.csv" );
close( dtSub, nosave );
);
// This line opens the csv back into JMP
//open("$TEMP/passvalues.csv");