如何在不同時間的兩次測試之間顯示圖表中的變化率?我繪製了一個隨時間變化的圖表。我不能顯示範圍非常方便,但我想顯示範圍的比例。例如,最後一個值比第一個測試值改變了10%,我希望在圖中顯示。
Re:如何在不同時間的兩次測試之間顯示圖表中的變化率?您可以使用在圖形構建器平台中創建的臨時“列”。 要以交互方式執行此操作,請右鍵單擊列名稱,然後從圖形構建器平台的“變量”部分中選擇公式(或“變換”,“行”等)。 請注意,使用非常大的數據表查找第一個值的方法可能會很慢。
dt = New Table( "Change in Response",
Add Rows( 10 ),
New Column( "Response",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 3 ),
Formula( Random Normal( 10, 1 ) ),
Set Display Width( 71 )
)
);
dt << Graph Builder(
Size( 553, 416 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y(
Transform Column(
"Difference",
Format( "Fixed Dec", 12, 3 ),
Formula( :Response / (:Response << Get Values)[1] - 1 )
)
),
Y( :Response )
),
Elements( Position( 1, 1 ), Points( X, Y, Legend( 5 ) ) ),
Elements( Position( 1, 2 ), Points( X, Y, Legend( 3 ) ) ),
SendToReport(
Dispatch(
{},
"Difference[Response]",
ScaleBox,
{Format( "Percent", 12, 1 )}
)
)
);
Re:如何在不同時間的兩次測試之間顯示圖表中的變化率?這是基於伊恩的回應。 該腳本使用Transform Column()。這可以通過點擊右鍵單擊列名稱來完成:響應並選擇式 。
Graph Builder(
Size( 534, 467 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y( Transform Column("Response", Formula((:Response-:Response[1])/:Response[1]) ) ),
Y( :Response )
),
Elements( Position( 1, 1 ), Bar( X, Y, Legend( 8 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 9 ) ) )
)Re:如何在不同時間的兩次測試之間顯示圖表中的變化率?沒有新欄目和公式,我可以這樣做嗎?Re:如何在不同時間的兩次測試之間顯示圖表中的變化率?如果我理解正確,請嘗試運行此腳本來製作表格。
New Table( "Change in Response",
Add Rows( 10 ),
New Script(
"Response & Change in Response",
Graph Builder(
Size( 534, 467 ),
Show Control Panel( 0 ),
Show Legend( 0 ),
Variables(
X( Transform Column( "Row", Formula( Row() ) ) ),
Y( :Change in Response ),
Y( :Response )
),
Elements( Position( 1, 1 ), Bar( X, Y, Legend( 8 ) ) ),
Elements( Position( 1, 2 ), Bar( X, Y, Legend( 9 ) ) )
)
),
New Column( "Response",
Numeric,
"Continuous",
Format( "Fixed Dec", 12, 3 ),
Formula( Random Normal( 10, 1 ) ),
Set Display Width( 71 )
),
New Column( "Change in Response",
Numeric,
"Continuous",
Format( "Percent", 12, 0 ),
Formula(
Local( {firstResponse = Column( "Response" )[1]},
(:Response - firstResponse) / firstResponse
)
),
Set Display Width( 117 )
)
)
如果表中保存的腳本為您提供了所需內容,請查看列公式。