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
john_madden
Level VI

Overlay plot including both grouped and ungrouped column data

I have a column of continuous y-data that I want to graph against an x-axis (time, in this case). There is also a grouping column that distinguishes the y-data into several groups.

I want an easy way to automate production of a series of graphs, each of which shows the results for a single group overlayed on the results of the aggregate (ungrouped) data. So, let's say there are 10 groups. I'd like to produce 10 graphs. Graph #1 would show the aggregate data overlaid on Group 1's data; graph #2 would show show the aggregate data overlaid on Group 2's data; and so on.

In each graph, I'd like to distinguish the grouped data by using a different color from the aggregate data, and I'd also like to include linear fit in appropriate color to the group data and to the aggregate data.

What's the best way to do this (by hand or via JSL; using graph builder or overlay plot; etc.)?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Overlay plot including both grouped and ungrouped column data

One way is to create 10 new indicator columns, which divide the Y into two groups e.g. IsGroup1/IsNotGroup1, IsGroup2/IsNotGroup...

In graph builder put time as X, Y as Y (summarised as desired) and the indicator column as overlay. Using a script, send this to a journal and then loop over the remaining indicator columns (with a column switcher).

Alternatively the data were in a stacked format (10 duplicates for the 10 graphs) you could use page or wrap in graph builder to have them all in a single window.

(optional depending on how you want to aggregate the data) You could use the Column Statistical functions such as 'Col Mean' on Y where the byVariables are time and one of the indicator columns. The second set of 10 columns would contain the Y's summarised correctly.

View solution in original post

1 REPLY 1

Re: Overlay plot including both grouped and ungrouped column data

One way is to create 10 new indicator columns, which divide the Y into two groups e.g. IsGroup1/IsNotGroup1, IsGroup2/IsNotGroup...

In graph builder put time as X, Y as Y (summarised as desired) and the indicator column as overlay. Using a script, send this to a journal and then loop over the remaining indicator columns (with a column switcher).

Alternatively the data were in a stacked format (10 duplicates for the 10 graphs) you could use page or wrap in graph builder to have them all in a single window.

(optional depending on how you want to aggregate the data) You could use the Column Statistical functions such as 'Col Mean' on Y where the byVariables are time and one of the indicator columns. The second set of 10 columns would contain the Y's summarised correctly.