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
JMP2021
Level III

how to assign color by group when making a line graph?

I want to assign the same category (dye) in the same color when making a plot.

see plot below.

I would like to assign all the C560 plotted lines in orange instead of different colors. all the FAM in green.

I want to keep individual line not a line with the mean of the group.

 

JMP2021_0-1711487396460.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: how to assign color by group when making a line graph?

  1. Sort the data table by RepID & Condition and Cycle Number
  2. Run dRn vs. Cycle Number table script
    1. From the red triangle select Show Control Panel
    2. Drag the Dye column to the Color drop area
    3. In the Line properties in the Control Panel, select the Row Order check box

I believe that gives you what you want

txnelson_0-1711490275695.png

 

Jim

View solution in original post

5 REPLIES 5
hogi
Level XII

Re: how to assign color by group when making a line graph?

you can use the value color property of the column and define the same color for multiple entries:

hogi_0-1711488444833.png

 

... alternatively you can define a new column which can be used for the COLOR - and continue to use your original column as Overlay.

 

Here is an example with Measles data from the STIPS course. Separation by Region is just applied to clearly see the different color groups.

 

hogi_1-1711488601227.png

 

 

Open( "$SAMPLE_STIPS/Measles.jmp" );
Graph Builder(
	Size( 1061, 493 ),
	Summary Statistic( "Median" ),
	Graph Spacing( 4 ),
	Variables(
		X( :Year ),
		Y( :Cases ),
		Group X( :Region ),
		Overlay( :State Abbr. ),
		Color( :Region )
	),
	Elements( Line( X, Y, Legend( 5 ) ) )
);

 

txnelson
Super User

Re: how to assign color by group when making a line graph?

  1. Sort the data table by RepID & Condition and Cycle Number
  2. Run dRn vs. Cycle Number table script
    1. From the red triangle select Show Control Panel
    2. Drag the Dye column to the Color drop area
    3. In the Line properties in the Control Panel, select the Row Order check box

I believe that gives you what you want

txnelson_0-1711490275695.png

 

Jim
JMP2021
Level III

Re: how to assign color by group when making a line graph?

That is very helpful.

One more question is that what does this Row order selection does to the graph. 

 

txnelson
Super User

Re: how to assign color by group when making a line graph?

It uses the order of the row to connect from point to point
Jim
JMP2021
Level III

Re: how to assign color by group when making a line graph?

thank you.