[英]How to resize/change y-axis scale in spatial plot raster to remove white area
I have this raster (image below) that I would like to resize as there is excess area below and above the continents (on the y-axis).我有这个栅格(下图),我想调整它的大小,因为大陆下方和上方(在 y 轴上)有多余的区域。
global land cover raster全球土地覆盖栅格
If you are trying to trim white space and fix coordinates, the following expand
argument may help:如果您尝试修剪空白并修复坐标,则以下expand
参数可能会有所帮助:
ggplot() +
geom_map(
data = map_data("world"), map = map_data("world"),
aes(x = long, y = lat, map_id = region)
) +
coord_fixed(ratio = 1) +
scale_y_continuous(expand = c(0,0))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.