如何標準化循環腳本產生的所有圖形的軸刻度(對數)?我正在嘗試編寫一個簡單的腳本,該腳本循環遍歷列並迭代地使用每列作為圖中的 Y 值。 我想我已經完成了 for 循環,但無法將 Y 軸設定為對數刻度。 程式碼運行,但產生的每個圖表都採用線性比例,並且具有特定於每列的範圍。我希望每個圖表都採用對數刻度(具有專門設定的最小值/最大值或基於資料自動產生的範圍)。
cd = Current Data Table();
column_names = cd << Get Column Names;
For ( i = 256, i <= 258, i++,
Graph Builder(
Size( 625, 660 ),
Variables(
X( :Day ),
Y( Column( cd, column_names[i] ) ),
Overlay( :Dose ),
),
Elements( Line( X, Y, Legend( 6 ) , Error Bars ("Standard Deviation") ) ),
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,
ScaleBox,
{Scale( "Log" ), Format( "Best", 12), Min( 0.002 ), Max( 16000 ),
Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Width( 2 )} ),
Properties( 1, {Line Width( 2 )} ),
Properties( 2, {Line Width( 2 )} ),
Properties( 3, {Line Width( 2 )} ),
Properties( 4, {Line Width( 2 )} )
)}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( Column(cd, column_names[i]))}
)
)
))
我讀過了https://community.jmp.com/t5/Discussions/Scripting-Y-Axis-to-be-Log-scale/mp/54573#M30852我仍然卡住了。 我嘗試包括 ScaleBox(1) 或 ScaleBox(2) 但甚至無法使第一個或第二個圖表處於對數刻度上。 我也在嘗試 xPath 解決方案,但額外的幫助會很棒。
非常感謝!!
獎金問題:
SendToReport(
Dispatch(
{},
"Data Abs. Counts T CD56br" ,這裡的「Data Abs. Counts T CD56br」指的是什麼? 這是我複製/貼上並保留的列名稱之一(但不是所有列名稱!)。它似乎正在按照它應該的方式運行(除了比例之外)並將其更改為其他值(即“數據”)似乎不會破壞任何東西。 這是什麼?
品質和工藝工程回覆:如何標準化循環腳本產生的所有圖形的軸刻度(對數)?事實上,事實證明我的問題確實是獎金問題。 我必須將該名稱更改為 char(column_names[i]) ,以便以下規範適用於 *那個* 圖表。
所以有效的程式碼是:
cd = Current Data Table();
column_names = cd << Get Column Names;
For ( i = 255, i <= 256, i++,
gb = Graph Builder(
Size( 625, 660 ),
Variables(
X( :Day ),
Y( Column( cd, column_names[i] ) ),
Overlay( :Patient ),
Color( :Dose )
),
Elements( Line( X, Y, Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
Char(column_names[i]),
ScaleBox,
{Scale( "Log" ), Format( "Best", 12 ), Min( 0.002 ), Max( 16000 ),
Inc( 1 ), Minor Ticks( 1 ), Label Row( Show Minor Labels( 0 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
6,
Properties( 0, {Line Width( 2 )} ),
Properties( 1, {Line Width( 2 )} ),
Properties( 2, {Line Width( 2 )} ),
Properties( 3, {Line Width( 2 )} ),
Properties( 4, {Line Width( 2 )} )
)}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Set Text( Column(cd, column_names[i]) )}
)
)
);
rgb = gb << report;
rgb << journal;
);