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: Graph Builder heat map: how to share the same scale for all years?

Topic Options

- Start Article
- 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

Graph Builder heat map: how to share the same scale for all years?

Jan 10, 2016 9:35 AM
(2164 views)

Hi

I want to show the spread and growth of the population over time and space. I’m using Graph Builder to map population density (see below). I can produce quite nice heat maps but the density seems to be calculated separately for each year. Is there a way to share the same scale for all years so the colours will have the same meaning across maps?

Thanks.

C.B.

7 REPLIES 7

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

Re: Graph Builder heat map: how to share the same scale for all years?

The solution that I have come up with, that approximates the solution you want, is to create a data table that has concatenated to it, a copy of the complete data table for each of the years. For the first of the concatenated copies, you set the year value to the first year in your data table, then for the second, you set it equal to the second year, etc. For each of the concatenated copies, you set the rowstate to Hide. The end result of this is that for the calculation of the density, all of the data will be used, but the individual data points will not be displayed. Only the rows from the original table, which the rowstate is not hidden or excluded will be displayed.

The above solution can be made more exact, if the first of the concatenated data tables contains all of the rows from the original data table, except for the first year, the second concatenated table has all of the rows except for the second year, etc. It is a bit more complex to produce but marginally more accurate.

Jim

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

Re: Graph Builder heat map: how to share the same scale for all years?

Thank you very much txnelson. I'll try this solution.

C.B.

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

Re: Graph Builder heat map: how to share the same scale for all years?

Hi,

I'm afraid the solution doesn't work with the density (Contour). In this example, we can see that hiding rows state is working with dots, but the density is the same for both years (no evolution at all).

Without hiding concatenated rows :

I followed instructions very carefully. Maybe I missed something.

Thanks again.

C.B.

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

Re: Graph Builder heat map: how to share the same scale for all years?

You did an excellent job at following my instructions. But I did a poor job of interpreting what you wanted. I thought you wanted the overall density displayed on all maps.

As far as adjusting the scale, I am not aware of any way to set the scales, however, if you use the Contour Plot platform, under Graphics==>Contour Plot,

you can specify the scale

Jim

Highlighted
##

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

Re: Graph Builder heat map: how to share the same scale for all years?

Hi C.B.,

My response does not necessarily answer your specific request, but it might get you closer to what I believe to be your intent. The following approach will give a visual reference for the total population size for the year, by color, while maintaining the same number of contours for each year.

First, create a new formula column in your table to aggregate the total number of observations by year. This can be done with the **Col Number( :Any_Numeric_Column, <by Variable> )** formula. Note that :Any_Numeric_Column could be pre-existing in your table, or you could create a new numeric column and populate it to ensure non-missing data for each row if that is desired - the formula aggregates only the non-missing rows for the column specified. The <by Variable> in your case would be the year column.

Then create the graph as you did in your original post and drop the new formula column into the Overlay landing zone. This will create a legend showing the totals by year with a unique color for each year. I've used the San Francisco Crime data table from the Sample Data directory as an example output:

Hope this helps.

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

Re: Graph Builder heat map: how to share the same scale for all years?

** Col Number( :Any_numeric_column, byVariable )** where the byVariable in your case would be the year column.

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

Re: Graph Builder heat map: how to share the same scale for all years?

Thank you! Very interesting. I'll try this soon.

CB