@shasheminassab ,
Jim provided you with what you wanted. Below is an alternative view.
I am not a fan of vertical histograms, but you can create the view below fairly easily. The script follows. This is more of an FYI and to determine if the developers might know of a clever method to rotate the frame or create a layout for what you want directly with GraphBuilder.
names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
//Gender is a numeric column
dt << New Column( "Gender",
Numeric,
"Continuous",
Format( "Best", 12 ),
Formula( If( :sex == "F", 1, 2 ) ),
Value Labels( {1 = "F", 2 = "M"} ),
Use Value Labels( 1 )
);
//Counts is a constant column used a placed holder
dt << New Column( "Counts",
Numeric,
"Continuous",
Format( "Best", 12 ),
<< set Each Value(1)
);
gb = dt <<Graph Builder(
Size( 526, 454 ),
Show Control Panel( 0 ),
Variables(
X( :Counts ),
X( :Gender ),
Y( :height ),
Overlay( :sex ),
Color( :sex )
),
Elements( Position( 1, 1 ), Histogram( X, Y, Legend( 41 ) ) ),
Elements( Position( 2, 1 ), Box Plot( X, Y, Legend( 40 ) ) ),
SendToReport(
Dispatch(
{},
"Gender",
ScaleBox,
{Format( "Fixed Dec", 12, 0 ), Min( 0 ), Max( 2.5 ), Inc( 1 ),
Minor Ticks( 0 )}
),
Dispatch(
{},
"Y title",
TextEditBox,
{Rotate Text( "Right" ), Set Font Size( 12 ), Set Font Style( "Bold" )}
),
Dispatch(
{},
"Graph Builder",
FrameBox( 2 ),
{DispatchSeg(
Box Plot Seg( "Box Plot (F, 1)" ),
{Line Width( 2 ), Fill Color( {66, 112, 221} ), Fill( 1 ),
Transparency( 0.6 )}
), DispatchSeg(
Box Plot Seg( "Box Plot (M, 2)" ),
{Line Width( 2 ), Fill Color( {212, 73, 88} ), Fill( 1 ),
Transparency( 0.6 )}
)}
),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {41, [0, 1], 40, [-1, -1, -1, -1, -3, -3]} ),
Position( {0, 1, -1, -1, -1, -1, -3, -3} )}
)
)
);