Share your ideas for the JMP Scripting Unsession at Discovery Summit by September 17th. We hope to see you there!
Choose Language Hide Translation Bar
Highlighted
ezorlo
Level III

recreate color map from hierarchical clustering in graph builder

Dear JMP community

The two way cluster option in hierarchical cluster provides a really great color map that scales each column individually, such that if I have a column with high values it does not overshadow the rest of the columns. Whereas if i try to make the plot in graph builder e.g. as a heat map, the variables scale together and i lose a lot of data.since only the extreme cases show up. The problem is that the hierarchical cluster messes with my label order.

So, how can I recreate a color map the maintains the same label order as in my data table but has the unique feature of individually scaling each variable? 

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
jerry_cooper
Staff (Retired)

Re: recreate color map from hierarchical clustering in graph builder

Hi @ezorlo ,

It's difficult to tell for sure from your visualizations, but it looks like your data might be in the "stacked" format based on the Heat Map output you provided. It would be helpful to see a sample table to see how your data are arranged since clustering can be done either with data "stacked" (tall) or "as usual" (wide)... but I'll take a stab at it.  

 

The "color map" that you want to produce can be done using the Graph->Cell Plot platform, however, your data would need to be in the "wide" format. If my assumption is correct, and your data are stacked, use the Tables->Split utility to rearrange your data by placing "development" in the Split By role, "Data" in the Split Columns role, and "Label" in the Group role (I based these roles on the heat map output you provided). You may need to resort the resulting table to match your desired order.

 

Now use the Graph->Cell Plot platform on the new table:  place the new data columns (none, young, etc) in the Y, Response role and "Label" in the Label role. This should generate the cell plot you're looking for.

 

Again, if this doesn't work for you, you may need to provide more info (preferably some sample data).

-Jerry

View solution in original post

3 REPLIES 3
Highlighted
Thierry_S
Level VI

Re: recreate color map from hierarchical clustering in graph builder

Hi,
I'm not sure if I'm correct but it looks like the two-way clustering data was standardized by columns (standard option for hierarchical clustering) while the recreated heatmap is using the original scale.
If it is the case, you can easily standardize your data by selecting the data columns > right-click on the header > select New Formula Column > Distributional > Standardized. Then, use the standardized column as your Color variable in your heatmap.
I hope it helps.
Best,
TS
Thierry R. Sornasse
Highlighted
Byron_JMP
Staff

Re: recreate color map from hierarchical clustering in graph builder

Have you tried turning on the Row Order Property in the column with your labels?

Screen Shot 2020-07-08 at 4.09.49 PM.png

JMP Systems Engineer, Pharm and BioPharm Sciences
Highlighted
jerry_cooper
Staff (Retired)

Re: recreate color map from hierarchical clustering in graph builder

Hi @ezorlo ,

It's difficult to tell for sure from your visualizations, but it looks like your data might be in the "stacked" format based on the Heat Map output you provided. It would be helpful to see a sample table to see how your data are arranged since clustering can be done either with data "stacked" (tall) or "as usual" (wide)... but I'll take a stab at it.  

 

The "color map" that you want to produce can be done using the Graph->Cell Plot platform, however, your data would need to be in the "wide" format. If my assumption is correct, and your data are stacked, use the Tables->Split utility to rearrange your data by placing "development" in the Split By role, "Data" in the Split Columns role, and "Label" in the Group role (I based these roles on the heat map output you provided). You may need to resort the resulting table to match your desired order.

 

Now use the Graph->Cell Plot platform on the new table:  place the new data columns (none, young, etc) in the Y, Response role and "Label" in the Label role. This should generate the cell plot you're looking for.

 

Again, if this doesn't work for you, you may need to provide more info (preferably some sample data).

-Jerry

View solution in original post

Article Labels