can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedcan we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interested?
I tried below jsl but it only works when you plot the data in graphs but not in the table itself?
Thanks in advance!
Evan
dt=Data Table( "Bin Wafer Map" );
For(i=4, i<=N col(dt),i++,
dt:i << Set Property(
"Value Colors",
{1=Green,3 = Red, 4 = Yellow,5=orange, 6 = Magenta, 7 =Blue,8 = Cyan,9=BlueCyan}
));
ScriptingRe: can we color the cells in jmp table as we do in excel? I mean really give colors to the part ofFor a JMP table the selection color is controlled by the Windows selection color. Here's how to do it under windows 7: https://answers.microsoft.com/en-us/windows/forum/windows_7-desktop/how-to-change-windows-7-highlight-color-select/99d962c8-7413-4e20-b209-8951f9eab95f
Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part ofHi is there a way to color selected cells? I have a hew hundred cells that are selected and I would like to give a color to stand out.
Thanks
Sam
Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part ofThanks a lot Ian! Nice work!Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part ofI guess you need another loop to take care of the columns. Something like:
dt = Data Table( "Bin Wafer Map" );
// Loop over columns . . .
For(c = 1, c<=8, c++,
// Loop over rows . . .
For( i = 1, i <= N Row( dt ), i++,
If( Column( dt, c )[i] > 0,
Column( dt, c ) << Color Cells( 4, {i} ),
)
);
);Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part ofHi! Found this topic is very helpful on my color cell function. However i have some concern. By using same table I only want to color cell values from columns 1 ~8 which contains > 0. Below code works on column 1 but I want to loop it through other columns 2~7. Can you help me on this? Thanks!
dt = Data Table( "Bin Wafer Map" );
For( i = 1, i <= N Row( dt ), i++,
If( Column( dt, "1" )[i] > 0, Column( dt, "1" ) << Color Cells( 4, {i} ),
)
);Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interested<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />My code excludes the empty cells with the ! is missing() check. I only get the X's for empty cells when I use a Value Gradient.
Your code is failing because that method expects a column, not a cell. Again I strongly recommend that you change j to k or something because j is a function in JSL.
I realized that the color cell by value method only needs to be called once per column, so I took it out of the k loop.
color_list = {"Green", "Red", "Yellow", "Purple", "Orange", "Magenta", "Blue", "Cyan", "BlueCyan"};
dt = Data Table( "Bin Wafer Map" );
For( i = 4, i <= N Col( dt ), i++,
dt:i << color cell by value( 1 );
For( k =1, k <=N Row( dt ), k++,
one_value = dt:i[k];
if (! is missing(one_value),
dt:i << color cells(color_list[one_value], {k});
);
);
);
Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedthanks, P!
your script is much simpler but it is not able to exclude the empty cells(showing X)
my script trying to send color cell by value to a cell, which works but giving below error. Do you know what the error tells us and how to debug it?
PS: I tried use below script to add a empty row btw each wafer but it might calls a infinite loop:(, never worked.
For(a=0, a<(N Row(dt))/11,a++,
dt<<ADD rows=""></ADD>
Thanks a gain.

Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedThis code is a bit simpler. Note that I'm using k for a looping variable instead of j; j is a function in JSL.
color_list = {"Green", "Red", "Yellow", "Purple", "Orange", "Magenta", "Blue", "Cyan", "BlueCyan"};
dt = Data Table( "Bin Wafer Map" );
For( i = 4, i <= N Col( dt ), i++,
For( k = 1, k <= N Row( dt ), k++,
one_value = dt:i[k];
if (! is missing(one_value),
dt:i << color cells(color_list[one_value], {k});
dt:i << color cell by value( 1 );
);
);
);
Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedfinally I got it to color only non-empty cells with desired colors. but there is still an error though the script is executable.
=Data Table( "Bin Wafer Map" );
(i=4, i<=N col(dt),i++,
(j=1, j<=N Row(dt),j++,
if(dt:i[j]==1,dt:i << Color Cells(Green,{j}),
if(dt:i[j]==3,dt:i << Color Cells(Red,{j}),
if(dt:i[j]==4,dt:i << Color Cells(Yellow,{j}),
if(dt:i[j]==5,dt:i << Color Cells(Orange,{j}),
if(dt:i[j]==6,dt:i << Color Cells(Magenta,{j}),
if(dt:i[j]==7,dt:i << Color Cells(Blue,{j}),
if(dt:i[j]==8,dt:i << Color Cells(Cyan,{j}),
if(dt:i[j]==9,dt:i << Color Cells(BlueCyan,{j}),
))))));
(i=4, i<=N col(dt),i++,
(j=1, j<=N Row(dt),j++,
(!zero or missing(dt:i[j]),dt:i[j]<<COLOR cell="" by="" value=""></COLOR>

Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedthanks Jeff and PMroz.
I got the hint and was able to get my wafer map colored by Bin(value). I did not know the color by cell value is off by default. Have not figure out how to tell jmp do nothing if the cell value is empty.
=Data Table( "Bin Wafer Map" );
For(i=4, i<=N col(dt),i++,
:i << Set Property(
"Value Colors",
1=Green,3 = Red, 4 = Yellow,5=orange, 6 = Magenta, 7 =Blue
,8 = Cyan,9=BlueCyan,.=white}
<<COLOR cell="" by="" value=""></COLOR>

Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedYou can apply a value gradient using JSL in the following manner. Note that to use dynamically calculated values of min, max and average I had to build a string and execute it with eval(parse()).
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
dtcol = column(dt, "weight");
one_min = col min(dtcol);
one_max = col max(dtcol);
one_avg = col mean(dtcol);
gradient_expr = evalinsert("\[
dtcol << Set Property( "Color Gradient",
{"Jet", Range(^one_min^, ^one_max^, ^one_avg^)});
dtcol << color cell by value(1);
]\");
eval(parse(gradient_expr));
Re: can we color the cells in jmp table as we do in excel? I mean really give colors to the part of table/cells interestedIn JMP 9 and beyond try right clicking on a cell in a data table and you'll get a menu that will let you color the cell.

In JSL you can use the Color Cell() message:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
column(dt, âAgeâ) << Color Cells( {5, {15}} );
or the Color Cell by Value() message:
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
:Age <<
Set Property(
"Value Colors",
{12 = -13977430, 13 = -3780930, 14 = -
4157407, 15 = -13596965, 16 = -2210961, 17
= -10562523}
);
Wait( 1 );
:Age << Color Cell by Value( 1 );