<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />Hello,
I am wondering if there is a way to add histogram borders to the Contour Plot platform or even within GraphBuilder?
It is a very useful feature within Fit Y by X and was wondering if it is possible or if it has been done before.
Given JSL is fairly flexible I thought it might be do-able but I haven't quite scoped it out.
Thank you,
JP
Use copy and paste frame contents
Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( height ), x( weight ) , Histogram Borders( 1 ));
cont=Graph Builder(
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements(
Contour( X, Y, Legend( 4 ), Number of Levels( 0 ) ),
Points( X, Y, Legend( 5 ) )
)
);
rbiv = biv << report;
rcont=cont<
rcont[framebox(1)]<< copy frame contents;
rbiv[framebox(3)]<
cont<

You can do this interactively as well. Create the contour plot , then right click >Edit>Copy Frame Contents.
Then create the bivariate plot with histogram borders, right-click on that and Edit>Paste Frame Contents.
Beauty of this is the axes and frame sizes all adjust automatically,
Another approach isn't so sweet. The code below is incomplete because the axis on both plots should be equal to each other. Demonstates the principal though. (The Wait commands I found were needed to avoid crashing with an exception)
Open( "$ENGLISH_SAMPLE_DATA/Big Class.jmp" );
biv = bivariate( y( height ), x( weight ) , Histogram Borders( 1 ));
cont=Graph Builder(
Size( 308, 270 ),
Show Control Panel( 0 ),
Variables( X( :weight ), Y( :height ) ),
Elements(
Contour( X, Y, Legend( 4 ), Number of Levels( 0 ) ),
Points( X, Y, Legend( 5 ) )
)
);
rbiv = biv << report;
rcont=cont<
wait(.1);
rbiv[framebox(3)]<< sib append(rcont[framebox(1)]);
wait(.1);
rbiv[framebox(3)]<Re: Adding histogram borders to Contour Plot
You should be able to do what you want (but you still require JSL). Here's a toy example:
dt = Open("$SAMPLE_DATA/Car Physical Data.jmp");
// Contour plot object
cp = dt << Contour Plot(X( :Weight, :Horsepower ), Y( :Turning Circle ));
// Contour plot report layer
cpRep = Report(cp);
// See the structure of the display tree to learn how to modify it
// cpRep << ShowTreeStructure;
// Prepand a new display box to an existing element . . .
Wait(3);
cpRep[ListBox(2)] << Prepend(GraphBox());
// Appand a new display box to an existing element . . .
Wait(3);
cpRep[ListBox(2)] << Append(TextBox("Hello World ... ", << FontColor("Green")));
Thanks LouV. This is a nice solution.
I guess, I was wondering if there was a way to add panels/frames within a platform without using ApplicationBuilder to combine them using JSL.
I used Application Builder and obtained this view combining Graph Builder and Histograms to mimic what I think you were referring to in the Fit Y by X platform.
