<div class="responsive">
<div class="gallery center-block">
<a target="_blank" href="https://s20.postimg.org/eaz0ihd0d/usb3.png">
<img src="https://s20.postimg.org/eaz0ihd0d/usb3.png" alt="image of bluetooth 4.0 usb adapter dongle" width="100%" height="auto">
</a>
</div>
</div>
有没有办法根据纬度在上面的图像上放置标签。例如,低于-10的纬度有一个标签,-10到0之间有另一个标签,依此类推。如下所示:
答案 0 :(得分:1)
绘制栅格与任何其他基础绘图非常相似。所以你可以修改图形,就像任何其他情节一样:
# data
library(raster)
dat <- getData('worldclim', var='tmin', res=10)
# define y locations for labels and lines
y <- seq(-20,20,by = 10)
# plot and suppress y axis (use axes=FALSE if you don't want either)
plot(dat$tmin1,yaxt="n")
# add labels
axis(2, at=y,labels=sprintf('%s deg. lat.',y), col.axis="darkgreen", las=2)
# add lines
abline(h=y,col='red',lty=2)