在做一些研究来回答这个问题时,我在 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} )}
)
)
);