Hi JMP community,
I just ran into a slightly frustrating issue with Graph Builder:
I have almost what I want (see below) but the Violon plots are aligned left for the first group, middle for the second group, and right for the last group. Any trick to get this odd behavior corrected (i.e. all Violin plots aligned to the middle?)
Note: If I do not use LEAD TAG as an Overly variable, I can align the Violin plots correctly but then I have a a problem with the Line: linked across LEAD TAG groups (see below).
Any suggestions would be highly appreciated.
Thanks
TS
This misalignment of points and other graph builder elements has been documented previously. I think there was agreement that the easiest method was to live without the violin plots being colored, otherwise customize the contour violins. Here is a script for Big Class.
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
gb = dt << Graph Builder(
show control panel(0),
Variables( X( :age ), X( :sex, Position( 1 ) ), Y( :height ), Color( :age ) ),
Elements(
Points( X( 1 ), X( 2 ), Y, Legend( 6 ) ),
Contour( X( 1 ), X( 2 ), Y, Legend( 7 ) )
),
SendToReport(
Dispatch( {}, "age", ScaleBox, {Label Row( 2, Show Major Grid( 1 ) )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Poly Seg( "Violin (13>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Red" )}
), DispatchSeg(
Poly Seg( "Violin (13>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Red" )}
), DispatchSeg(
Poly Seg( "Violin (14>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Green" )}
), DispatchSeg(
Poly Seg( "Violin (14>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Green" )}
), DispatchSeg(
Poly Seg( "Violin (15>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Purple" )}
), DispatchSeg(
Poly Seg( "Violin (15>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Purple" )}
), DispatchSeg(
Poly Seg( "Violin (16>>F)" ),
{Transparency( 0.4 ), Fill Color( "Orange" )}
), DispatchSeg(
Poly Seg( "Violin (17>>M)" ),
{Transparency( 0.4 ), Fill Color( "BlueCyan" )}
)}
)
)
);
This misalignment of points and other graph builder elements has been documented previously. I think there was agreement that the easiest method was to live without the violin plots being colored, otherwise customize the contour violins. Here is a script for Big Class.
Names Default to Here(1);
dt = Open("$Sample_Data/Big Class.jmp");
gb = dt << Graph Builder(
show control panel(0),
Variables( X( :age ), X( :sex, Position( 1 ) ), Y( :height ), Color( :age ) ),
Elements(
Points( X( 1 ), X( 2 ), Y, Legend( 6 ) ),
Contour( X( 1 ), X( 2 ), Y, Legend( 7 ) )
),
SendToReport(
Dispatch( {}, "age", ScaleBox, {Label Row( 2, Show Major Grid( 1 ) )} ),
Dispatch(
{},
"Graph Builder",
FrameBox,
{DispatchSeg(
Poly Seg( "Violin (13>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Red" )}
), DispatchSeg(
Poly Seg( "Violin (13>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Red" )}
), DispatchSeg(
Poly Seg( "Violin (14>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Green" )}
), DispatchSeg(
Poly Seg( "Violin (14>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Green" )}
), DispatchSeg(
Poly Seg( "Violin (15>>F)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Purple" )}
), DispatchSeg(
Poly Seg( "Violin (15>>M)" ),
{Transparency( 0.4 ), Fill Color( "Medium Dark Purple" )}
), DispatchSeg(
Poly Seg( "Violin (16>>F)" ),
{Transparency( 0.4 ), Fill Color( "Orange" )}
), DispatchSeg(
Poly Seg( "Violin (17>>M)" ),
{Transparency( 0.4 ), Fill Color( "BlueCyan" )}
)}
)
)
);