0

我在为一个相当简单的问题寻找答案时遇到问题。我只需要将轴标题(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

这是地图:在此处输入图像描述

4

0 回答 0