如何使用現有標準差資料表繪製圖表?
例如:
樣本平均值標準差
1 70000 25800
2 45000 19100
3 65000 41200
謝謝你!
這是執行此操作的一種方法:
給個數據表

你可以用圖表來表示:

Names Default To Here( 1 );
New Table( "example",
Add Rows( 3 ),
New Column( "Sample",
Numeric,
"Nominal",
Format( "Best", 12 ),
Set Property( "Value Order", {Numerical Order( 0 )} ),
Set Selected,
Set Values( [1, 2, 3] ),
Set Display Width( 97 )
),
New Column( " Mean", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [70000, 45000, 65000] ) ),
New Column( "Standard deviation", Numeric, "Continuous", Format( "Best", 12 ), Set Values( [25800, 19100, 41200] ) )
);
Graph Builder(
Variables( X( :Sample ), Y( :" Mean"n ), Y( :Standard deviation ) ),
Elements(
Position( 1, 1 ),
Points( X, Y, Legend( 5 ) ),
Line( X, Y, Legend( 7 ) )
),
Elements(
Position( 1, 2 ),
Points( X, Y, Legend( 6 ) ),
Line( X, Y, Legend( 8 ) )
),
SendToReport(
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 5, Base( 0, 0, 0, Item ID( " Mean", 1 ) ) ),
Legend Model( 6, Base( 0, 0, 0, Item ID( "Standard deviation", 1 ) ) )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {5, [0], 7, [2], 6, [1], 8, [3]} )}
)
)
)
您的圖形格式是否與我示範的不同?如果是這樣,請提供它,社區將介入幫助您。
注意:資料表和圖表的建立首先是互動完成的,完成後我請求 JMP 提供腳本給我。
註 2:我建議您花時間閱讀「幫助」下拉式選單下標題為「發現 JMP」的文件。

我必須做幾件事才能使您的數據發揮作用。
首先,在「列」選擇區域中,我新增了兩個新的虛擬列,分別為「上」和「下」。它們的創建是為了給出平均值±標準差的上限值和下限值。
其次,將「平均值」、「上限」和「下限」拖曳到 Y 軸拖放區域後,我將這些點改成了條形。由於我只想用條形來表示平均值,所以我更改了“變數”屬性,並取消選取“上限”和“下限”。
第三,我在圖表中加入了第二個長條圖。我再次進入屬性區域,將長條圖樣式變更為區間。由於我只想在區間長條圖中顯示上限和下限,因此我取消選擇了平均值。
這是用於重新建立圖表的 JSL
Graph Builder(
Transform Column( "Lower", Formula( :Mean - :Standard deviation ) ),
Transform Column( "Upper", Formula( :Mean + :Standard deviation ) ),
Size( 744, 627 ),
Variables(
X( :Sample ),
Y( :Mean ),
Y( :Upper, Position( 1 ) ),
Y( :Lower, Position( 1 ) )
),
Elements(
Bar( X, Y( 1 ), Legend( 4 ) ),
Bar( X, Y( 2 ), Y( 3 ), Legend( 6 ), Bar Style( "Interval" ) )
),
SendToReport(
Dispatch( {"Bar"}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {"Bar"[2]}, "", OutlineBox, {Close( 0 )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Mean" )} )
)
)
注意:使用原始資料建立所需的圖表會更簡單。 JMP 會為您產生平均值、上限和下限。