我已使用以下代碼在JMP Graph Builder中創建以下圖像。
Graph Builder(
Size( 1106, 867 ),
Legend Position( "Bottom" ),
Variables(
Y( :count_traditional ),
Y( :count_flat_probabilistic, Position( 1 ) ),
Y( :count_increasing_probabilistic, Position( 1 ) )
),
Elements(
Histogram( Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Contour( Y( 1 ), Y( 2 ), Y( 3 ), Legend( 11 ) )
),
SendToReport(
Dispatch(
{},
"count_traditional",
ScaleBox,
{Min( 0 ), Max( 20.5 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Level Name( 0, "Traditional" ),
Level Name( 1, "Probabilistic (Flat)" ),
Level Name( 2, "Probabilistic (Increasing)" ),
Properties( 0, {Line Color( 3 ), Fill Color( 3 )} ),
Properties( 1, {Line Color( 5 ), Fill Color( 5 )} ),
Properties( 2, {Line Color( 4 ), Fill Color( 4 )} )
), Legend Model(
11,
Properties( 0, {Fill Color( 67 )} ),
Properties( 1, {Fill Color( 69 )} )
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Number of Visits" )} ),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {3, [0, 1, 2], 11, [-1, -1, -1]} ),
Position( {0, 1, 2, -1, -1, -1} )}
)
)
)

問題:如何使第一個和第三個輪廓位於各自框的中間?
謝謝,
阿德里安
嗨,艾德里安,
我找不到解決您確切問題的實用方法,這似乎是一個錯誤,但是我非常接近一個可能的解決方法:
- 堆疊您的3個Y列(我將數據重命名為COUNTS個)
- 在GB中,將標籤列用作X組
- 將數據拖動到Y軸框,然後選擇直方圖和小提琴圖
- 將“標籤”列拖到“覆蓋”框中(在此示例中,我僅使用列1-3)
- 在“輪廓”菜單中,取消選擇“覆蓋”
您將獲得如下內容:

腳本如下:
Graph Builder(
Variables( Y( :COUNTS ), Group X( :Label ), Overlay( :Label ) ),
Elements( Histogram( Y, Legend( 5 ) ), Contour( Y, Overlay( 0 ), Legend( 6 ) ) ),
SendToReport( Dispatch( {}, "", ScaleBox( 2 ), {Select} ) )
)
它不是完美的,但可以解決問題。
最好的,
蒂埃里
謝謝你,蒂埃里
這是您執行第3步後的數據,看起來不錯。

這是您執行第4步後的情況:出問題了。

我不知道在哪裡可以取消選擇“覆蓋”? 我在腳本中手動嘗試過,但它沒有更改上面複製的數字:
Graph Builder(
Size( 1022, 842 ),
Variables( Y( :Data ), Group X( :Program ), Overlay( :Program ) ),
Elements( Histogram( Y, Legend( 4 ) ), Contour( Y, Overlay( 0 ), Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"Data",
ScaleBox,
{Min( -0.5 ), Max( 20.5 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 4, Properties( 0, {Line Color( 0 ), Fill Color( 0 )} ) ),
Legend Model( 5, Properties( 0, {Fill Color( 1 )} ) )}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Number of Visits" )} )
)
)乾杯,
阿德里安
嗨,艾德里安,
這是“輪廓”的“覆蓋”選項的位置的屏幕截圖,以GB為單位

最好的,
TS
謝謝,蒂埃里! 在我的JMP(13.1)版本中沒有看到該選項,因此我想是時候該更新軟件了。