Reputation: 17
I am plotting a SpatialPointsDataFrame object of archaeological finds over a shapefile of the trench they were found in. So far I have managed to load and plot both sets of data together with:
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)
However, I also want the x and y coordinates associated with the finds to be displayed on the x and y axes of my plot. How do I do this? I'm not looking for a solution that involves ggplot
Upvotes: 0
Views: 969
Reputation: 8166
I don't know if I understood correctly, are you looking for the following
plot(trencharea, main= "Trench & Finds")
plot(finds, add=TRUE, col = "blue", pch = 4)
axis(1)
axis(2)
box(col = 'black')
Upvotes: 2