I have several plots of the abundance of a particular species over my study area. I have been using image plot successfully. But now, I just want to plot presence/absence, so values from 0 to 1, and the plot stills shows me a continuous legend. Is there a way to modify this?
I have tried with image but the legend is not that cool. This is my code:
colnames(zz)<-c("x","y","z")
ras<-rasterFromXYZ(zz)
asc<-asc.from.raster(ras)
image.plot(asc,
xlim=c(-9.5,-1),ylim=c(43,48),zlim=c(min(asc,na.rm=T),max(asc,na.rm=T)),
ylab="Latitude (ºN)",xlab="Longitude (ºW)",
col = viridis(2, option = "D"))