Here is my attempt. It creates the needle chart transforming the Height and R values to match the range of the Weight and .25% of the r axis. The a FrameBox copy is done from one graph to the other;
names default to here(1);
// Open Data Table: big class.jmp
// → Data Table( "big class" )
dt = Open( "$SAMPLE_DATA/big class.jmp" );
dt << new column("r", set each value(Row()));
gb1 = dt << Graph Builder(invisible,
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables(
X( Transform Column( "r 2", Formula( :r * 0.25 ) ) ),
Y(
Transform Column(
"height 2",
Formula(
If( Row() == 1,
ytargetmax = Col Max( :weight );
ytargetmin = Col Min( :weight );
ytargetp = (ytargetmax - ytargetmin) / 100;
ymax = Col Max( :height );
ymin = Col Min( :height );
yrange = ymax - ymin;
);
yp = ((:height - ymin) / yrange) * 100;
ytargetmin + ytargetp * yp;
)
)
)
),
Elements(
Bar( X, Y, Legend( 5 ), Bar Style( "Needle" ), Response Axis( "X" ) )
)
);
gb2 = dt << Graph Builder(
Size( 528, 454 ),
Show Control Panel( 0 ),
Variables( X( :r ), Y( :weight ) ),
Elements( Line( X, Y, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"weight",
ScaleBox,
{Min( 60.8877083333333 ), Max( 178.48 ), Inc( 20 ), Minor Ticks( 0 )}
)
)
);
report(gb1)[framebox(1)]<<copy frame contents;
report(gb2)[framebox(1)]<< paste frame contents;
gb1<<close window;
Jim