stat_density2d error when using polygon geom #749

Closed
bshurick opened this Issue Dec 29, 2012 · 3 comments

Comments

Projects
None yet
5 participants
@bshurick

Using the example within R documentation:

library("MASS")
data(geyser, "MASS")

m <- ggplot(geyser, aes(x = duration, y = waiting)) + geom_point() + xlim(0.5, 6) + ylim(40, 110)
m + geom_density2d()

works fine but

m + stat_density2d(aes(fill = ..level..), geom="polygon")

does not work
the error message is:

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

This comment has been minimized.

Show comment Hide comment
@JakeRuss

JakeRuss Jan 10, 2013

Contributor

Just FYI - this error message is also posted as issue 741.

Contributor

JakeRuss commented Jan 10, 2013

Just FYI - this error message is also posted as issue 741.

@BrianDiggs

This comment has been minimized.

Show comment Hide comment
@BrianDiggs

BrianDiggs Jan 11, 2013

Contributor

Echoing previous comment so that it will link:
this error message is also posted as issue #741.

Contributor

BrianDiggs commented Jan 11, 2013

Echoing previous comment so that it will link:
this error message is also posted as issue #741.

@cross85

This comment has been minimized.

Show comment Hide comment
@cross85

cross85 Feb 1, 2013

This also happens with stat_contour, its a geom="polygon" bug.
Maybe it has something to do with the last update to 0.9.3
"geom_polygon draws multiple polygons as a single grob instead of as
separate grobs. This results in much better performance. For example,
drawing a world map is about 12 times faster. (Winston Chang. Fixes #666)"

cross85 commented Feb 1, 2013

This also happens with stat_contour, its a geom="polygon" bug.
Maybe it has something to do with the last update to 0.9.3
"geom_polygon draws multiple polygons as a single grob instead of as
separate grobs. This results in much better performance. For example,
drawing a world map is about 12 times faster. (Winston Chang. Fixes #666)"

@wch wch closed this Mar 1, 2013

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