cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Try the Materials Informatics Toolkit, which is designed to easily handle SMILES data. This and other helpful add-ins are available in the JMP® Marketplace
Choose Language Hide Translation Bar
CDW
CDW
Level I

JSL user defines row legend color

appreciated if someone can share the knowledge to define and assign row legend color.  

 

take Cheese.jmp dataset example, if it is possible to assign row cheese A = pink color, cheese B= black color by using JMP 14. 

 

CDW_0-1685150379548.png

Bivariate(
	Y( :Score ),
	X( :Count ),
	SendToReport(
		Dispatch(
			{},
			"Bivar Plot",
			FrameBox,
			{Row Legend(
				Cheese,
				Color( 1 ),
				Color Theme( "JMP Default" ),
				Marker( 0 ),
				Marker Theme( "" ),
				Continuous Scale( 0 ),
				Reverse Scale( 0 ),
				Excluded Rows( 0 )
			)}
		)
	)
);
3 REPLIES 3
txnelson
Super User

Re: JSL user defines row legend color

You can right click on the Legend grouping and select the color you want the row values to change to

txnelson_0-1685184349876.png

 

Here is the chart with the A Cheese set to pint, and the B Cheese set to black

txnelson_1-1685184398985.png

How I would do this in JSL would be:

Names Default To Here( 1 );
dt = Current Data Table();

For Each Row(
	If(
		:cheese == "A", theColor = "light red",
		:cheese == "B", theColor = "Black",
		:cheese == "C", theColor = "Orange",
		theColor = "Green"
	);
	Row State( Row() ) = Color State( thecolor );
);

Bivariate(
	Y( :Score ),
	X( :Count )
);
Jim
hogi
Level XII

Re: JSL user defines row legend color

Another approach: 

via Value Colors property of the column.

I hope it was available in Jmp14?

hogi_0-1685189782274.png

 

txnelson
Super User

Re: JSL user defines row legend color

Yes, Value Colors are available in JMP 14. 

Jim