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

Combine bivariate plots from different table

Hi all,

 

 I wanted to combine two bivariate plots, from two different data table, on a journal and not on combine windows tab. Is it possible to have a format similar to fit group, but the plots will come from two different data table? please help

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: Combine bivariate plots from different table

This can be done easily both interactively and using JSL

Interactive

  1. Perform the key stroke,      Shift/CNTL/J  to open a new journal
  2. Right Click in the journal and select     Add Outline Item
    1. Enter the name Fit Group.........or give it whatever name you want
  3. Open data table Big Class from    Help=>Sample Data Library
  4. Open the Fit Y by X Platform       Analyze=>Fit Y by X
    1. Select Height as the Y Response column
    2. Select Weight as the X Factor column
    3. Click OK
  5. Go to the output display from the Fit Y by X     l
    1. Choose the Selection tool (the thick +) from the tool bar, or alternatively just press the S key.
    2. Drag it to the journal window, and position it under ne Fit Group outline boxtxnelson_0-1626258126734.png

       

    3. It will now be an element of the Fit Group outline box             txnelson_1-1626258214901.png

       

  6. To add the output from a different data table, open the Blood Pressure data table from       Help=>Sample Data Library
  7. Open the Fit Y by X Platform       Analyze=>Fit Y by X
    1. Select BP 8M as the Y Response column
    2. Select BP 12M as the X Factor column
    3. Click OK
  8. Go to the Blood Pressure output display from the Fit Y by X 
    1. Choose the Selection tool (the thick +) from the tool bar, or alternatively just press the S key.
    2. Drag the display to the Journal window and place it under the output from the previous Fit Y by X txnelson_2-1626258707895.png

       

The combined journal has been created

Below is a script that creates a similar output

names default to here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );

// Open Data Table: Blood Pressure.jmp
// → Data Table( "Blood Pressure" )
Open( "$SAMPLE_DATA/Blood Pressure.jmp" );

// Create a journal window
New Window( "My Fit Group",
	<<journal,
	Outline Box( "Fit Group", 

		// Launch platform: Bivariate
		data table("big class") << Bivariate( Y( :height ), X( :weight ) ), 

		// Launch platform: Bivariate
		data table("Blood Pressure") << Bivariate( Y( :BP 8M ), X( :BP 12M ) )
	)
);

The primary difference between the two combined windows, is that the way the script has been written, the Fit Y by X outputs are the primary output displays, which means they can have additional options selected, where in the cut and paste interactive version, the output displays are just copies of the display output.

 

Jim

View solution in original post

1 REPLY 1
txnelson
Super User

Re: Combine bivariate plots from different table

This can be done easily both interactively and using JSL

Interactive

  1. Perform the key stroke,      Shift/CNTL/J  to open a new journal
  2. Right Click in the journal and select     Add Outline Item
    1. Enter the name Fit Group.........or give it whatever name you want
  3. Open data table Big Class from    Help=>Sample Data Library
  4. Open the Fit Y by X Platform       Analyze=>Fit Y by X
    1. Select Height as the Y Response column
    2. Select Weight as the X Factor column
    3. Click OK
  5. Go to the output display from the Fit Y by X     l
    1. Choose the Selection tool (the thick +) from the tool bar, or alternatively just press the S key.
    2. Drag it to the journal window, and position it under ne Fit Group outline boxtxnelson_0-1626258126734.png

       

    3. It will now be an element of the Fit Group outline box             txnelson_1-1626258214901.png

       

  6. To add the output from a different data table, open the Blood Pressure data table from       Help=>Sample Data Library
  7. Open the Fit Y by X Platform       Analyze=>Fit Y by X
    1. Select BP 8M as the Y Response column
    2. Select BP 12M as the X Factor column
    3. Click OK
  8. Go to the Blood Pressure output display from the Fit Y by X 
    1. Choose the Selection tool (the thick +) from the tool bar, or alternatively just press the S key.
    2. Drag the display to the Journal window and place it under the output from the previous Fit Y by X txnelson_2-1626258707895.png

       

The combined journal has been created

Below is a script that creates a similar output

names default to here( 1 );

// Open Data Table: big class.jmp
// → Data Table( "big class" )
Open( "$SAMPLE_DATA/big class.jmp" );

// Open Data Table: Blood Pressure.jmp
// → Data Table( "Blood Pressure" )
Open( "$SAMPLE_DATA/Blood Pressure.jmp" );

// Create a journal window
New Window( "My Fit Group",
	<<journal,
	Outline Box( "Fit Group", 

		// Launch platform: Bivariate
		data table("big class") << Bivariate( Y( :height ), X( :weight ) ), 

		// Launch platform: Bivariate
		data table("Blood Pressure") << Bivariate( Y( :BP 8M ), X( :BP 12M ) )
	)
);

The primary difference between the two combined windows, is that the way the script has been written, the Fit Y by X outputs are the primary output displays, which means they can have additional options selected, where in the cut and paste interactive version, the output displays are just copies of the display output.

 

Jim