Subscribe Bookmark RSS Feed

add Row Legend to Control Chart Builder output?

jmpbeginner

Community Trekker

Joined:

Sep 11, 2013

is this possible?

I have an IR chart that was created via Analyze>Quality and Process>Control Charts>IR

that uses the "Row Legend" option (right click on control chart, select row legend, then select variable to color data points by).

     example: section "Change Marker Shape or Colors Based On Values" at the following link:  Use Markers

I would like to switch to using Control Chart Builder (for various reasons) to generate this IR chart, but do not see a way to add a row legend? is this not supported yet or did it find a new home away from the right click menu?

thanks in advance for any help!

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

You can request a window with a legend to be generated when you do a Color or Mark by Column

10776_pastedImage_0.png

10778_pastedImage_2.png

You can then place both outputs into a JMP Journal, and move the legend to the location in the journal that you want it to be

10779_pastedImage_3.png

You can do a File==>New==>Journal to create the empty journal, and then go to your Control Chart Builder output, click on it to make it the active window and then Cntl + J to move it to the journal.  Repeat the same with the Legend.  Once that is complete, go to the tool bar in the journal window, and choose the "selection tool".  Click on the legend in the journal, and while holding down the mouse button, drag it to where you want it to be displayed.

Jim
6 REPLIES
txnelson

Super User

Joined:

Jun 22, 2012

The Control Chart Builder will use the RowState color to color the data points for an IR chart.  It does not appear that there is a rt. mouse click option to set the marker colors, however, you can go directly to the data table, and change the RowState color and it will be changed in the Control Chart.

10773_pastedImage_1.pngs

10775_pastedImage_3.png

To change the rowstate colors, you can either right click on the individual rows, in the rowstate area, and select the color you want, or you can go to the lower portion of the area above the rowstate column and seleck Color or Mark by Column, and you will get similar selections that you would get in the Row Legend you used before.

Jim
jmpbeginner

Community Trekker

Joined:

Sep 11, 2013

Thanks Jim! I did not know I could assign row states by column, very useful.

Is there anyway to generate the Legend on the control chart builder output? when I have 30 different colors, it's nice to reference which color relates to which batchRun

Solution

You can request a window with a legend to be generated when you do a Color or Mark by Column

10776_pastedImage_0.png

10778_pastedImage_2.png

You can then place both outputs into a JMP Journal, and move the legend to the location in the journal that you want it to be

10779_pastedImage_3.png

You can do a File==>New==>Journal to create the empty journal, and then go to your Control Chart Builder output, click on it to make it the active window and then Cntl + J to move it to the journal.  Repeat the same with the Legend.  Once that is complete, go to the tool bar in the journal window, and choose the "selection tool".  Click on the legend in the journal, and while holding down the mouse button, drag it to where you want it to be displayed.

Jim
jmpbeginner

Community Trekker

Joined:

Sep 11, 2013

follow up question:

can i add the legend to a V List Box instead of a JMP journal

My script creates a new window using New Window(V List Box( ) );

and appends Control Chart Builder along with multiple  Button Boxes.  I'd like to add the legend to this window using JSL.  Is that possible?

thanks in advance!

txnelson

Super User

Joined:

Jun 22, 2012

Here is a simple example of appending a legend window to a V List Box

Names Default To Here( 1 );

 

dt = Open( "$SAMPLE_DATA\Semiconductor Capability.jmp" );

 

// Create the color pattern and legend window

TheLegend = dt << color or mark by column( :Lot_id, make window with legend );

 

// Create the window with the V List Box in it

NW = New Window( "legend example", myVLB = V List Box( Bivariate( Y( :NPN1 ), X( :PNP1 ) ) ) );

 

// Append the legend window to the VLB

myVLB << append( TheLegend );

 

// Delete the independent Legend Window

TheLegend << close window;

 

Jim
ian_jmp

Staff

Joined:

Jun 23, 2011

Here's some very old code that is an alternative, but probably not better, approach to Jim's:

NamesDefaultToHere(1);

//**********************************************************************************

// Function to build a display box containing colours and legends

//**********************************************************************************

colorKeyDB =

Function( {colorList, legendList},

{Default Local},

db = Panel Box( "Row State Colors" );

For( i = 1, i <= N Items( colorList ), i++,

tb = Text Box( "███" ||"   "||legendList );

tb << fontcolor( RGB Color( Color To RGB( colorList ) ) );

db << Append( tb );

);

db;

);

// Data Table with row state colours

dt1 = Open("$SAMPLE_DATA/Semiconductor Capability.jmp");

col = Column(dt1, "lot_id");

dt1 << colorByColumn(col);

// Use an invisible summary table to get unique values (row state colours are carried over)

dt2 = dt1 << Summary( Group( col ), Invisible );

// Get the lists for the function "colorKeyDB"

cList = {};

lList = {};

For(r=1, r<=NRow(dt2), r++,

Row() = r;

colorCode = Color Of( Row State( Row() ) );

Insert Into( cList, colorCode );

Insert Into( lList, Char( Column( dt2, "lot_id" )[Row()] ) );

);

Close(dt2, NoSave);

// Put the legend in a window

nw = New Window( "Colour Legend", HListBox(colorKeyDB(cList, lList ), ButtonBox("OK", nw << closeWindow)) );