turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- JMP User Community
- :
- Discussions
- :
- Discussions
- :
- Re: Make size of bubbles in bubble plot proportional to count

Topic Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 30, 2017 5:10 AM
(1994 views)

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). 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. How do I do this? Thanks.

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.

Jim

5 REPLIES

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

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.

Jim

Highlighted
##
##### Re: Make size of bubbles in bubble plot proportional to count

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Thanks - that makes sense, although I was hoping there would be a way for JMP to do it automatically. 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.

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

The JMP equivalent to the SumProduct function in Excel is:

`Sum(A:*B)`

Where both A and B are matricies. The issue with this, is the defining of the matricies. Below is a script that takes two approaches to doing the SumProduct on the sample data table "Big Class". My assumption is that you will need to calculate the SumProduct for different rows, based upon a grouping value in another column. 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. The second approach uses 2 columns. The first column calculates the product, and the second column calculates the sum of those products for the column Sex.

```
Names Default To Here( 1 );
dt = Open( "$SAMPLE_DATA\big class.jmp" );
// Create the SumProduct in one formula
dt << New Column( "SumProduct",
formula(
dt = Current Data Table();
gender = :sex[Row()];
TheRows = dt << get rows where( :sex == gender );
aMat = dt:height[TheRows];
bMat = dt:weight[TheRows];
Sum( aMat :* bMat );
)
);
// Create the SumProduct using 2 column formulas
dt << New Column( "Product", formula( :height * :weight ) );
dt << New Column( "ColSum", formula( Col Sum( :Product, :sex ) ) );
```

Jim

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

You can do this. You just need to summarize the data first.

Here's the Car Poll data from the Sample Data.

Then go to Tables->Summary and group it by Marital Status and Type.

which gets you this:

and now, use Bubble Plot with Marital Status on Y, Type on X and N Rows as Size.

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.

-Jeff

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Get Direct Link
- Email to a Friend
- Report Inappropriate Content

Sep 30, 2017 8:26 AM
(1970 views)
| Posted in reply to message from Jeff_Perkinson 09/30/2017 11:14 AM

txnelson & Jeff -

Thank you both very much - those are all methods I'll pursue.

Ripple