Skip to content


stat_density2d after ggplot2 0.9.3 update #741

JakeRuss opened this Issue · 1 comment

2 participants


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

Awesome, thanks Winston!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.