グラフを別のグラフに重ねる皆さん、
最初の添付ファイルに示すように、別のグラフを別のグラフに重ねる方法 (または最善の方法) は何ですか?最終目標は、複数のプロットを生成し、それらをテーブル プロパティとして保存されるウィンドウに配置することです。次に、このテーブル プロパティを実行して、最終的な合成画像をコピーして PowerPoint に貼り付けることができます。
これまでのスクリプトで、ほぼ目的を達成できました (添付のスクリプトと 2 番目の添付ファイルを参照)。現在のスクリプトは、生成された各グラフのレポートに取り込まれ、"Get Picture" コマンドを使用して Lineup Box にデータを取り込みます。ヒストグラムを画像としてのみ扱い、"Add Image" を実行しようとしましたが、うまくいきませんでした。
「画像の追加」コマンドを使用する場合、適切な位置に配置するには「境界」引数を適切に設定するにはどうすればよいかという追加の質問があります。
ニール
cr = Current Data Table() << Run Script("Cumulative Resistivity");
rpt_cr = Report(cr);
rpt_cr_pic = rpt_cr[PictureBox(1)] << Get Picture;
ds = Current Data Table() << Run Script("Distribution");
rpt_ds = Report(ds);
rpt_ds_pic = rpt_ds[ListBox(4)] << Get Picture;
//comb = New Image( rpt_ds_pic );
//rpt_cr_pic << Add Image( comb, bounds(left(0), top(500),bottom(0),right(724)));
nw = Eval Expr( New Window("BR",
a = V List Box(
Lineup Box(N Col(2), rpt_cr_pic, rpt_ds_pic ),
)
)
);
Current Data Table() << New Script("RP", nw) ;


コンテンツの編成マスカスタマイゼーションRe: グラフを別のグラフに重ねるcr = Current Data Table() << Run Script("Cumulative Resistivity");
rpt_cr = Report(cr);
rpt_cr_pic = rpt_cr[PictureBox(1)] << Get Picture ;
Print(rpt_cr_pic << Get Size);
cp = Current Data Table() << Run Script("Cumulative Permeability");
rpt_cp = Report(cp);
rpt_cp_pic = rpt_cp[PictureBox(1)] << Get Picture;
Print(rpt_cp_pic << Get Size);
ds = Current Data Table() << Run Script("Distribution");
rpt_ds = Report(ds);
rpt_ds_pic = rpt_ds[PictureBox(1)] << Get Picture;
g = Graph Box(
FrameSize( 750, 1000 ),
X Scale( 0, 100 ),
Y Scale( 0, 100 ),
<<ADD image=""></ADD>Re: グラフを別のグラフに重ねるブレイディ
今日はうまくいったように見えるものを手に入れましたが、あなたのアプローチにも気を配りたいと思います。
Scripting index の「Add Image」コマンド (および例) に基づいて、以下に示す画像を取得できました。 私の唯一の問題は、グラフ ボックスが、結果を取得できる唯一の表示要素ボックスのように見えることでした。 また、X 軸と Y 軸はまだ存在しており、それらを非表示にする方法がわかりません。 私のコードが添付されています。
ニール

Re: グラフを別のグラフに重ねるやあ、
これを行う唯一の方法は次のとおりです。
1) 画像を取得し、それらのピクセルの行列を取得します。
2) 「下」画像のピクセルのサブマトリックスを「上」画像のピクセルマトリックスで上書きします。
以下は、これを説明するスクリプトと、結果を示す画像 (実際には、「トップ」画像が異なる場所に「貼り付け」られた 3 つの画像のウィンドウ) です。 画像を希望の場所に配置するには実験が必要になる場合がありますが、最終的にはこの方法でうまくいくはずです。
names default to here(1);
//make a table
dt = astable(J(50,2,randomuniform()));
//make a graph
gb = dt << Graph Builder(
Size( 500, 500 ),
Show Control Panel( 0 ),
Variables( X( :col1 ), Y( :col2 ) ),
Elements( Points( X, Y, Legend( 5 ) ) ),
);
//save to a picture, get the pixels and get the picture's x and y dimemnsions
pic1 = (report(gb)[framebox(1)] << get picture) << get pixels;
pic1y = nrow(pic1);
pic1x = ncol(pic1);
//now make another graph and do the same
dist = dt << distribution(histograms only, y(:col1));
pic2 = (report(dist)[framebox(1)] << get picture) << get pixels;
pic2y = nrow(pic2);
pic2x = ncol(pic2);
//create a window to place the resulting images
nw = new window("xx",
vlb = vlistbox(
)
);
x = y = 1; //initial "corner" of overwritten pixels... we will increment these and do 3 total pictures
for(i = 1, i<=3, i++,
newPic = pic1;
newPic[ y::(y+pic2y-1), x::(x+pic2x-1), ] = pic2;
vlb << append(picturebox(new image(newPic)));
y += 60;
x+= 150;
);

乾杯、
ブレイディ
Re: グラフを別のグラフに重ねるわかりやすくするために、別のグラフ画像の上にグラフの画像を (画像の取得を介して) 重ね合わせようとしています。
スクリプトに従って、「rpt_ds_pic」画像を取得し、rpt_cr_pic にオーバーレイしようとしています。 ただし、出力用に rpt_cr_pic しか取得していません。追加された画像は表示されません。
スクリプト インデックス (画像の追加) とスクリプト ガイドを確認しましたが、これを機能させるための基本的な概念を理解していないことは明らかです。
ヒントや方向性は非常に役に立ちます。
どうもありがとう。
ニール
cr = Current Data Table() << Run Script("Cumulative Resistivity");
rpt_cr = Report(cr);
rpt_cr_pic = rpt_cr[PictureBox(1)] << Get Picture;
ds = Current Data Table() << Run Script("Distribution");
rpt_ds = Report(ds);
rpt_ds_pic = rpt_ds[PictureBox(1)] << Get Picture;
comb = New Image( rpt_ds_pic );
rpt_cr_pic << Add Image( comb, bounds(left(0), top(500),bottom(0),right(724)));
nw = Eval Expr( New Window("BR",
a = V List Box(
Lineup Box(N Col(2), rpt_cr_pic, /*rpt_ds_pic*/ ),
)
)
);
Current Data Table() << New Script("RP", nw) ;