当我在R中把一个空间数据集绘制在shapefile上时,如何绘制它的坐标?

问题描述 投票:0回答:1

我正在将一个考古发现的SpatialPointsDataFrame对象绘制在它们被发现的沟渠的shapefile上。到目前为止,我已经成功地将两组数据加载到一起并进行了绘制。

coordinates(finds) <- ~x+y
trencharea <- readOGR(dsn="excpoly", layer="excpoly")
trencharea <- as.owin(trencharea)

plot(trencharea, main= "Trench & Finds")
plot(finds, add=TRUE, col = "blue", pch = 4)

但是我还想让与发现物相关的x和y坐标 显示在我的x轴和y轴上。我如何做到这一点?我并不是在寻找一个涉及ggplot的解决方案。

r shapefile
1个回答
0
投票

我不知道我的理解是否正确,你是在寻找以下内容吗?

plot(trencharea, main= "Trench & Finds")
plot(finds, add=TRUE, col = "blue", pch = 4)
axis(1)
axis(2)
box(col = 'black')

虚构情节enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.