[Tex/LaTex] Drawing the map of Guinea, Liberia and Sierra Leone together

diagrams

I would like to ask if some could help me draw the maps of a portion of West Africa i.e. Guinea, Liberia and Sierra Leone using LaTeX? Thank you.

Best Answer

Here is the code and results for using R and LaTex with the R package knitr http://yihui.name/knitr/ . The maps are plotted from a polynomial database in mapdata. A pdf image is created which then is typeset using LaTeX. (lots of details omitted)

A couple of notes

  1. This was done on Win 8.1 with Miktex (full installation) and R 3.1.2 with the maps and mapdata packages installed.

  2. This is not the only way to plot maps using R. There are links for using googlemaps, geodata, etc. Simply search the web with "using R" maps country and browse.

  3. If you go to http://www.r-bloggers.com/?s=maps you will have links to over 800 discussions and examples of using maps in R.

\documentclass[10pt,letterpaper]{article}
\begin{document}
Map of Guinea, Liberia, and Sierra Leone

<<>>=
### Reference: 
###  https://www.students.ncl.ac.uk
###      /keith.newman/r/maps-in-r
###  http://stackoverflow.com/questions/22282713
###      /r-maps-package-how-to-draw-lines-between-cities-within-the-country

library(maps)
library(mapdata)
map('worldHires',c('Guinea','Liberia','Sierra Leone'))
points(-13.67847,9.537029,col=2,pch=18)
text(-13.67847,9.537029, "Conakry", pos = 1)
### points(longitude, latitude, color, symbol shape)
@
\end{document}

Map from above code

Related Question