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

- JMP User Community
- :
- Discussions
- :
- How to have an horizontal layout when using a By variable with the graph builder...

- 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

Feb 4, 2020 8:55 AM
(1065 views)

Hello everybody!

I would like to know how to display graphs horizontally when using a By variable with the graph Builder?

Here is a small example script:

`Graph Builder(`

Size( 528, 456 ),

Show Control Panel( 0 ),

Variables( X( :weight ), Y( :height ) ),

Elements( Points( X, Y, Legend( 1 ) ), Smoother( X, Y, Legend( 2 ) ) ),

By( :sex )

)

I get the following result:

And I would like to get this:

Any idea of how we could do that?

Thanks in advance!

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

Try this approach:

```
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Side by Side",
Line Up Box( N Col( 2 ),
dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
By( :sex )
) )
);
```

Learn it once, use it forever!

2 REPLIES 2

Highlighted

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

Try this approach:

```
Names Default to Here( 1 );
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
New Window( "Side by Side",
Line Up Box( N Col( 2 ),
dt << Graph Builder(
Size( 534, 456 ),
Show Control Panel( 0 ),
Variables( X( :height ), Y( :weight ) ),
Elements( Points( X, Y, Legend( 3 ) ), Smoother( X, Y, Legend( 4 ) ) ),
By( :sex )
) )
);
```

Learn it once, use it forever!

Highlighted
##

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

Re: How to have an horizontal layout when using a By variable with the graph builder?

Thanks @markbailey that's exactly what I was looking for!!

Article Labels

There are no labels assigned to this post.