将一个图形叠加到另一个图形上各位朋友,
像第一个附件中所示,将一个图形叠加到另一个图形上的方法(或最佳方法)是什么?最终目标是生成多个图,将它们排列在保存为表格属性的窗口中。然后运行此表格属性,以便最终的合成图片能够被复制并粘贴到 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) ;


内容组织大规模定制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: 将一个图叠加到另一个图上布雷迪,
我刚刚得到了一些今天早些时候似乎有效的东西,但我也想试试你的方法。
基于脚本索引中的“添加图像”命令(和示例),我能够获得如下所示的图像。 我唯一的问题是图形框似乎是唯一允许我获得结果的显示元素框。 此外,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) ;