turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Inaccurate Saved Script - Fit Group Arranged Rows

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 21, 2016 2:49 PM
(352 views)

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.

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:

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 21, 2016 4:14 PM
(249 views)

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 21, 2016 4:40 PM
(249 views)

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?

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Apr 21, 2016 4:52 PM
(249 views)

New Window( "Football - Bivariate"

V List Box(

Fit Group(

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

<<{Arrange in Rows( 2 )}

)));

Jim