你好,
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>