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

如果您使用的是 Windows,您還可以從字符映射表中找到這些:

還有一個選項可以創建插件/自定義函數來執行此操作。 這並不完美,但可能會有幫助? 這是可能的功能的快速示例(如果我要創建一個,我會使其更加健壯):
Names Default To Here(1);
replace_str = Function({str}, {Default Local},
aa_unicode = Associative Array();
aa_unicode["\sigma"] = "\!U03C3";
aa_unicode["\mu"] = "\!U03BC";
aa_unicode["\subscript1"] = "\!U2081";
aa_unicode["\subscript2"] = "\!U00B2";
aa_unicode["\subscript3"] = "\!U00B3";
aa_unicode["\subscript4"] = "\!U2074";
return(Substitute(str, aa_unicode << get keys, aa_unicode << get values));
);
dt = New Table("Untitled 3",
Add Rows(0),
New Column("kg/m\subscript2"),
New Column("\sigma*\mu"),
New Column("\subscript1\subscript3")
);
wait(2);
For Each({col_name}, dt << Get Column Names(String),
Column(dt, col_name) << Set Name(replace_str(col_name));
);
我在維基百科上找到了代碼
print("18F-FDG\!U00B9\!U2078");
"18F-FDG¹⁸"
親愛的馬克,
遺憾的是,像 JMP 這樣的軟件存在這些浪費時間的問題。
發表一些可以減少時間的文章將是一個很好的解決方案。
朱塞佩
非常感謝,
非常有用和果斷的建議。
最好的祝愿
朱塞佩
PS 18F-FDG 以 18 作為 unicode 中的指數我找不到解決方案。 你知道該怎麼做嗎?
如果有一種更直接的方式來輸入特殊字符就好了。 目前,我保留了一個腳本,其中包含我經常使用的符號的註釋字符串。 可以省一點力氣。
JMP 支持 UTF-8 和 UTF-16 Unicode 標準。 有關更多詳細信息,請參閱腳本指南。它允許人們嵌入這些特殊字符而無需特殊處理。
JMP 還可以使用轉義字符串“\!”打印此類字符後跟 Unicode 字符串。因此,為了包含您指定為標籤的內容,我將打開一個腳本窗口並在窗口中放置以下打印命令
print("BMI (Kg / m\!U00B2)");
運行此行後,日誌中將出現以下內容,您可以將其剪切並粘貼到標籤中
"BMI (Kg / m²)"
我希望有一條更直接的路徑,但我不知道有一條。有關完整 Unicode 字符集的詳細信息,請參閱腳本指南

感謝您的建議。
我想知道如何顯示例如組平方或 2 作為下標。
或者在前面的示例中顯示高度的平方。
那麼一般來說如何顯示帶有上標或下標的軸標籤。
例如,如果我在縱坐標軸上寫下 BMI (Kg / m ^ 2),我如何告訴 JMP“^ 2”是平方的,以避免使用 ^ 符號?
最好的祝愿
JMP 使用 Unicode 字符集,支持特殊字符集
é 和 ½ 等字符。 它保存文件時沒有特殊的 Unicode
自動將字符轉換為純文本。 該選項由以下選項選擇
默認。
換句話說,如果您將此類特殊的 Unicode 字符放入數據表中,它們就會顯示


非常感謝你,
感謝您的寶貴建議,我終於達到了目標。
回想起來,解決方案很簡單,但先驗我沒有考慮過你寫的內容。 我問你一個好奇心:你知道如何將上標和下標放在x軸或縱坐標上的變量標籤上嗎?
我注意到 JMP 缺乏這種簡單但常見的可能性。
考慮到 JMP 的重要性,這個缺點相當反常。
最好的祝愿
朱塞佩
必須完成的所有工作都是按照您所描述的方式獲取數據表,並將其傳遞給圖形生成器以創建您希望它堆疊數據的顯示,然後運行圖形生成器。為了說明這一點,給定下表,其中包含 4 個連續變量(可以根據需要具有任意多個連續變量),

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

我還將“堆疊數據列”重命名為“測量”,將“源標籤列”重命名為“變量”
現在,圖形生成器可以使用生成的數據來創建所需的圖形

下面的腳本首先從 JMP 提供的示例數據表之一創建示例數據表,然後堆疊數據,最後使用圖形生成器創建上述圖表
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軸上同時放置幾個連續變量,並且每個變量被分成2組。 在 y 軸上我沒有任何變量。
目的是將所有變量一起顯示,並將每個變量與兩組進行比較。
如果我按照你的建議做了,我一次只能在 y 軸上放置一個變量,因為如果我將所有變量放在一起,問題會再次出現,即箱線圖中的點不對齊;而我想要同時有幾個變量。
朱塞佩
將 X 列和 Overlay 列拖動到 X 軸,然後將 Overlay 列移動到顏色放置區域。
