在做一些研究來回答這個問題時,我在 JMP 社區上發現了這篇文章,它幫助我入門。如何使用疊加圖繪製組合條形圖和折線圖?
使用身高和體重的大類樣本數據示例,我能夠使用疊加圖在同一圖表上創建體重條形圖和身高線圖。

為此,首先清除 JMP 表中的行狀態。 使用兩個變量創建疊加圖,一個位於左軸,一個位於右軸。
然後轉到紅色三角形並單擊顯示控制面板。

然後選擇一個點(高度),然後右鍵單擊並選擇更改為 > 線

然後高度的圓圈變成一條線。

同樣選擇一個點(作為權重),然後右鍵單擊並選擇更改為 > 條形圖

然後更改軸比例、圖例位置和顏色以適應。

最終圖表的名稱帶有 x 標籤。

Open("$SAMPLE_DATA/Big Class.jmp");
Graph Builder(
Size( 793, 696 ),
Show Control Panel( 0 ),
Fit to Window( "Maintain Aspect Ratio" ),
Variables(
X( :name ),
Y( :height, Side( "Right" ) ),
Y( :weight, Position( 1 ) )
),
Elements( Bar( X, Y( 2 ), Legend( 7 ) ), Line( X, Y( 1 ), Legend( 6 ) ) ),
SendToReport(
Dispatch(
{},
"height",
ScaleBox,
{Min( -0.268537964941355 ), Max( 71.08 ), Inc( 10 ), Minor Ticks( 0 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
7,
Properties( -1, {Marker( "Circle" )}, Item ID( "weight", 1 ) )
), Legend Model(
6,
Properties( 0, {Line Color( 23 )}, Item ID( "Mean(height)", 1 ) ),
Properties( -1, {Marker( "Circle" )}, Item ID( "height", 1 ) )
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {7, [1], 6, [0]} ), Position( {1, 0} )}
)
)
);