cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
JMP is taking Discovery online, April 16 and 18. Register today and join us for interactive sessions featuring popular presentation topics, networking, and discussions with the experts.
Choose Language Hide Translation Bar
lwx228
Level VIII

How to use JSL to color local cells by value?

For example, in the "weight" column of "Big class.jMP ", take the data in rows 1-10 and make the gradient color by data height, as in the Image.So can start and stop any color  want.

 

2020-07-05_21-55.png

26 REPLIES 26
lwx228
Level VIII

Re: How to use JSL to color local cells by value?

  • The same is true with other versions.2020-07-08_06-52.png

pmroz
Super User

Re: How to use JSL to color local cells by value?

What OS and JMP version(s) are you using?  I'm using JMP 14 on Windows 10, 64-bit.

Try these steps:

  • Open Big Class
  • Right click on height > Column Properties > Color Gradient

Big Class Gradient3.png

  • Check "Color Cell by Value", then OK

Big Class Gradient4.png

  • You should end up with this:

Big Class Gradient5.png

If this still doesn't work you'll need to contact the JMP helpdesk.

lwx228
Level VIII

Re: How to use JSL to color local cells by value?

Thank pmroz!

I did it.

lwx228
Level VIII

Re: How to use JSL to color local cells by value?

But  to do it manually in order to show this?

 

In addition, could  use JSL to automatically get the color number of each row cell in the column of "height"?

 

2020-07-09_07-48.png

txnelson
Super User

Re: How to use JSL to color local cells by value?

A few years ago I asked the same question, 

Here it is: 

You basically have to extract it from the extracted script for the column you are interested in

Jim
lwx228
Level VIII

Re: How to use JSL to color local cells by value?

Thank Jim!
You have given me a lot of help and have made rapid progress.

I used to use VBA, and I was able to record most of the code for each step.
Now using JSL, also want to achieve fully automatic operation.
lwx228
Level VIII

Re: How to use JSL to color local cells by value?

  • Recording each step of operation, VBA is relatively easy.

  • 2020-07-09_08-43.png
txnelson
Super User

Re: How to use JSL to color local cells by value?

You can easily create a similar pattern in JSL.  But in JSL you create Functions.

function.PNG

Jim
lwx228
Level VIII

Re: How to use JSL to color local cells by value?

Thank Jim!

 

 

I still haven't learned to write "Functions".
I want to get a color number like this:

2020-07-10_08-58.png

txnelson
Super User

Re: How to use JSL to color local cells by value?

Did you read the entry that I posted in my previous reply about how to retrieve Cell Colors?  It has a function that can provide you with how to access the cell colors.  If the colors have been set by the use of "Color or Mark by Column" then the only way I know to get the colors, is to create a rowstate column, copy the current rowstates to the new column, and then use the Color Of( Row State( row#)) to retrieve the color value.

Jim