<?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: Make size of bubbles in bubble plot proportional to count in Discussions</title>
    <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45318#M25907</link>
    <description>&lt;P&gt;The JMP equivalent to the SumProduct function in Excel is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Sum(A:*B)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where both A and B are matricies.&amp;nbsp; The issue with this, is the defining of the matricies.&amp;nbsp; Below is a script that&amp;nbsp; takes two approaches to doing the SumProduct on the sample data table "Big Class".&amp;nbsp; My assumption is that you will need to calculate the SumProduct for different rows, based upon a grouping value in another column.&amp;nbsp; The first approach uses a single column to do the SumProduct, using the above approach, calculating the SumProduct separatly for the values of the column Sex.&amp;nbsp; The second approach uses 2 columns.&amp;nbsp; The first column calculates the product, and the second column calculates the sum of those products for the column Sex.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );

// Create the SumProduct in one formula
dt &amp;lt;&amp;lt; New Column( "SumProduct",
	formula(
		dt = Current Data Table();
		gender = :sex[Row()];
		TheRows = dt &amp;lt;&amp;lt; get rows where( :sex == gender );
		aMat = dt:height[TheRows];
		bMat = dt:weight[TheRows];
		Sum( aMat :* bMat );
	)
);

// Create the SumProduct using 2 column formulas
dt &amp;lt;&amp;lt; New Column( "Product", formula( :height * :weight ) );
dt &amp;lt;&amp;lt; New Column( "ColSum", formula( Col Sum( :Product, :sex ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Sat, 30 Sep 2017 14:37:35 GMT</pubDate>
    <dc:creator>txnelson</dc:creator>
    <dc:date>2017-09-30T14:37:35Z</dc:date>
    <item>
      <title>Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45315#M25904</link>
      <description>&lt;P&gt;I have a bubble plot in which each axis is a different, discrete list of mutually-exclusive text descriptors for the data (for instance, imagine a table of vehicle attributes where the X axis has different vehicle size classifications like subcompact, compact, sedan, etc. and the Y axis has cost descriptors such as bargain, relatively inexpensive, average cost, relatively expensive, and uber-expensive).&amp;nbsp; I want the size of each bubble to be proportional to the total number of times that that combination of X and Y values appears in my data table.&amp;nbsp; How do I do this?&amp;nbsp; Thanks.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 12:10:03 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45315#M25904</guid>
      <dc:creator>Ripple</dc:creator>
      <dc:date>2017-09-30T12:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45316#M25905</link>
      <description>&lt;P&gt;I am not sure if this is what you are looking for, but given the information you specified, and the rules for the Bubble Plot, you will need to create a new column that represents the values you want to use for the size, and then specify the new column as the "Sizes" column to the Bubble Plot.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 12:40:27 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45316#M25905</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-30T12:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45317#M25906</link>
      <description>&lt;P&gt;Thanks - that makes sense, although I was hoping there would be a way for JMP to do it automatically.&amp;nbsp; The only minor hassle is that I haven't yet found an equivalent formula in JMP to Excel's SUMPRODUCT that would make doing those tallies easy - but I can do that in Excel and bring the data in.&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 13:00:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45317#M25906</guid>
      <dc:creator>Ripple</dc:creator>
      <dc:date>2017-09-30T13:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45318#M25907</link>
      <description>&lt;P&gt;The JMP equivalent to the SumProduct function in Excel is:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Sum(A:*B)&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Where both A and B are matricies.&amp;nbsp; The issue with this, is the defining of the matricies.&amp;nbsp; Below is a script that&amp;nbsp; takes two approaches to doing the SumProduct on the sample data table "Big Class".&amp;nbsp; My assumption is that you will need to calculate the SumProduct for different rows, based upon a grouping value in another column.&amp;nbsp; The first approach uses a single column to do the SumProduct, using the above approach, calculating the SumProduct separatly for the values of the column Sex.&amp;nbsp; The second approach uses 2 columns.&amp;nbsp; The first column calculates the product, and the second column calculates the sum of those products for the column Sex.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );

// Create the SumProduct in one formula
dt &amp;lt;&amp;lt; New Column( "SumProduct",
	formula(
		dt = Current Data Table();
		gender = :sex[Row()];
		TheRows = dt &amp;lt;&amp;lt; get rows where( :sex == gender );
		aMat = dt:height[TheRows];
		bMat = dt:weight[TheRows];
		Sum( aMat :* bMat );
	)
);

// Create the SumProduct using 2 column formulas
dt &amp;lt;&amp;lt; New Column( "Product", formula( :height * :weight ) );
dt &amp;lt;&amp;lt; New Column( "ColSum", formula( Col Sum( :Product, :sex ) ) );&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 30 Sep 2017 14:37:35 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45318#M25907</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2017-09-30T14:37:35Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45325#M25908</link>
      <description>&lt;P&gt;You can do this. You just need to summarize the data first.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here's the Car Poll data from the Sample Data.&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="JMPScreenSnapz128.png" style="width: 200px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7829i3D697AF05F5873F6/image-size/small?v=v2&amp;amp;px=200" role="button" title="JMPScreenSnapz128.png" alt="JMPScreenSnapz128.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then go to &lt;A href="http://www.jmp.com/support/help/13-2/Create_a_Summary_Table.shtml" target="_self"&gt;Tables-&amp;gt;Summary&lt;/A&gt; and group it by Marital Status and Type.&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="JMPScreenSnapz129.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7830i5E6DC6498C0A4149/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPScreenSnapz129.png" alt="JMPScreenSnapz129.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;which gets you this:&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="JMPScreenSnapz130.png" style="width: 200px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7831i09237E26C705C1E6/image-size/small?v=v2&amp;amp;px=200" role="button" title="JMPScreenSnapz130.png" alt="JMPScreenSnapz130.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and now, use Bubble Plot with Marital Status on Y, Type on X and N Rows as Size.&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="JMPScreenSnapz131.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7832iAE84DEF8D56F61C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPScreenSnapz131.png" alt="JMPScreenSnapz131.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;On the other hand, I'm not sure that's the best visualization for this type of data. Starting with the original Car Poll data (no need to summarize) you can use Graph Builder with Marital Status on the Y and Type on the X and use the Mosaic element.&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="JMPScreenSnapz132.png" style="width: 400px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/7833i3DEC53F1AD908F87/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JMPScreenSnapz132.png" alt="JMPScreenSnapz132.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 19:27:28 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45325#M25908</guid>
      <dc:creator>Jeff_Perkinson</dc:creator>
      <dc:date>2017-09-30T19:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45328#M25909</link>
      <description>&lt;P&gt;txnelson &amp;amp; Jeff -&lt;/P&gt;&lt;P&gt;Thank you both very much - those are all methods I'll pursue.&lt;/P&gt;&lt;P&gt;Ripple&lt;/P&gt;</description>
      <pubDate>Sat, 30 Sep 2017 15:26:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/45328#M25909</guid>
      <dc:creator>Ripple</dc:creator>
      <dc:date>2017-09-30T15:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/315815#M56782</link>
      <description>&lt;P&gt;&lt;a href="https://community.jmp.com/t5/user/viewprofilepage/user-id/6878"&gt;@Jeff_Perkinson&lt;/a&gt;&amp;nbsp; Is there anyway to create a similar graph in the "graph builder" WITHOUT creating a new table?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;x=Type, Y=Martial Status, Bubble Size = N Rows&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I graph from the new table, "R^2" changes, so I need to create one graph using the original data, then create another graph using the summarized new table for visualization. It would be lovely if I can do both in one graph.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers!&lt;/P&gt;&lt;P&gt;Lei&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2020 17:55:38 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/315815#M56782</guid>
      <dc:creator>WineAroma</dc:creator>
      <dc:date>2020-10-02T17:55:38Z</dc:date>
    </item>
    <item>
      <title>Re: Make size of bubbles in bubble plot proportional to count</title>
      <link>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/315819#M56784</link>
      <description>&lt;P&gt;Here is a Graph Builder Bubble Chart using the Car Poll data, without creating a new data table.&amp;nbsp; Instead, it uses a Transform variable created within the Graph Builder.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="bubble.PNG" style="width: 646px;"&gt;&lt;img src="https://community.jmp.com/t5/image/serverpage/image-id/27123iE2F9E3CE1A175FE2/image-size/large?v=v2&amp;amp;px=999" role="button" title="bubble.PNG" alt="bubble.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I created the chart interactively, and then used Save Script for the script below.&amp;nbsp; I did add to the script the first 2 lines.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-jsl"&gt;names default to here(1);
dt=open("$SAMPLE_DATA/Car Poll.jmp");
Graph Builder(
	Size( 534, 450 ),
	Show Control Panel( 0 ),
	Variables(
		X( :type ),
		Y( :marital status ),
		Overlay( :marital status ),
		Size(
			Transform Column(
				"Count",
				Formula( Col Number( :age, :marital status, :type ) )
			),
			Summary Statistic( "Mean" )
		)
	),
	Elements( Points( X, Y, Legend( 8 ), Summary Statistic( "Mean" ) ) ),
	SendToReport(
		Dispatch(
			{},
			"400",
			ScaleBox,
			{Legend Model(
				8,
				Properties( 0, {Marker Size( 15 )}, Item ID( "Count", 1 ) ),
				Properties( 1, {Line Color( 0 )}, Item ID( "Married", 1 ) ),
				Properties( 2, {Line Color( 0 )}, Item ID( "Single", 1 ) )
			)}
		)
	)
);
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 02 Oct 2020 18:27:17 GMT</pubDate>
      <guid>https://community.jmp.com/t5/Discussions/Make-size-of-bubbles-in-bubble-plot-proportional-to-count/m-p/315819#M56784</guid>
      <dc:creator>txnelson</dc:creator>
      <dc:date>2020-10-02T18:27:17Z</dc:date>
    </item>
  </channel>
</rss>

