<?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: Create duplicate heat-maps with different summary statistics in Graph Builder in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824701#M100445</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12313"&gt;@BHarris&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;I tried adding another Color() specification but it doesn't seem to work in JMP 17.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;-&amp;gt; add another color&lt;BR /&gt;Works with JMP 17 (.2)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1734716046947.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71480iC76426C936611E41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1734716046947.png" alt="hogi_0-1734716046947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
	Size( 574, 613 ),
	Summary Statistic( "Median" ),
	Graph Spacing( 20 ),
	Variables(
		X( :sex ),
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "N" ) ),
		Color( :height, Summary Statistic( "Max" ) )
	),
	Elements( Position( 1, 1 ), Heatmap( X, Y, Color( 1 ), Legend( 4 ) ) ),
	Elements( Position( 2, 1 ), Heatmap( X, Y, Color( 2 ), Legend( 5 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 20 Dec 2024 17:34:35 GMT</pubDate>
    <dc:creator>hogi</dc:creator>
    <dc:date>2024-12-20T17:34:35Z</dc:date>
    <item>
      <title>Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824558#M100414</link>
      <description>&lt;P&gt;Given Big Class and this plot:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Graph Builder(
	Size( 574, 613 ),
	Graph Spacing( 20 ),
	Variables(
		X( :sex ),
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "Min" ) )
	),
	Elements( Position( 1, 1 ), Heatmap( X, Y, Legend( 4 ) ) ),
	Elements( Position( 2, 1 ), Heatmap( X, Y, Legend( 5 ) ) )
)&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Is there a way to make the left plot use the "Mean" summary statistic and the right plot to use "Min"?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried adding another Color() specification but it doesn't seem to work in JMP 17.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 21:31:39 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824558#M100414</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2024-12-19T21:31:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824572#M100417</link>
      <description>&lt;P&gt;What I did was to&amp;nbsp;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Use Tables=&amp;gt;Summary to create a new table with the mean and min statistics grouped by Sex and Age&lt;/LI&gt;
&lt;LI&gt;Use Tables=&amp;gt;Stack to stack the mean and min columns&lt;/LI&gt;
&lt;LI&gt;Run Graph Builder&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="txnelson_0-1734645323632.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71434iC68EBF8060878555/image-size/medium?v=v2&amp;amp;px=400" role="button" title="txnelson_0-1734645323632.png" alt="txnelson_0-1734645323632.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);

dt =
// Open Data Table: Big Class.jmp
// → Data Table( "Big Class" )
Open( "$SAMPLE_DATA/Big Class.jmp" );

// Data table summary
// → Data Table( "Summary of Big Class grouped by age, sex" )
Data Table( "Big Class" ) &amp;lt;&amp;lt; Summary(
	Group( :age, :sex ),
	Mean( :height ),
	Min( :height ),
	Freq( "None" ),
	Weight( "None" ),
	statistics column name format( "stat" ),
	output table name( "Summary of Big Class grouped by age, sex" )
);

// Stack data table
// → Data Table( "Stack of Summary of Big Class grouped by age, sex (Mean, Min)" )
Data Table( "Summary of Big Class grouped by age, sex" ) &amp;lt;&amp;lt;
Stack(
	columns( :Mean, :Min ),
	Output Table( "Stack of Summary of Big Class grouped by age, sex (Mean, Min)" )
);

Graph Builder(
	X Group Edge( "Bottom" ),
	Variables( X( :sex ), Y( :age ), Group X( :Label ), Color( :Data ) ),
	Elements( Heatmap( X, Y, Legend( 4 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2024 21:55:45 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824572#M100417</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2024-12-19T21:55:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824573#M100418</link>
      <description>&lt;P&gt;Another option is to create two graph builder reports and place them side by side in a custom report new window. You might want to re-title the graphs so it is clear that one is colored Min and Max. Here is a simple example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

hm1 = expr( dt &amp;lt;&amp;lt; Graph Builder(
	Size( 235, 613 ),
	Show Control Panel( 0 ),
	Variables(
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "Min" ) )
	),
	Elements( Heatmap( X, Y, Legend( 1 ) ) ),
));

hm2 = expr( dt &amp;lt;&amp;lt; Graph Builder(
	Size( 235, 613 ),
	Show Control Panel( 0 ),	
	Variables(
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "Max" ) )
	),
	Elements( Heatmap( X, Y, Legend( 1 ) ) ),
));

new window( "Two Heat Maps", 
	h list box( hm1, hm2 )
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 19 Dec 2024 22:03:49 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824573#M100418</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2024-12-19T22:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824673#M100437</link>
      <description>&lt;P&gt;At the risk of over-engineering this solution, you could generalize this for a list of stats.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt = Open( "$SAMPLE_DATA/Big Class.jmp" );

statList = { "Mean", "Median", "Mode", "Min", "Max", "Range", "Median", "Std Dev" };

hm_fxn = function( { STAT },
	dt &amp;lt;&amp;lt; Graph Builder(
		Size( 200, 300 ),				// Adjust size based on number of heatmaps
		Show Control Panel( 0 ),
		Variables(
			X( :sex ),
			Y( :age ),
			Color( :height, Summary Statistic( STAT ) )
		),
		Elements( Heatmap( X, Y, Legend( 1 ) ) ),
		SendToReport(
			Dispatch( {}, "Graph Builder", OutlineBox,
			{Set Title( "Color by " || STAT ), Image Export Display( Normal )}
			)
		)
	)
);

new window( "Heat Maps",
	outline box( dt &amp;lt;&amp;lt; get name || " Heat Maps",
		lub = line up box( n col( 4 ) )	// Adjust n col() for number of heatmaps per row
	)
);

for each( { s }, statList,
	lub &amp;lt;&amp;lt; append( hm_fxn( s ) )
)

&lt;/CODE&gt;&lt;/PRE&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="scott_allen_0-1734700199705.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71476iB6059090D2758807/image-size/medium?v=v2&amp;amp;px=400" role="button" title="scott_allen_0-1734700199705.png" alt="scott_allen_0-1734700199705.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 13:12:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824673#M100437</guid>
      <dc:creator>scott_allen</dc:creator>
      <dc:date>2024-12-20T13:12:28Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824701#M100445</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/12313"&gt;@BHarris&lt;/a&gt;&amp;nbsp;wrote:&lt;P&gt;I tried adding another Color() specification but it doesn't seem to work in JMP 17.&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;-&amp;gt; add another color&lt;BR /&gt;Works with JMP 17 (.2)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="hogi_0-1734716046947.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/71480iC76426C936611E41/image-size/medium?v=v2&amp;amp;px=400" role="button" title="hogi_0-1734716046947.png" alt="hogi_0-1734716046947.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class Families.jmp" );
Graph Builder(
	Size( 574, 613 ),
	Summary Statistic( "Median" ),
	Graph Spacing( 20 ),
	Variables(
		X( :sex ),
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "N" ) ),
		Color( :height, Summary Statistic( "Max" ) )
	),
	Elements( Position( 1, 1 ), Heatmap( X, Y, Color( 1 ), Legend( 4 ) ) ),
	Elements( Position( 2, 1 ), Heatmap( X, Y, Color( 2 ), Legend( 5 ) ) )
);&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Dec 2024 17:34:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824701#M100445</guid>
      <dc:creator>hogi</dc:creator>
      <dc:date>2024-12-20T17:34:35Z</dc:date>
    </item>
    <item>
      <title>Re: Create duplicate heat-maps with different summary statistics in Graph Builder</title>
      <link>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824936#M100477</link>
      <description>&lt;P&gt;Excellent, that worked!&amp;nbsp; I think I was missing the extra X variable when I added the color spec.&amp;nbsp; It would be nice if GB supported this with the UI, but it already does so much...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's the final script I was looking for:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;dt = Open( "$SAMPLE_DATA/Big Class.jmp" );
Graph Builder(
	Size( 934, 824 ),
	Show Title( 1 ),
	Graph Spacing( 20 ),
	Variables(
		X( :sex ),
		X( :sex ),
		X( :sex ),
		Y( :age ),
		Color( :height, Summary Statistic( "Min" ) ),
		Color( :height, Summary Statistic( "Mean" ) ),
		Color( :height, Summary Statistic( "Max" ) )
	),
	Elements(
		Position( 1, 1 ),
		Heatmap( X, Y, Color( 1 ), Legend( 1 ), Label( "Label by Value" ) )
	),
	Elements(
		Position( 2, 1 ),
		Heatmap( X, Y, Color( 2 ), Legend( 2 ), Label( "Label by Value" ) )
	),
	Elements(
		Position( 3, 1 ),
		Heatmap( X, Y, Color( 3 ), Legend( 3 ), Label( "Label by Value" ) )
	),
	SendToReport(
		Dispatch(
			{},
			"graph title",
			TextEditBox,
			{Set Text( "Age vs. Sex, Colored on Height -- Min, Mean, Max" )}
		),
		Dispatch(
			{},
			"400",
			LegendBox,
			{Legend Position( {1, [0], 2, [-1], 3, [-1]} )}
		)
	)
)&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 23 Dec 2024 17:16:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Create-duplicate-heat-maps-with-different-summary-statistics-in/m-p/824936#M100477</guid>
      <dc:creator>BHarris</dc:creator>
      <dc:date>2024-12-23T17:16:35Z</dc:date>
    </item>
  </channel>
</rss>

