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
- :
- "make table of graphs like this"

- 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

Apr 23, 2018 2:18 AM
(3378 views)

Good morning

i would like to script this JMP function "make table of graphs like this" , order to save my picture directly into the associated JMP table.

someone can help me

Gianpaolo Polsinelli

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

This example does the work one-at-a-time because it looks like you might have some specific requirements about what data you want to keep.

```
dt = Open( "$sample_data/big class.jmp" );
picDt = New Table( "dist pics", New Column( "pics", Expression, "None", Set Values( {} ),Set Display Width( 250 ) ) );
ages = {14, 16, 17};
For( j = 1, j <= N Items( ages ), j++,
dt << Select Where( dt:age == ages[j] );
subsetDt = dt << subset( output table name( Char( ages[j] ) ) );
dist = subsetDt << Distribution(
Continuous Distribution( Column( subsetDt:weight ), Quantiles( 0 ), Summary Statistics( 0 ), Outlier Box Plot( 0 ) )
);
pic = (Report( dist )[Outline Box( "weight" )]) << getpicture;
dist << closewindow();
Close( subsetDt, "nosave" );
picDt << addrows( 1 );
picDt:pics[j] = pic;
);
picDt<<Set Cell Height( 100 );
```

Use JSL variables to keep track of the tables: dt, subsetDt, picDt. JSL often needs you to be specific about the table when there is more than one being used.

Craige

2 REPLIES 2

Highlighted
##

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

Re: "make table of graphs like this"

in oder to better undrstand the issue. i report part of my script:

```
// the entire loop scan a table and for each subchart create graph//
For( j = 1, j <= N Items( chart_title ), j++,
selectDT[1] << Select Where( :SPC_Chart == chart_title[j] );
display = selectDT[1] << subset( output table name( chart_title[j] ) );
display( j ) << Get name;
test_CTRL; // this is an expression that make some graphs
);
```

so, i would like caputure the graph created by test_CTRL and save it in a data table using make table of graphs like this

```
/*New Table( "Chart",
Add Rows( 1 ),
New Column( "P", Expression, "None", Set Values( {New Image( Char To Blob( a ), "png" )} ) ),
New Column( "Y", Character, "Nominal", Set Values( chart_title[j] ) )
)*/
);
```

Gianpaolo Polsinelli

Highlighted

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

This example does the work one-at-a-time because it looks like you might have some specific requirements about what data you want to keep.

```
dt = Open( "$sample_data/big class.jmp" );
picDt = New Table( "dist pics", New Column( "pics", Expression, "None", Set Values( {} ),Set Display Width( 250 ) ) );
ages = {14, 16, 17};
For( j = 1, j <= N Items( ages ), j++,
dt << Select Where( dt:age == ages[j] );
subsetDt = dt << subset( output table name( Char( ages[j] ) ) );
dist = subsetDt << Distribution(
Continuous Distribution( Column( subsetDt:weight ), Quantiles( 0 ), Summary Statistics( 0 ), Outlier Box Plot( 0 ) )
);
pic = (Report( dist )[Outline Box( "weight" )]) << getpicture;
dist << closewindow();
Close( subsetDt, "nosave" );
picDt << addrows( 1 );
picDt:pics[j] = pic;
);
picDt<<Set Cell Height( 100 );
```

Use JSL variables to keep track of the tables: dt, subsetDt, picDt. JSL often needs you to be specific about the table when there is more than one being used.

Craige