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

- JMP User Community
- :
- Discussions
- :
- Rearranging two platforms created with BY

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

Highlighted

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

Jun 23, 2020 4:35 AM
(641 views)

Hello,

Please see the image.

Left side is the regular sequence if I add Distribution with BY and then Variability with BY to a window.

Is there some way to get the sequence as is in the right side?

The solution have to be in JSL and without looping but with using BY option.

Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

Highlighted

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

Here is the script, rewritten to make the Platforms Live

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Summarize( dt, groupBy = by( :sex ) );
NW = New Window( "The Output", vlb = V List Box() );
For( i = 1, i <= N Items( groupBy ), i++,
vlb << append(
Eval(
Substitute(
Expr(
dis =
Distribution(
Continuous Distribution(
Column( :height ),
Quantiles( 0 ),
Summary Statistics(
0
),
Horizontal Layout( 1 ),
Vertical( 0 )
),
where( :sex == __where__ )
);
var =
Variability Chart(
Y( :height ),
X( :age ),
Std Dev Chart( 0 ),
where( :sex == __where__ )
);
),
Expr( __where__ ), groupBy[i]
)
)
)
);
```

Jim

3 REPLIES 3

Highlighted
##

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

Re: Rearranging two platforms created with BY

Here is a very simple script, showing one way to do this

```
names default to here(1);
dt = open("$SAMPLE_DATA/big class.jmp");
dis = Distribution(
Continuous Distribution(invisible,
Column( :height ),
Quantiles( 0 ),
Summary Statistics( 0 ),
Horizontal Layout( 1 ),
Vertical( 0 )
),
by( :sex )
);
var = Variability Chart(invisible,
Y( :height ),
X( :age ),
Std Dev Chart( 0 ),
by(:sex)
);
new window("together",
vlb=vlistbox()
);
vlb << append(report(dis[1])[OutlineBox(1)]);
vlb << append(report(var[1])[OutlineBox(1)]);
vlb << append(report(dis[2])[OutlineBox(1)]);
vlb << append(report(var[1])[OutlineBox(1)]);
var << close window;
dis << close window;
```

Jim

Highlighted
##

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

Re: Rearranging two platforms created with BY

Thank you Jim.

1. I need the graphs "alive", not reports only.

2. If I have many groups, I need loop. I am looking for solution without looping.

Something during creation of the platforms may be...

Highlighted

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

Here is the script, rewritten to make the Platforms Live

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/big class.jmp" );
Summarize( dt, groupBy = by( :sex ) );
NW = New Window( "The Output", vlb = V List Box() );
For( i = 1, i <= N Items( groupBy ), i++,
vlb << append(
Eval(
Substitute(
Expr(
dis =
Distribution(
Continuous Distribution(
Column( :height ),
Quantiles( 0 ),
Summary Statistics(
0
),
Horizontal Layout( 1 ),
Vertical( 0 )
),
where( :sex == __where__ )
);
var =
Variability Chart(
Y( :height ),
X( :age ),
Std Dev Chart( 0 ),
where( :sex == __where__ )
);
),
Expr( __where__ ), groupBy[i]
)
)
)
);
```

Jim