大家下午好
我想創建一個圖表,其中的點恰好落在每個箱線圖和相關的小提琴圖中。
使用圖形生成器,我意識到這些點在框內沒有排列。
有人知道如何解決這個問題嗎?
我附上照片。

將 X 列和疊加列拖到 X 軸,然後將疊加列移動到顏色放置區域。

非常感謝,
我嘗試了該程序,但它不起作用。
我想同時在 x 軸上放置幾個連續變量,每個變量都分為 2 組。 在 y 軸上我沒有任何變量。
目的是將所有變量一起顯示,並將每個變量與兩組進行比較。
如果我按照您的建議進行操作,我一次只能在 y 軸上放置一個變量,因為如果我將所有變量放在一起,則會再次出現問題,即箱形圖中的點不對齊;而我同時想要幾個變量。
朱塞佩
所要做的就是獲取您描述的數據表,並將其傳遞給 Graph Builder 以創建您希望它堆疊數據的顯示,然後運行 Graph Builder。為了說明,給定下表有 4 個連續變量(它可以有盡可能多的連續變量),

一個只是使用
表=>堆棧
並堆疊所有連續的列,並確保 Group 列也被攜帶

我還將堆疊數據列重命名為測量,源標籤列重命名為變量
現在,Graph Builder 可以使用結果數據來創建所需的圖表

下面是一個腳本,它首先從 JMP 提供的樣本數據表之一創建樣本數據表,然後堆疊數據,最後使用 Graph Builder 創建上述圖表
Names default to here(1);
// Create a sample data table that has multiple continuous variables with 2 groups
// Open Data Table: semiconductor capability.jmp
// → Data Table( "semiconductor capability" )
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
dt:Site << set name("Group");
dt << select where( :Group<=2 & :lot_id == "lot01" );
dt << invert row selection;
dt << delete rows;
dtSub = dt << Subset(
All rows,
columns( :Group, :NPN1, :NPN2, :NPN3, :NPN4 )
);
close(dt, nosave);
Wait(5); // Wait 5 seconds so one can see the initial data table
// Now just modify the data shape to set it up for Graph Builder to display the
// data as required
// First Stack all of the continuous variables into one column, and create a second
// column that indicates what column each row's value came from
dtStack = dtSub <<
Stack(
columns( :NPN1, :NPN2, :NPN3, :NPN4 ),
Source Label Column( "Variable" ),
Stacked Data Column( "Measurement" )
);
// Now graph the data placing the Variable and Group columns on the X axis and the
// Measurement column on the Y axis
// Also, remove the label from the Y axis
Graph Builder(
Size( 528, 458 ),
Show Control Panel( 0 ),
Variables(
X( :Variable ),
X( :Group, Position( 1 ) ),
Y( :Measurement ),
Color( :Group )
),
Elements(
Contour( X( 1 ), X( 2 ), Y, Legend( 14 ) ),
Box Plot( X( 1 ), X( 2 ), Y, Legend( 13 ) ),
Points( X( 1 ), X( 2 ), Y, Legend( 15 ) )
),
SendToReport(
Dispatch( {}, "Y title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg( Poly Seg( "Violin (NPN1>>1)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN1>>2)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN2>>1)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN2>>2)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN3>>1)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN3>>2)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN4>>1)" ), {Transparency( 0.5 )} ),
DispatchSeg( Poly Seg( "Violin (NPN4>>2)" ), {Transparency( 0.5 )} )}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {14, [3, 4], 13, [0, 1, 2, -3], 15, [5, 6]} )}
)
)
);
非常感謝你,
感謝您的寶貴建議,我終於達到了目標。
回想起來,解決方案很簡單,但我事先沒有考慮過你寫的內容。 我問你一個好奇心:你知道如何將上標和下標放在x軸或縱坐標上的變量標籤嗎?
我注意到 JMP 缺乏這種簡單但常見的可能性。
鑑於 JMP 的重要性,這個缺點是相當反常的。
最良好的祝愿
朱塞佩
JMP 使用 Unicode 字符集,它支持特殊的
é 和 ½ 等字符。 它保存沒有特殊 Unicode 的文件
字符自動作為純文本。 此選項由
默認。
換句話說,如果您將此類特殊的 Unicode 字符放在數據表中,它們會顯示


感謝您的建議。
我想知道如何將例如組平方或 2 顯示為下標。
或者在前面的示例中顯示高度平方。
所以一般來說如何用上標或下標顯示軸標籤。
例如,如果我在縱坐標軸上寫了 BMI (Kg / m ^ 2),我如何告訴 JMP “^ 2”是平方的,避免使用 ^ 符號?
最良好的祝愿
JMP 支持 UTF-8 和 UTF-16 Unicode 標準。 有關詳細信息,請參閱腳本指南。它允許嵌入這些特殊字符而無需特殊處理。
JMP 還可以使用轉義字符串“\!”打印此類字符後跟 Unicode 字符串。因此,要包含您指定為標籤的內容,我將打開一個腳本窗口並將以下打印命令放在窗口中
print("BMI (Kg / m\!U00B2)");
運行此行後,日誌中將顯示以下內容,然後您可以將其剪切並粘貼到標籤中
"BMI (Kg / m²)"
我希望有一條更直接的路徑,但我不知道有一條。有關完整 Unicode 字符集的詳細信息,請參閱腳本指南
