你好,
1.我想知道如何将两个图表保存到一张ppt幻灯片中。
现在我的脚本正在将每张幻灯片一张图表保存到 ppt 中。
我需要比较单张幻灯片中的两个图表。 另外,我为我的数据生成了大约 100 张图表,并且 ppt 中有 100 张幻灯片,这使得分析变得困难。
2. 如何缩放我的个人图表?
//******************Open Data table***********************//
dt = Open( "$Downloads\Measure - Subset of JA63025.10A_raw_para_Stacked.jmp" );
//************************ Create new Columns to segregate the test names to group and plot graphs ***********************//
dt << New Column( "Test Number (MSB of Label)",
Character,
Nominal,
Formula( Num( Substr( :Label, Contains( :Label, ":p" ) - Num( 10 ), Contains( :Label, ":p" ) - Num( 6 ) ) ) )
);
dt << New Column( "Test Description", Character, Nominal, Formula( Substr( :Label, Contains( :Label, ":NVM_" ) + Num( 5 ), 100 ) ) );
dt << New Column( "NVM Parameter Name",
Character,
Nominal,
Formula( Substitute/*###*/(Substr( :Label, Contains( :Label, ":NVM_" ) + Num( 5 ), 100 ), "[1]", "") )
);
dt << New Column( "Measurements.",
Character,
Nominal,
Formula(
If( 16600 <= :Name( "Test Number (MSB of Label)" ) <= 16603,
Substitute( :Test Description, "[1]", "_BiasA_Pre_refcell_Erase" ),
If( 16629 <= :Name( "Test Number (MSB of Label)" ) <= 16632,
Substitute( :Test Description, "[1]", "_BiasA_Post_refcell_Erase" )
)
)
)
);
dt << New Column( "Measurements..",
Character,
Nominal,
Formula( If( 10100 <= :Name( "Test Number (MSB of Label)" ) <= 10103, Substitute( :Test Description, "[1]", "" ) ) )
);
dt << New Column( "Measurements...",
Character,
Nominal,
Formula(
If( 10100 <= :Name( "Test Number (MSB of Label)" ) <= 10103,
Empty(),
If( 16600 <= :Name( "Test Number (MSB of Label)" ) <= 16603,
Empty(),
If( 16629 <= :Name( "Test Number (MSB of Label)" ) <= 16632,
Empty(),
Substitute( :Test Description, "[1]", "" )
)
)
)
)
);
//*******************Plot Variability Charts****************************//
dtsum = Current Data Table();
colnames = dtsum << get column names( character );
Show( colnames );
//nw = New Window( "Plots", myVLB = V List Box() );
New Window( "Graphs",
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
gb = Variability Chart(
invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
By( :NVM Parameter Name ),
);
);
//myVLB << append( Report( gb ) );
);
//**********************************Save Script to Data Table ************************//
dt << New script(
"Plots",
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
Variability Chart(
//invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 1 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
By( :NVM Parameter Name ),
);
)
);
//*****************************************EXPORT GRAPHS TO PPT**********************************//
For( i = 23, i <= N Items( colnames ), i++, // We have change i value based on the column where our modified column to plot graphs starts
nn = dt << Variability Chart(
invisible,
Y( :Data ),
Y Scale( Left, Right ),
X( Column( colnames[i] ) ),
By( :NVM Parameter Name ),
Analysis Type( "Choose best analysis (EMS REML Bayesian)" ),
Vertical Charts( 0 ),
Variability Summary Report( 0 ),
Std Dev Chart( 0 ),
Mean of Std Dev( 0 ),
Show Box Plots( 1 ),
Mean Diamonds( 1 ),
);
If( i == 23,
nn << Save Presentation( "$Downloads/jmp_example2.pptx" ),
nn << Save Presentation( "$Downloads/jmp_example2.pptx", Append )
);
);
Open( "$Downloads/jmp_example2.pptx" );
关键是轮廓框中的所有轮廓框都必须复制为一张图片。 您需要使用所需的任何结构创建所需的页面,最后一步是使用 << 获取图片将所需的页面附加到您要 << 保存演示文稿的大纲框中。
我实际上认为该功能已经存在。我大部分时间都使用大纲框作为 SlideBox()。我只是根据需要构建输出,然后将它们放入 Outline Box() 中,然后将它们附加到我正在构建的日记中。选择 Outline Box() 是因为 JMP 使用 pptx 文件处理大纲框的方式。Outline Box() 标题成为幻灯片的标题,而我放入 Outline Box() 中的“图片”成为幻灯片的内容。
是的,可以为“SlideBox()”设置一些默认值,这可能会使其更容易,但大多数时候,我放在一起的对象组合需要多个 H 列表框、V 列表框、阵容框等才能获得显示器如我所愿。
我通常处理这个问题的方法是让脚本在创建配对图片对象时创建它们。然后将它们附加到日记中。因此,在上面创建多个变异图的情况下,我将为循环迭代 1 创建一个 V List Box() 或 H List Box,并将第一个迭代图附加到 List Box() 中,然后在迭代循环 2 中,我会将输出附加到列表框中,然后将列表框的图片复制到日志窗口,然后删除列表框(),然后重新开始迭代 3,等等。
人们还可以在所有变异性图表都存在后,使用 XPath 查询日志,并找出大纲框的数量,然后从那里构建您的对并将它们放入一个新的日志窗口中,该窗口可以是您的最终“保存演示文稿”输出
我确信正在使用其他方法
我使用的方法是创建幻灯片,因为我希望它们位于 JMP 中,然后将它们作为图片复制到最终的显示窗口中,我想要的每个 pptx 页面一个图片对象。
下面是一个显示简单示例的脚本。
Names default to here(1);
dt=Open("$SAMPLE_DATA/big class.jmp");
// Create the 2 graphs
fg = dt << Fit Group(
Oneway(
Y( :height ),
X( :sex ),
SendToReport(
Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 463, 305 )} )
)
),
Oneway(
Y( :weight ),
X( :sex ),
SendToReport(
Dispatch( {}, "Oneway Plot", FrameBox, {Frame Size( 463, 305 )} )
)
),
<<{Arrange in Rows( 1 )}
);
// Place the graphs into a single picture
nw=new window("The Picture", report(fg)[outlinebox(1)]<<GET picture=""></GET>