-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
Description
copied from r-spatial/sf#88
HI, I tried point and line geometry with (the experimental) 'geom_sf' for plotting maps (in simple features format ):
library(sf)
library(maps)
library(ggplot2)
#points
data(meuse,package="sp")
meuse_sf <- st_as_sf(meuse, coords = c("x", "y"), crs = 28992, agr = "constant")
summary(meuse_sf)
meuse_sf %>% ggplot() + geom_sf(aes(size=cadmium))
I am a bit confused by the behaviour of aes in geom_sf, with aes(size=cadmium)
I expected varying size of dots, instead it gives me varying size of line thickness of the circles.
How do I change type and size of dots?
meuse_sf %>% ggplot() + geom_sf(aes(color=cadmium))
gives:
line color of the circles changes, I want a fill....
meuse_sf %>% ggplot() + geom_sf(aes(fill=cadmium))
this gives:
more confusing, I still want a fill.... :-), how can I do that ?