Subscribe Bookmark RSS Feed

JMP_12: Embedding a JSL expression directly into a row

chris_dennis

Community Trekker

Joined:

Nov 21, 2014

Looking for an example of how to do this. I have two table first is a summary table, second is a detail table with x-y coordinate to make maps one for each row of first table.  I would like to save the wafer maps in the form of a contour plot as a row element in the summary table.  Does anyone have an example of how to do this?  My ultimate goal will be to use a JSL script to pull the data make the plots and combine into a single data that I can do control charts or other items with and have easy access to the wafer map data images.

 

4 REPLIES
billw_jmp

Staff

Joined:

Jul 2, 2014

Hi Chris,

If  you save your contour map as an image (jpeg, png, gif....) you can then drag that image into a row cell as an expression data type.   First make a new column and change the column info data type to expression and then change the column properties to expression role.

If you want to save the script instead of the image then make the column properties "expression" instead of picture and copy the JSL into the row cell of choice.

To be sure the image is saved as JSL in the row.  Click on the image after you drag it into a cell and you will see the associated JSL.

chris_dennis

Community Trekker

Joined:

Nov 21, 2014

Bill,

I tried both methods and can get the maps into the table (also I switched to a map made with Graph Builder, easier to read). Attached summary table shows two maps. The drag method is not bad from a manual point.

What JSL command would be used to select a graph from one table and effectively drag it into a corresponding cell in the other table?

Thanks, Chris

billw_jmp

Staff

Joined:

Jul 2, 2014

Chris,

One thing you can do with Graph Builder is after you have made your graphs go to the Red Hot spot in the upper left and then select "Make Into Data Table"  This will give you a new "summary" table with the graph builder images embedded.  No need to drag and drop.

You can copy your images to another data table by right clicking and copy.  Just be sure that the column in the table you are copying to is set for Expression data type and the Expression Role in column properties.  Not sure on the JSL command to copy from one table to another.  Hopefully someone who can script will answer that for you.

Best,

Bill

Craige_Hales

Staff

Joined:

Mar 21, 2013

Here's some JSL to make a table, make a random image, put the image in the table, make another table, copy the image from the first table to the second.  The random image is 25 pixels tall and 50 pixels wide and filled with pixels that have random uniform R,G,B values.  The example demonstrates using the JSL variable with a table reference (table1, table2 below) to scope the variables on each side of the assignment. 

9732_random.PNG


table1 = New Table( "one",


  Add Rows( 1 ),


  New Column( "pic", Expression, Set Values( {Empty()} ) )


);


// make random image


d = J(25,50,rgbcolor(randomuniform(),randomuniform(),randomuniform()));


p = newimage(d);


// store in table1


table1:pic[1] = p;


// make a new table


table2 = New Table( "two",


  Add Rows( 1 ),


  New Column( "pic", Expression, Set Values( {Empty()} ) )


);


// put two copies in table 2, from table 1


table2:pic[1] = table1:pic[1];


table2<<addrow(1); // two was created with one row, add a second


table2:pic[2] = table1:pic[1];


write("done\!n");


Craige