ggpointdensity icon indicating copy to clipboard operation
ggpointdensity copied to clipboard

Map density to fill not colour

Open alanocallaghan opened this issue 2 years ago • 0 comments

Would be very cool to be able to set pch=21 and then map the point fill to density. Perhaps this is obvious but not to me. I tried

ggplot(mtcars) + geom_pointdensity(shape = 21, aes(mpg, cyl, fill=stat(density)))

But I get

Error: Aesthetics must be valid computed stats. Problematic aesthetic(s): fill = stat(density). 
Did you map your stat in the wrong layer?

alanocallaghan avatar Nov 25 '21 18:11 alanocallaghan