- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Thank Jim!
I have the code to try out that post.But I'm still not going to get there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Here is a formula that works if the cells have been colored using Color Cells(). But cell coloring that has been set by Value Colors, or Color and Mark by Column().. So it is not a very adequate formula
// Define formula to retrieve cell colors
If( Row() == 1,
get_cell_color = Function( {col, r},
s = col << get script;
//Locate argument "Color Cells" in column script
For( i = 1, i <= N Arg( s ), i++,
If( Head Name( Arg( s, i ) ) == "Color Cells",
p = i;
Break();
);
);
//Identify the sublist that contains the color of row r
if( p==i,
L = Arg( Arg( s, p ), 1 );
For( i = 1, N Items( L ), i++,
If( N Row( Loc( L[i][2], r ) ) == 1,
color = L[i][1];
Break();
)
);
color,
color=.
)
)
);
cellcolor = get_cell_color( Column( :Height ), Row() );
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Great function, Jim! Thanks for sharing.
This is a good place to promote your JMP Wish List idea: << get cell color
to have this built into JMP, so that anyone stumbling onto this discussion could vote it up.
Thanks,
~John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Thank Jim!
I still don't know how to use this formula. Not running correctly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Attached is a data table with the formula column added, retrieving the cell colors from the Height column. The colors were set by right clicking on each cell and selecting Cell Color. The formula will can not retrieve the colors set with Color or Mark by Column, Value Colors or Gradient Color
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
It's hard to get a color number like this directly from the color of the cell:
"-2768895, -5530606, -6582759, -8094941, -9147350, -10462158, -11514567, -12237762,
-13344414, -14575206"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: How to use JSL to color local cells by value?
Use this stupid method to select the color number I want.
- « Previous
- Next »