Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

stat_density2d after ggplot2 0.9.3 update #741

JakeRuss opened this Issue Dec 12, 2012 · 1 comment


None yet
2 participants

JakeRuss commented Dec 12, 2012

Formerly a plot similar to this simple example worked, but after updating to 0.9.3 I'm running into a warning message


m <- ggplot(geyser, aes(x = duration, y = waiting)) + geom_point() + xlim(0.5, 6) + ylim(40, 110)
m <- m + stat_density2d(aes(fill = ..level..), geom="polygon")

Warning message:
In validDetails.polygon(x) : NAs introduced by coercion

If I just use + stat_density2d() without the fill command, the lines are drawn as would be expected. It seems something breaks when I add the fill=..level.. and 'polygon' parts.

@wch wch closed this Mar 1, 2013


JakeRuss commented Mar 1, 2013

Awesome, thanks Winston!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment