| tanaka | R Documentation | 
This function plots a tanaka map.
tanaka(
  x,
  nclass = 8,
  breaks,
  col,
  mask,
  light = "#ffffff70",
  dark = "#00000090",
  shift,
  legend.pos = "left",
  legend.title = "Elevation",
  add = FALSE
)
| x | a raster or an sf contour layer (e.g. the result of
 | 
| nclass | a number of class. | 
| breaks | a vector of break values. | 
| col | a color palette (a vector of colors). | 
| mask | a mask layer, a POLYGON or MULTIPOLYGON sf object. | 
| light | light shadow (NW color). | 
| dark | dark shadow (SE color). | 
| shift | size of the shadow (in map units). | 
| legend.pos | position of the legend, one of 'topleft', 'top', 'topright', 'right', 'bottomright', 'bottom', 'bottomleft', 'left' or a vector of two coordinates in map units (c(x, y)). If leg.position = NA then the legend is not plotted. If leg.position = 'interactive' click on the map to choose the legend position. | 
| legend.title | title of the legend. | 
| add | whether to add the layer to an existing plot (TRUE) or not (FALSE). | 
A Tanaka contour map is plotted.
Tanaka, K. (1950). The relief contour method of representing topography on maps. Geographical Review, 40(3), 444-456.
library(tanaka)
library(terra)
library(sf)
com <- st_read(system.file("gpkg/com.gpkg", package = "tanaka"),
  quiet = TRUE
)
ras <- rast(system.file("tif/elev.tif", package = "tanaka"))
tanaka(ras)
tanaka(ras, mask = com)
tanaka(ras,
  breaks = seq(80, 400, 20),
  legend.pos = "topright",
  legend.title = "Elevation\n(meters)"
)
tanaka(ras,
  nclass = 15,
  col = hcl.colors(15, "YlOrRd"),
  legend.pos = "topright",
  legend.title = "Elevation\n(meters)"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.