cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Choose Language Hide Translation Bar
UserID16644
Level V

How to combine multiple plots in 1 tab using JSL

Hi, I have two different plots and I would like to combine them in one tab on my journal.

 

dt=open("$SAMPLE_DATA/big class.jmp");

// Plot 1
biv = dt << Bivariate( invisible, Y( :height ), X( :weight ), By( :sex ) );

// Create the window, with the first tab
nw=New Window("Tabs", text box("here are the tabs"), tb = Tab Box((report(biv[1])[outlinebox(1)])<<get title ,report(biv[1])));

//Plot 2
biv2 = bivariate( x( :height ), y( :weight ), invisible );

tb << Append( "Plot 2", biv2 << Report); //what I currently do

 

My question is, how can I combine these two different plot in 1 tab? I am using JMP 15

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to combine multiple plots in 1 tab using JSL

Try the below JSL, it is one way to do what you want

txnelson_0-1705980617413.png

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Plot 1
biv = dt << Bivariate( invisible, Y( :height ), X( :weight ), By( :sex ) );
dis = Distribution( Continuous Distribution( invisible, Column( :height ) ) );

// Create the window, with the first tab
nw = New Window( "Tabs",
	Text Box( "here are the tabs" ),
	tb = Tab Box( (Report( biv[1] )[Outline Box( 1 )]) << get title, Report( biv[1] ) )
);

//Plot 2
biv2 = bivariate( x( :height ), y( :weight ), invisible );

tb << Append( "Plot 2", hlb = H List Box( biv2 << Report ) ); // Add an H List Box to the tab

hlb << append( dis << report );  // Append additional items to the H List Box
Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: How to combine multiple plots in 1 tab using JSL

Try the below JSL, it is one way to do what you want

txnelson_0-1705980617413.png

Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );

// Plot 1
biv = dt << Bivariate( invisible, Y( :height ), X( :weight ), By( :sex ) );
dis = Distribution( Continuous Distribution( invisible, Column( :height ) ) );

// Create the window, with the first tab
nw = New Window( "Tabs",
	Text Box( "here are the tabs" ),
	tb = Tab Box( (Report( biv[1] )[Outline Box( 1 )]) << get title, Report( biv[1] ) )
);

//Plot 2
biv2 = bivariate( x( :height ), y( :weight ), invisible );

tb << Append( "Plot 2", hlb = H List Box( biv2 << Report ) ); // Add an H List Box to the tab

hlb << append( dis << report );  // Append additional items to the H List Box
Jim