Wayne Gray
2012-Mar-25 15:59 UTC
[R] multiple hexbin plots with varying greatest densities
Greetings: I have multiple hexbin plots with varying greatest densities. Right now, the data on each plot varies from 1-256 levels of density. The problem with that is that in Plot A the data are more scattered across a 2 x 2 grid whereas in Plot B the data are more concentrated in fewer cells. Hence, Plot A has a few very dense grid cells and plot B has nothing as dense as plot A. (In Plot A the legend shows that the range of densities per cell is 1-700 whereas for Plot B it is 1-453. Both plots use the full range of available colors with 256 gradients.) I want people to be able to compare the two plots and being able to see the differences in variability of the densities is one of the things I want them to see. AT PRESENT, each plot uses the full range of densities; hence, this makes it seem as if each plot has the maximum highest and minimum lowest densities. How can I do this? Thanks, Wayne Gray -- View this message in context: http://r.789695.n4.nabble.com/multiple-hexbin-plots-with-varying-greatest-densities-tp4503405p4503405.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
Thomas Lumley
2012-Mar-25 19:51 UTC
[R] multiple hexbin plots with varying greatest densities
On Mon, Mar 26, 2012 at 4:59 AM, Wayne Gray <wgray.999 at gmail.com> wrote:> Greetings: > > I have multiple hexbin plots with varying greatest densities. > > Right now, the data on each plot varies from 1-256 levels of density. The problem with that is that in Plot A the data are more scattered across a 2 x 2 grid whereas in Plot B the data are more concentrated in fewer cells. Hence, Plot A has a few very dense grid cells and plot B has nothing as dense as plot A. > > (In Plot A the legend shows that the range of densities per cell is 1-700 whereas for Plot B it is 1-453. Both plots use the full range of available colors with 256 gradients.) > > I want people to be able to compare the two plots and being able to see the differences in variability of the densities is one of the things I want them to see. AT PRESENT, each plot uses the full range of densities; hence, this makes it seem as if each plot has the maximum highest and minimum lowest densities. > > How can I do this?With the 'lattice' or 'centroids' styles you can use the maxareaargument to plot.hexbin or to grid.hexagons. survey::svycoplot() is an example of this: you can either have the same scale across panels or have each panel use the full range of sizes. -thomas -- Thomas Lumley Professor of Biostatistics University of Auckland