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

- JMP User Community
- :
- Discussions
- :
- JSL script on graph builder box plot all column against wafer number

- 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

Aug 21, 2020 11:50 PM
(253 views)

Hello, I am trying to plot my data (multiple parameters) against the wafer number. I have found a script from the community for the distribution graph. Therefore, I have modified it by replacing Distribution function with Graph Builder function. However, only one graph was shown at the report instead of all the graphs. Can I have you advice on this script? Thank you.

```
dt = Current Data Table ();
// Get all of the continuous data columns
colNames = dt << get column names( string, continuous );
// Create the JSL to create the script
theExpr = "Graph Builder(
Size( 1414, 795 ),
Show Control Panel( 0 ),
Variables( X( :WF_NUM ), Y( colNames[1] ), Color( :WF_NUM ) ),
Elements( Box Plot( X, Y, Legend( 7 ) ) )
);
)";
For( i = 1, i <= N Items( colNames ), i++,
theExpr = theExpr || ", Graph Builder(
Size( 1414, 795 ),
Show Control Panel( 0 ),
Variables( X( :WF_NUM ), Y(colNames[" || Char( i ) || "] ), Color( :WF_NUM ) ),
Elements( Box Plot( X, Y, Legend( 7 ) ) )
)");
// place the closing ")" to complete the command string
theExpr = theExpr || ");";
// Run the created JSL
Eval(Parse(theExpr));
```

Thank you for your help.

Dominic

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

Created:
Aug 22, 2020 4:10 AM
| Last Modified: Aug 24, 2020 4:57 AM
(233 views)
| Posted in reply to message from chungman89 08-22-2020

The JSL you provided can be simplified to produce the charts you want. Below is a modification of your code

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Change the name of the Wafer column to match the name used
// in the Graph Builder code
dt:wafer << set name( "WF_NUM" );
```

colNames = dt << get column names( string, continuous );
// Since there are 128 columns that could be plotted, the code has been
// modified to just produce 3 of the plots. The commented out code
// should replace the "i <= 3, i++," to plot all graphs
For( i = 1, i <= 3, i++, // N Items( colNames ), i++,
dt << Graph Builder(
Size( 1414, 795 ),
Show Control Panel( 0 ),
Variables(
X( :WF_NUM ),
Y( As Column( dt, colNames[i] ) ),
Color( :WF_NUM )
),
Elements( Box Plot( X, Y, Legend( 7 ) ) )
)
);

Jim

4 REPLIES 4

Highlighted

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

Created:
Aug 22, 2020 4:10 AM
| Last Modified: Aug 24, 2020 4:57 AM
(234 views)
| Posted in reply to message from chungman89 08-22-2020

The JSL you provided can be simplified to produce the charts you want. Below is a modification of your code

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Change the name of the Wafer column to match the name used
// in the Graph Builder code
dt:wafer << set name( "WF_NUM" );
```

colNames = dt << get column names( string, continuous );
// Since there are 128 columns that could be plotted, the code has been
// modified to just produce 3 of the plots. The commented out code
// should replace the "i <= 3, i++," to plot all graphs
For( i = 1, i <= 3, i++, // N Items( colNames ), i++,
dt << Graph Builder(
Size( 1414, 795 ),
Show Control Panel( 0 ),
Variables(
X( :WF_NUM ),
Y( As Column( dt, colNames[i] ) ),
Color( :WF_NUM )
),
Elements( Box Plot( X, Y, Legend( 7 ) ) )
)
);

Jim

Highlighted
##

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

Re: JSL script on graph builder box plot all column against wafer number

Hello @txnelson ,

Thank you for your reply.

The graphs were plotted with your modified code. One extra question regarding the modified codes. When I was using the reference code from the community for distribution graphs, all the graphs were summarised into a single report which make it easy to export to powerpoint. May I ask what extra lines are needed for the code you have simplified to summarised graphs into a single report?

Thank you for your help.

Dominic

Highlighted
##

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

Re: JSL script on graph builder box plot all column against wafer number

All that needs to be done is to place the graph generations inside a New Window() function.

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA/semiconductor capability.jmp" );
// Change the name of the Wafer column to match the name used
// in the Graph Builder code
dt:wafer << set name( "WF_NUM" );
colNames = dt << get column names( string, continuous );
nw = New Window( "Graphs",
// Since there are 128 columns that could be plotted, the code has been
// modified to just produce 3 of the plots. The commented out code
// should replace the "i <= 3, i++," to plot all graphs
For( i = 1, i <= 3, i++, // N Items( colNames ), i++,
dt << Graph Builder(
Size( 1414, 795 ),
Show Control Panel( 0 ),
Variables(
X( :WF_NUM ),
Y( As Column( dt, colNames[i] ) ),
Color( :WF_NUM )
),
Elements( Box Plot( X, Y, Legend( 7 ) ) )
),
);
);
```

Jim

Highlighted
##

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

Re: JSL script on graph builder box plot all column against wafer number