[R] Updating a hexbinplot

Marcin Kozak nyggus at gmail.com
Thu Feb 25 10:24:50 CET 2010

Dear all,

Considering this simple example of hexbinplot:
mixdata <-
     data.frame(x = c(rnorm(5000), rnorm(5000,4,1.5)),
                y = c(rnorm(5000), rnorm(5000,2,3)),
                a = gl(2, 5000))
fig <- hexbinplot(y ~ x | a, mixdata)
update(fig, colramp = BTC)

produces a bad (non-updated) legend. Compare it with:

hexbinplot(y ~ x | a, mixdata, colramp = BTC)

What should I do to update the plot with the correct legend?

(I'm using R 2.10.1 under Windows XP).

Thanks in advance,

More information about the R-help mailing list