d <- ggplot(diamonds, aes(carat, price)) + xlim(1,3)
d + stat_density2d(geom="tile", aes(fill = ..density..), contour = FALSE)
makes a error.
I found that the older bug has been fixed by adding
df$group <- data$group[1]
then subsequent code:
if (contour) {
StatContour$calculate(df, scales, ...)
}
else {
names(df) <- c("x", "y", "density")
df$level <- 1
df$piece <- 1
df
}
in the case contour==FALSE, the code
> names(df) <- c("x", "y", "density")
generates incorrect name of data frame, i.e., NA for column "group".
so I think it should be
names(df) <- c("x", "y", "density", "group")
Thank you in advance.
-KO
> --
> You received this message because you are subscribed to the ggplot2 mailing list.
> To post to this group, send email to ggp...@googlegroups.com
> To unsubscribe from this group, send email to
> ggplot2+u...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/ggplot2
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/