Make histogram and box plot in graph builderIn the distribution platform you can add a box plot to the histogram (attached pic 1).
Pic 1Pic 1Pic 1
How can I make a similar plot in Graph Builder? The reason that I am asking is I want to overlay it with a categorical parameter.
I made those plots separately and attached them manually in Photoshop (see attached pic2).
Pic 2Pic 2Pic 2
If such thing can be done much easier and faster in Graph Builder, which is usually done with a dummy variable, please let me know (preferably without JSL coding!!)
Re: Make histogram and box plot in graph builderThanks very much!Re: Make histogram and box plot in graph builder@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=""></GRAPH>
Re: Make histogram and box plot in graph builderI don't know of an interactive way to do what you want in one instance of Graph Builder, but below is the "Start" of a simple script that may get you what you want.

names default to here(1);
dt=open("$SAMPLE_DATA/big class.jmp");
his = dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :height ), Overlay( :sex ) ),
Elements( Points( X, Legend( 2 ) ), Histogram( X, Legend( 3 ) ) ),
SendToReport(
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg( Hist Seg( 1 ), Bin Span( 24, 0 ) ),
DispatchSeg( Hist Seg( 2 ), Bin Span( 24, 0 ) )}
)
)
);
box = dt << Graph Builder(
Size( 495, 296 ),
Show Control Panel( 0 ),
Variables( X( :height ), Overlay( :sex ), Color( :sex ) ),
Elements( Box Plot( X, Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Box Plot Seg( "Box Plot (F)" ),
{Line Color( "Medium Dark Blue" ), Fill Color( "Medium Dark Blue" ),
Fill( 1 )}
), DispatchSeg(
Box Plot Seg( "Box Plot (M)" ),
{Line Color( "Medium Dark Red" ), Fill Color( "Medium Light Red" ),
Fill( 1 )}
)}
)
)
);
new window("Height", lub = lineupbox(n col(1)));
lub<<APPEND></APPEND>