Graph Builder histogram + contour misalignmentI have used the following code to create the following image in JMP Graph Builder.
Graph Builder(
Size( 1106, 867 ),
Legend Position( "Bottom" ),
Variables(
Y( :count_traditional ),
Y( :count_flat_probabilistic, Position( 1 ) ),
Y( :count_increasing_probabilistic, Position( 1 ) )
),
Elements(
Histogram( Y( 1 ), Y( 2 ), Y( 3 ), Legend( 3 ) ),
Contour( Y( 1 ), Y( 2 ), Y( 3 ), Legend( 11 ) )
),
SendToReport(
Dispatch(
{},
"count_traditional",
ScaleBox,
{Min( 0 ), Max( 20.5 ), Inc( 1 ), Minor Ticks( 1 ),
Label Row( Show Major Grid( 1 ) )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model(
3,
Level Name( 0, "Traditional" ),
Level Name( 1, "Probabilistic (Flat)" ),
Level Name( 2, "Probabilistic (Increasing)" ),
Properties( 0, {Line Color( 3 ), Fill Color( 3 )} ),
Properties( 1, {Line Color( 5 ), Fill Color( 5 )} ),
Properties( 2, {Line Color( 4 ), Fill Color( 4 )} )
), Legend Model(
11,
Properties( 0, {Fill Color( 67 )} ),
Properties( 1, {Fill Color( 69 )} )
)}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Number of Visits" )} ),
Dispatch(
{},
"400",
LegendBox,
{Legend Position( {3, [0, 1, 2], 11, [-1, -1, -1]} ),
Position( {0, 1, 2, -1, -1, -1} )}
)
)
)

Question: How do I get the first and third contour to be in the middle of their respective box?
Thanks,
Adrian
Mass CustomizationQuality and Process EngineeringRe: Graph Builder histogram + contour misalignmentThanks, Thierry! I do not see that option in my version of JMP (13.1) so I guess it's time for me to update my software.
Re: Graph Builder histogram + contour misalignmentHi Adrian,
Here is a screenshot of the location of the Overlay option for the Contour in GB

Best,
TS
Re: Graph Builder histogram + contour misalignmentThank you, Thierry.
Here's my figure after your Step 3: It's looking good.

Here's my figure after your Step 4: Something has gone wrong.

I do not understand where I can deselect Overlay? I manually tried in the script but it did not change the figure copied above:
Graph Builder(
Size( 1022, 842 ),
Variables( Y( :Data ), Group X( :Program ), Overlay( :Program ) ),
Elements( Histogram( Y, Legend( 4 ) ), Contour( Y, Overlay( 0 ), Legend( 5 ) ) ),
SendToReport(
Dispatch(
{},
"Data",
ScaleBox,
{Min( -0.5 ), Max( 20.5 ), Inc( 1 ), Minor Ticks( 1 )}
),
Dispatch(
{},
"400",
ScaleBox,
{Legend Model( 4, Properties( 0, {Line Color( 0 ), Fill Color( 0 )} ) ),
Legend Model( 5, Properties( 0, {Fill Color( 1 )} ) )}
),
Dispatch( {}, "graph title", TextEditBox, {Set Text( "" )} ),
Dispatch( {}, "Y title", TextEditBox, {Set Text( "Number of Visits" )} )
)
)Cheers,
Adrian
Re: Graph Builder histogram + contour misalignmentHi Adrian,
I could not find a practical means to resolve your exact problem which seems to be a bug, but I came very close of a possible workaround:
- Stack your 3 Y columns (I rename the Data as COUNTS)
- In GB, use the label column as Group X
- Drag the Data to the Y axis box and select Histogram and Violin plots
- Drag the Label column to the Overlay box (I only use the Column 1 - 3 for this example)
- In the Contour menu deselect Overlay
You'll get something like this:

The script for this is as follows:
Graph Builder(
Variables( Y( :COUNTS ), Group X( :Label ), Overlay( :Label ) ),
Elements( Histogram( Y, Legend( 5 ) ), Contour( Y, Overlay( 0 ), Legend( 6 ) ) ),
SendToReport( Dispatch( {}, "", ScaleBox( 2 ), {Select} ) )
)
It is not perfect but it might do the trick.
Best,
Thierry