adding land boundary to a filled.contour plot

2019-08-08 15:37发布

问题:

I'd like to add the boundary lines for Scotland into a filledContour plot I have of a raster file. so my code currently looks like:

filledContour(neap_hu3, levels=seq(-1,8,0.25), col=rgb.palette(36), plot.title = title(xlab="Longitude", ylab="Latitude"), plot.axes={ axis(1); axis(2); contour(neap_hu3, add=T )} )

where neap_hu3 is my raster file.

I've tried adding map(add=TRUE) but that didn't work. also tried plotting a shapefile of the boundary after the filledContour plot but that didn't work.

anyone has any suggestions? will be greatly appreciated :)