library(sf)
colors <- rainbow(14) # legend colors
hranice <- RCzechia::kraje("low")
plot(hranice["KOD_CZNUTS3"],
col = colors,
main = "Czech Regions",
xlim = st_bbox(hranice)[c(1, 3)] * c(1, 1.1))
legend("right",
hranice$KOD_CZNUTS3,
fill = colors,
bty = "n")
Run the code above in your browser using DataLab