將圖形疊加到另一個圖形上伙計們,
如第一個附件所示,將另一個圖形疊加到另一個圖形上的方法(或最佳方法)是什麼? 最終目標是生成多個繪圖,將它們排列在一個保存為表格屬性的窗口中。 然後運行此表格屬性,以便能夠將最終合成圖片複製並粘貼到 Powerpoint。
到目前為止,我的腳本幾乎可以讓我到達那裡(請參閱附加的腳本和第二個附件)。 我當前的腳本顯然會進入每個生成的圖表的報告中,並且使用“獲取圖片”命令來填充陣容框。 我試圖將直方圖僅視為圖像,並執行“添加圖像”,但無法使其正常工作。
如果添加圖像命令是要走的路,我的附加問題是如何適當地提出“邊界”參數以正確定位?
尼爾
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) ;


圖形腳本編寫回复:將圖形疊加到另一個圖形上為了清楚起見,我試圖將一張圖(通過獲取圖片)覆蓋在另一張圖上。
因此,根據腳本,我正在獲取“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) ;
回复:將圖形疊加到另一個圖形上你好,
我知道這樣做的唯一方法如下:
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;
);

乾杯,
布雷迪
回复:將圖形疊加到另一個圖形上布雷迪,
我今天早些時候得到了一些似乎有效的東西,但我也想嘗試一下你的方法。
基於腳本索引中的“添加圖像”命令(和示例),我能夠獲得如下所示的圖像。 我唯一的問題是圖形框似乎是唯一允許我獲得結果的顯示元素框。 此外,X 和 Y 軸仍然存在,我不知道如何隱藏它們。 附上我的代碼。
尼爾

回复:將圖形疊加到另一個圖形上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>