Subscribe Bookmark RSS Feed

Inaccurate Saved Script - Fit Group Arranged Rows

wlancaster1

Community Trekker

Joined:

Apr 21, 2016

Hi all.

I am trying to script a bivariate report, with fit groups arranged in rows of 2.

Below is what the report looks like after manually creating it, using the football sample data.

11377_JMP football example.PNG

Here is the script obtained when clicking on the red arrow for one fit group and selecting "save script for all objects"

New Window( "Football - Bivariate",

  V List Box(

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "db" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "db" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "db" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "dl" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "dl" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "dl" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "fb" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "fb" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "fb" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "hb" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "hb" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "hb" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ib" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ib" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "ib" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ki" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ki" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "ki" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ob" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ob" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "ob" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "ol" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "ol" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "ol" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "qb" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "qb" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "qb" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "te" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "te" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "te" )

  ),

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ), Where( :Position == "wr" ) ),

  Bivariate( Y( :Weight ), X( :Fat ), Where( :Position == "wr" ) ),

  <<{Arrange in Rows( 2 )},

  Where( :Position == "wr" )

  )

  )

);

And finally, here is what the result looks like:

11390_JMP football example 2.PNG

I'm not sure why this is happening. Why is the saved script not accurate to what it was saved from?

Why is the "position" grouping appearing outside of the"fit group" box?

Why is the next fit group placed adjacent to that text box, instead of below it?

How would one fix this, or write an actual script to replicate the first picture?

Thanks

3 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

Change the script to:

New Window( "Football - Bivariate",

  V List Box(

  Fit Group(

  Bivariate( Y( :Height ), X( :Fat ),by(:Position)  ),

  Bivariate( Y( :Weight ), X( :Fat ), by(:Position))

  <<{Arrange in Rows( 2 )}

  )));

Jim
wlancaster1

Community Trekker

Joined:

Apr 21, 2016

Thanks for the response!

This almost gets what I want - but now it shows all the height plots (two by two) followed by all the weight plots.

Can it be scripted so that the height/weight plots are side by side, grouped by position? And if a height/weight plot is missing, it just shows one plot and a blank area?

txnelson

Super User

Joined:

Jun 22, 2012

 

New Window( "Football - Bivariate"

  V List Box(

    Fit Group( 

  Bivariate( Y( :Height, :Weight ), X( :Fat ),by(:Position)  ),

  <<{Arrange in Rows( 2 )}

  )));

 

Jim