Subscribe Bookmark
XanGregg

Staff

Joined:

Jun 23, 2011

New in JMP 9: Graph Builder Density Contour Element

Graph Builder strives to help you see your data without adding any interpretation. That's why the default view shows the actual data points and the summary element is a spline smoother instead of a regression line. However, even these elements bring some baggage. Data markers have over-striking issues when many are present, and a million of them can take several seconds to draw. The smoother shows an average trend, whether it's representative or not.


Looking at last year's power data from the SAS Solar Farm, the default Graph Builder view is a smoother. Since there are 50,000 data points, the Marker element is turned off by default.




The curve looks reasonable, but without the markers we can't tell if there's more to the story. Turning on markers, we get:




This illustrates the over-striking issue and doesn't tell us anything unless we notice that the scale has changed. One way to help with over-striking is to set the transparency of the markers to something like 0.1.




That's a big improvement, though the bottom markers seem maxed out and hard to compare. Plus, transparency doesn't solve the speed issue. For 50,000 points, JMP is still responsive. But at 500,000 points, it would start trying your patience.


A new alternative for overcoming these issues is the Contour element, which, in the absence of a color variable, will show shaded contours representing point density.




If you squint your eyes, it looks a lot like the view of markers with transparency, but it doesn't have the over-striking or performance issues. With either view, you get the sense that the smoother doesn't go through the densest part of the data, which suggests there are other factors involved. In this case, we might conclude that there are some sunny days and some cloudy days but not many in the middle.


I created a dummy variable called "Sunny" and assigned it to the Overlay role just to illustrate that the density contours can be overlaid.




That doesn't tell the whole story, but we can tell we're getting closer. (We know from previous analysis that time of year makes a difference, too.)


The density contour may look strange if you're not expecting it, which is why it's turned off by default. However, there are new preferences for Graph Builder in JMP 9 in which you can not only control the default elements but also the cut-offs for when Graph Builder switches to the summary view.




For instance, you can set the Continuous Alternate to Contour if you want to see the density contour whenever the Points Limit is exceeded.

3 Comments
Community Member

Peter wrote:

Thanks for this post. How can a user save the density contour?

It's easy enough in the XbyY menu choosing "save density grid"

But I can't figure out how to save the contours in any of the other graphing platforms! I have seriously spent days trying to work this out!

Any ideas!?

Regards,

Peter

Community Member

md wrote:

hi!

this posting is helpful, thanks! i really like the contour plot to show point density, but what i don't understand yet is whether i can say anything quantitative about individual 'levels' in the contour plot - e.g. if i set four levels, can i say something about what percentage of my data points are in the darkest contour? i've presented these plots in posters and presentations and people have asked me this question quite often...

thanks for your help, happy new year!

-M

Staff

Xan Gregg wrote:

M, The density contour feature in Graph Builder uses the same fit as the nonparametric density contour as in Fit Y by X / Bivariate. It's called "nonpar density" there. In Graph Builder each band contains about the same amount of data, and about 10% of the data will be outside the outermost band. Because the curves are constrained to be smooth, the counts are only approximate (especially for small data counts). To be more precise about the contour level quantiles, the outer curve contains about 90% of the the data and the other curves are evenly distributed between 0 and 90%. So if you set the number of contours to 3, the curves represent quantile values of 30%, 60% and 90%.

Article Tags