Search notes:

R package: maps

maps contains outlines of continents, countries, states and counties.

World without borders

library(maps)

png('img/borderless-world.png', width=400, height=200)
map('world', col="#ccdee1", fill=TRUE,  mar=rep(0,4), lwd=0.01)
Github repository about-r, path: /packages/maps/borderless-world.R

World with borders

library(maps)

png('img/world-with-borders.png', width=400, height=200)
map('world', col="#ccdee1", fill=TRUE,  mar=rep(0,4), border='#2244ff', lwd=0.5)
Github repository about-r, path: /packages/maps/world-with-borders.R

Plotting coordinates

library(maps)

coordinates <- data.frame (
  lon = c(-118, -28,  30, 68, 82, -13),
  lat = c(   5, - 8, -45,  0, 42,  78)
)

png('img/coordinates.png', width=600, height=300)
map('world', col="#ccdee1", fill=TRUE,  mar=rep(0,4), lwd=0.01)
points(
   x  = coordinates$lon,
   y  = coordinates$lat,
   col='#ff7722',
   cex= 1.2,
   pch= 16
)
text(
   paste(coordinates$lon, ' /', coordinates$lat),
   x   = coordinates$lon,
   y   = coordinates$lat,
   pos = 4,
   cex = 1.2
)
Github repository about-r, path: /packages/maps/coordinates.R

See also

The rworldmap package.
R package: ggswissmaps
R packages
Data visualization: map

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745507515, '18.217.19.195', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/languages/R/packages/maps/index(103): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78