<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: PCA - color map on correlations in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/188202#M40699</link>
    <description>&lt;P&gt;You can do this with a few steps:&lt;/P&gt;&lt;P&gt;In multivariate platform or principle components platform, display the correlation matrix.&lt;/P&gt;&lt;P&gt;Then right-click the matrix and select "Make into Data Table".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-56-44 PM.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16556iAF3A577513A473EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-56-44 PM.jpg" alt="3-20-2019 4-56-44 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting in this new table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-58-19 PM.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16557i1B04317330157DC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-58-19 PM.jpg" alt="3-20-2019 4-58-19 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have to do some manipulation of that table of correlations:&lt;BR /&gt;Use Tables &amp;gt; Stack to create a tall version of the table that 3 columns:&amp;nbsp; A column with the variable names to use for categories on the X axis, another column with categories for the Y axis, and a column with correlation of the variables in the previous two columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-59-15 PM.jpg" style="width: 674px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16558iB3E358730474FFA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-59-15 PM.jpg" alt="3-20-2019 4-59-15 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now you can use the Graph Builder to create the heat map of these correlations.&amp;nbsp; I did have to reverse the order of the variables on the X axis in the axis settings to get what you wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-59-41 PM.jpg" style="width: 662px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16559iDDB79A26B5016AF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-59-41 PM.jpg" alt="3-20-2019 4-59-41 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a script that recreates all those steps on the sample data table ("Body Measurements.JMP") that I used to illustrate all of this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Body Measurements.jmp" );
pca = dt &amp;lt;&amp;lt; Principal Components(
	Y(
		:Mass,
		:Fore,
		:Bicep,
		:Chest,
		:Neck,
		:Shoulder,
		:Waist,
		:Height,
		:Calf,
		:Thigh,
		:Head
	),
	Correlations( 1 ),

);

dtcorr = Report( pca )["Correlations"][Matrix Box( 1 )] &amp;lt;&amp;lt;
Make Into Data Table;

dtcorrstacked = dtcorr &amp;lt;&amp;lt; Stack(
	columns(
		:Mass,
		:Fore,
		:Bicep,
		:Chest,
		:Neck,
		:Shoulder,
		:Waist,
		:Height,
		:Calf,
		:Thigh,
		:Head
	),
	Source Label Column( "VariableYAxis" ),
	Stacked Data Column( "Correlation" )
);
dtcorrstacked &amp;lt;&amp;lt; Set Name( "Stacked Correlations" );
Close( dtcorr, NoSave );
Column( dtcorrstacked, "Row" ) &amp;lt;&amp;lt; Set Name( "VariableXAxis" );
dtcorrstacked &amp;lt;&amp;lt; Graph Builder(
	Size( 531, 531 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables(
		X( :VariableXAxis ),
		Y( :VariableYAxis ),
		Color( :Correlation )
	),
	Elements( Heatmap( X, Y, Legend( 6 ) ) ),
	SendToReport(
		Dispatch( {}, "VariableXAxis", ScaleBox, {Reversed Scale} )
	)
);



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 20 Mar 2019 21:06:26 GMT</pubDate>
    <dc:creator>MathStatChem</dc:creator>
    <dc:date>2019-03-20T21:06:26Z</dc:date>
    <item>
      <title>PCA - color map on correlations</title>
      <link>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/187649#M40653</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm performing a PCA analysis and I really like to visualize the correlations using the 'color map on correlations'. However, I would like to have my variabale labels' at the x and y of this graph (see attached image). Is there any way to do this?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 10:25:15 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/187649#M40653</guid>
      <dc:creator>Omega</dc:creator>
      <dc:date>2019-03-19T10:25:15Z</dc:date>
    </item>
    <item>
      <title>Re: PCA - color map on correlations</title>
      <link>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/187687#M40656</link>
      <description>&lt;P&gt;FYI, I note that 'Analyze &amp;gt; Mulitvariate Methods &amp;gt; Multivariate' gives you half of what you want:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screen Shot 2019-03-19 at 12.05.50.png" style="width: 879px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16372iF1A9A25599EF937C/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screen Shot 2019-03-19 at 12.05.50.png" alt="Screen Shot 2019-03-19 at 12.05.50.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Mar 2019 12:09:07 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/187687#M40656</guid>
      <dc:creator>ian_jmp</dc:creator>
      <dc:date>2019-03-19T12:09:07Z</dc:date>
    </item>
    <item>
      <title>Re: PCA - color map on correlations</title>
      <link>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/188202#M40699</link>
      <description>&lt;P&gt;You can do this with a few steps:&lt;/P&gt;&lt;P&gt;In multivariate platform or principle components platform, display the correlation matrix.&lt;/P&gt;&lt;P&gt;Then right-click the matrix and select "Make into Data Table".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-56-44 PM.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16556iAF3A577513A473EE/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-56-44 PM.jpg" alt="3-20-2019 4-56-44 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Resulting in this new table&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-58-19 PM.jpg" style="width: 999px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16557i1B04317330157DC2/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-58-19 PM.jpg" alt="3-20-2019 4-58-19 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You will have to do some manipulation of that table of correlations:&lt;BR /&gt;Use Tables &amp;gt; Stack to create a tall version of the table that 3 columns:&amp;nbsp; A column with the variable names to use for categories on the X axis, another column with categories for the Y axis, and a column with correlation of the variables in the previous two columns.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-59-15 PM.jpg" style="width: 674px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16558iB3E358730474FFA7/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-59-15 PM.jpg" alt="3-20-2019 4-59-15 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Now you can use the Graph Builder to create the heat map of these correlations.&amp;nbsp; I did have to reverse the order of the variables on the X axis in the axis settings to get what you wanted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="3-20-2019 4-59-41 PM.jpg" style="width: 662px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/16559iDDB79A26B5016AF6/image-size/large?v=v2&amp;amp;px=999" role="button" title="3-20-2019 4-59-41 PM.jpg" alt="3-20-2019 4-59-41 PM.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's a script that recreates all those steps on the sample data table ("Body Measurements.JMP") that I used to illustrate all of this.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Body Measurements.jmp" );
pca = dt &amp;lt;&amp;lt; Principal Components(
	Y(
		:Mass,
		:Fore,
		:Bicep,
		:Chest,
		:Neck,
		:Shoulder,
		:Waist,
		:Height,
		:Calf,
		:Thigh,
		:Head
	),
	Correlations( 1 ),

);

dtcorr = Report( pca )["Correlations"][Matrix Box( 1 )] &amp;lt;&amp;lt;
Make Into Data Table;

dtcorrstacked = dtcorr &amp;lt;&amp;lt; Stack(
	columns(
		:Mass,
		:Fore,
		:Bicep,
		:Chest,
		:Neck,
		:Shoulder,
		:Waist,
		:Height,
		:Calf,
		:Thigh,
		:Head
	),
	Source Label Column( "VariableYAxis" ),
	Stacked Data Column( "Correlation" )
);
dtcorrstacked &amp;lt;&amp;lt; Set Name( "Stacked Correlations" );
Close( dtcorr, NoSave );
Column( dtcorrstacked, "Row" ) &amp;lt;&amp;lt; Set Name( "VariableXAxis" );
dtcorrstacked &amp;lt;&amp;lt; Graph Builder(
	Size( 531, 531 ),
	Show Control Panel( 0 ),
	Graph Spacing( 4 ),
	Variables(
		X( :VariableXAxis ),
		Y( :VariableYAxis ),
		Color( :Correlation )
	),
	Elements( Heatmap( X, Y, Legend( 6 ) ) ),
	SendToReport(
		Dispatch( {}, "VariableXAxis", ScaleBox, {Reversed Scale} )
	)
);



&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Mar 2019 21:06:26 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/188202#M40699</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2019-03-20T21:06:26Z</dc:date>
    </item>
    <item>
      <title>Re: PCA - color map on correlations</title>
      <link>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/229182#M45452</link>
      <description>&lt;P&gt;I was going through some of my old posts, and I wanted to update this thread.&amp;nbsp; You will be happy to know that in JMP 15, the color map on correlations has been improved and does what you were wanting in the original post.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="colormapcorrelations.png" style="width: 441px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/19672iDEDD06E8769A088A/image-size/large?v=v2&amp;amp;px=999" role="button" title="colormapcorrelations.png" alt="colormapcorrelations.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I love it when the JMP development team listens and makes even small improvements like this that delight their customers!&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 13 Oct 2019 16:16:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/PCA-color-map-on-correlations/m-p/229182#M45452</guid>
      <dc:creator>MathStatChem</dc:creator>
      <dc:date>2019-10-13T16:16:45Z</dc:date>
    </item>
  </channel>
</rss>

