library(tmap)
tm_shape(World)+
tm_polygons(
fill = "#ffce00", # fill color
col = "green", # line color
lwd = 1.5, # line width
lty = "dashed") # line type
## [tip] Consider a suitable map projection, e.g. by adding `+ tm_crs("auto")`.
## This message is displayed once per session.

tm_shape(World)+
tm_polygons(fill = "HPI")

tm_shape(World)+ tm_polygons(
fill = "HPI",
fill.scale = tm_scale_intervals(
n = 6, # for n classes
style = "fixed",
breaks = c(0,10,20,30,40,50,60), # you need n+1 number of breaks
values = "pu_gn_div"
))

tm_shape(metro) +
tm_bubbles(size = "pop2020") +
tm_basemap("OpenStreetMap")

tm_shape(World) +
tm_polygons(
fill = "economy",
fill.chart = tm_chart_bar())

ttmp()
## ℹ tmap mode set to "view".
## ℹ switch back to "plot" mode with `tmap::ttm()`
## charts not implemented in view mode
tm_shape(World, crs = "+proj=eqearth") +
tm_polygons(
fill = "HPI") +
tm_layout(bg.color = "skyblue",
earth_boundary = TRUE,
frame = FALSE,
space.color = "white")
## Linking to GEOS 3.13.1, GDAL 3.11.0, PROJ 9.6.0; sf_use_s2() is FALSE
ttmp()
## ℹ tmap mode set to "plot".
## ℹ switch back to "view" mode with `tmap::ttm()`

tm_shape(World,
bbox = "FULL",
crs = "+proj=ortho +lat_0=30 +lon_0=0") +
tm_polygons() +
tm_xlab("Longitudes") +
tm_ylab("Latitudes")

ttmp()
## ℹ tmap mode set to "view".
## ℹ switch back to "plot" mode with `tmap::ttm()`
tm_shape(World,
bbox = "FULL",
crs = "+proj=ortho +lat_0=30 +lon_0=0") +
tm_polygons() +
tm_xlab("Longitudes") +
tm_ylab("Latitudes")+
tm_graticules(n.x = 20, n.y = 10, col = "black", lwd = 2, labels.show = FALSE)
ttmp()
## ℹ tmap mode set to "plot".
## ℹ switch back to "view" mode with `tmap::ttm()`
