Full disclosure - I'm a bigger fan of the older graph plotting routines in JSL than Graph Builder but I'm making some honest attempts to switch.
I'm running into a problem where I'm dynamically adding graphs to a Journal and I'm trying to very tightly control the graph sizes so axes and values line up horizontally. I'm building an H List Box in JSL with several items, sending that H List Box to the Journal, and then doing the same thing on another parameter. However, when I use Graph Builder, the Size attributes appear to be completely ignored and all GraphBuilders end up in what appears to be 300x300px. When I build the graphs via other graphing routes (variability plots, control chart, overlay plot), this just doesn't happen. It works.
I tried going about this a different way and made some test code to do the exact same addition of the H List Box to a new window instead of the Journal and everything works as expected. See the image below with the incorrect Journal output on left and the correct "New Window" output on right. Anyone know what's going on here with the Journal and what steps need to be taken to mitigate?
Windows JMP 14.2
Example test code using Big Class example data table.
//Uses BigClass example data
// Create array of parameters
ParameterArray = {"height", "weight"};
numbatches = nrows(Current Data Table());
wind = New Window( "Example");
// Loop through parameters
for (i = 1, i <= N Items(ParameterArray),i++,
ColName = ParameterArray[i];
// Create charts
xBox = H List Box ();
xBox << append( gbbp = Graph Builder(
Size( 150, 300 ),
Show Control Panel( 0 ),
Variables( Y( Column( ColName ) ), Overlay( :sex ) ),
Elements( Box Plot( Y, Legend( 2 ) ) ),
SendToReport(
Dispatch(
{},
ColName,
ScaleBox,
{Label Row( {Major Grid Line Color( -14277081 ), Show Major Grid( 1 )} )
}
),
Dispatch( {}, "400", LegendBox, {Set Title( "" )} )
)
);
);
xBox << append( gb = Graph Builder(
Size( 900, 300 ),
Show Control Panel( 0 ),
Legend Position( "Inside Left" ),
Variables( X( :age ), Y( Column( ColName ) ), Overlay( :sex ) ),
Elements( Line( X, Y, Legend( 32 ) ) ),
SendToReport(
Dispatch(
{},
"Graph Builder",
OutlineBox,
{Set Title( ColName || " Chart" )}
),
Dispatch(
{},
"graph title",
TextEditBox,
{Set Text( ColName || " Chart" )}
),
Dispatch( {}, "400", LegendBox, {Sides( "Left" )} )
)
);
);
// Save to journal
xBox << journal;
wind << append(xBox);
);