首页 > 解决方案 > my plotting of geom_sf has a quite strange scale

问题描述

thefts_fil %>% ggplot() +
geom_sf(aes(geometry = geometry, color = classification), alpha=0.5, inherit.aes = F) + 
coord_sf(expand = FALSE) + theme_void() + 
scale_color_manual(values = c("grand" = "#CC6699", "petty" = "#009966"), 
name = "Theft Category", labels = c("Grand", "Petty")) + 
labs( title = "Thefts in Chicago (Jan. & Feb. 2020)", 
caption = "Source: City of Chicago Data Portal") + 
coord_sf(expand = FALSE)

enter image description here

First time to use geom_sf(), I am quite confused about the situation. The axis of y is fine, but the x-axis is extremely short.

标签: rggplot2sf

解决方案


推荐阅读