Examples for 'terra::text'


Add labels to a map

Aliases: text text,SpatRaster-method text,SpatVector-method

Keywords: methods spatial

### ** Examples

r <- rast(nrows=4, ncols=4)
values(r) <- 1:ncell(r)
plot(r)
text(r)
plot of chunk example-terra-text-1
plot(r)
text(r, halo=TRUE, hc="blue", col="white", hw=0.2)
plot of chunk example-terra-text-1
plot(r, col=rainbow(16))
text(r, col=c("black", "white"), vfont=c("sans serif", "bold"), cex=2)
plot of chunk example-terra-text-1

[Package terra version 1.5-34 Index]