[R] Using grid graphics (hexbin) in pairs() plot problem

deepayan.sarkar at gmail.com deepayan.sarkar at gmail.com
Fri Oct 19 09:04:38 CEST 2007


On 10/19/07, Steffen Neumann (on the road) <sneumann at ipb-halle.de> wrote:
> Hi,
>
> I am trying to create a plot with pairs()
> using a gplot.hexbin() for each pair.
>
> For pairs I can provide a custom upperPanel function:
>
>     pairs(iris[1:4], panel=mypanel)
>
> and mypanel() calls plot.hexbin():
>
>     library(hexbin) # Bioconductor
>     mypanel <- function(x, ...){
>         hb <- hexbin(x)
>         plot(hb)
>     }
>
> The problem is that gplot.hexbin() is based
> on the grid-graphics, and each hexplot
> goes over my complete graphics device.
>
> I suspect that I can use the gridBase package
> to put the two together, but I am somehow lost.

You probably could, but you should first check to see if hexplom()
works for you.

-Deepayan



More information about the R-help mailing list