在R中使用tmap增加轴标题和轴之间的空间

时间:2018-07-25 17:45:35

标签: r tmap

我在寻找一个相当简单的问题的答案时遇到了问题。我只需要将轴标题(xlab和ylab)从轴上移开即可。由于文件是大的shapefile,因此我没有上载可复制的数据,但是可以根据需要上载(我认为这是一个相当简单的答案)。我已经附加了到目前为止使用的代码以及我正在努力使用的地图:

LandUseMap <- tm_shape(LandUseshape, ylim = c(50.45, 50.68), xlim=c(-105, 
-104.7), projection = "longlat") + 
tm_fill("COVTYPE", title = "Land Cover Type",style="fixed",breaks=c(20,30,34,50,110,121,122,220,230),
      labels=c("Water","Non-Vegetated Land","Developed","Shrubland","Grassland","Annual Cropland","Perennial Crops/Pasture","Broadleaf","No Data"),
      palette=manualpal)  +
tm_borders("grey") +
tm_legend(outside = TRUE, text.size = .65) +
tm_layout(frame = FALSE,asp =NA, outer.margins = c(0.05,0.1,0,0), inner.margins = c(0.05,0.05,0.01,0.05))+
tm_grid(y=c(50.45, 50.50, 50.55, 50.60, 50.65), x=c(-105.0,-104.9,-104.8,-104.7),labels.inside.frame = FALSE, col = "#00ff0000",
      labels.size =0.8)+
tm_xlab("Longitude", size = 1)+
tm_ylab("Latitude", size = 1)+
tm_scale_bar(size = 1, position = c(0,0.8)) + 
tm_compass(size=2.5,north = 0,position = c(0,0.9))
LandUseMap

这是地图:enter image description here

0 个答案:

没有答案
相关问题