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
Mcc99
Level I

How to overlay data points from one group onto the box plots of a second group in graph builder?

I have data from two studies (#1 and #2), each study had four ages of subjects (A, B, C, D) and one continuous result (score). Study #2 also has treatment groups (x, y, z, etc). I am trying to make a graph to compare the two studies. Ideally, the graph includes box plots of age (x-axis) and Score (Y-axis) ONLY FROM STUDY #1. And then overlay the scores from study #2 as individual data points onto the correct box plot for that subject's age. Finally, those data points will be color-coded based on the treatments in study #2. My data sheet has the data from both studies with columns for Study, Subject, Age, Treatment, and Score. I know how to add data points, color codes, etc but I am having trouble making graph builder only pull from study #1 for the box plots and only pull from study #2 for the data points. Do I need to change how my datasheet is set up? Or is there a way to specify in graph builder which rows/variables to include for each section? 

Thanks!

(I'm using JMP 16 Pro on Windows) 

1 ACCEPTED SOLUTION

Accepted Solutions
txnelson
Super User

Re: How to overlay data points from one group onto the box plots of a second group in graph builder?

See if this works the way you want.

Basically, I took the first data table, and added a new column that I called Score2, and placed the scores from the second study into that column.  I also added a new column Treatment and added in the treatment group for each subject.

txnelson_0-1709777104409.png

To create the graph, I dragged Score and Score2 to the Y axis, and Age to the X axis.

I dragged Treatment to the Color drop area

I then right clicked on the graph and selected Add=>Box Plot

Then I turned to the Properties area on the left for the Control Area.

For the Points, I clicked on the gray triangle next to the Variables listing to open the choices available for the Points and unselected the Score variable, because your request is for the Score values are not to be displayed as points.

For the Box Plot, I opened the choices and unselected Score2 and Color Treatment

txnelson_1-1709777547370.png

 

 

 

Jim

View solution in original post

2 REPLIES 2
txnelson
Super User

Re: How to overlay data points from one group onto the box plots of a second group in graph builder?

See if this works the way you want.

Basically, I took the first data table, and added a new column that I called Score2, and placed the scores from the second study into that column.  I also added a new column Treatment and added in the treatment group for each subject.

txnelson_0-1709777104409.png

To create the graph, I dragged Score and Score2 to the Y axis, and Age to the X axis.

I dragged Treatment to the Color drop area

I then right clicked on the graph and selected Add=>Box Plot

Then I turned to the Properties area on the left for the Control Area.

For the Points, I clicked on the gray triangle next to the Variables listing to open the choices available for the Points and unselected the Score variable, because your request is for the Score values are not to be displayed as points.

For the Box Plot, I opened the choices and unselected Score2 and Color Treatment

txnelson_1-1709777547370.png

 

 

 

Jim
Mcc99
Level I

Re: How to overlay data points from one group onto the box plots of a second group in graph builder?

This works great and your explanation was very clear. Thank you!