I need to generate a world map with colored countries to be included in LaTeX. I tried different things like \getmap
but nothing worked so far. Any thoughts/suggestions?
Run with pdflatex --shell-escape <file>
\documentclass{article}
\usepackage[margin=1cm]{geometry}
\usepackage{pst-geo}
\usepackage{auto-pst-pdf}
\begin{document}
\psset{path=Links/texmf-local-generic/pst-geo/data/}%% change to your system
\begin{center}
\begin{pspicture}(-7,-3.5)(7,3.5)
\psframe*[linecolor=black!30](-7,-3.5)(7,3.5)
\WorldMap[type=4,unit=0.7]% other types are possible
\end{pspicture}
\begin{pspicture}(-7,-7)(7,7)
\psframe*[linecolor=black!30](-7,-7)(7,7)
\WorldMapThreeD[PHI=30,THETA=0]
\end{pspicture}
\end{center}
\end{document}
-
Very interesting and nice to have such a package! – user101590 Mar 5 '17 at 7:49
-
This is a very good map to have. however when I compile the code I get dark gray colored rectangles with nothing in two files, myfile.pdf and myfile-pics.pdf. In the log file, the error I see is "Vtex not found" I have replaced the path to "\psset{path=/usr/share -doc/texlive-doc/generic/pst-geo/data}". What could be the problem? – Zilore Mumba Sep 26 '18 at 20:48
-
The path looks wrong to me. Run
kpsewhich pst-geo
in a terminal and you'll get the correct path where the data files are saved. – user2478 Sep 27 '18 at 5:02
getmap
works, sort of, if you set the zoom
level to 1 you get the most of the world. The projection is bad though.
Note that you must compile with shell-escape
enabled, i.e. pdflatex --shell-escape file.tex
, not pdflatex file.tex
.
\documentclass{article}
\usepackage{getmap,graphicx}
\begin{document}
\getmap[file=theworld,mode=gm,type=terrain,xsize=500,ysize=500,%
scale=2,zoom=1]{60,5}
\begin{center}
\includegraphics[width=9cm]{theworld}
\end{center}
\end{document}
You just need a map, eg this one from wikipedia then include into latex as
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{center}
\includegraphics[width=\textwidth]{PietroCoppo}
\end{center}
\end{document}
-
3You could also use this beautiful map: en.wikipedia.org/wiki/File:Hereford-Karte.jpg ;-). – Ulrike Fischer Feb 25 '17 at 23:58
-
\getmap
command that didn't work or do you mean you just hoped a command such as\getmap
might somehow work by magic? Your question really is not very clear. – David Carlisle Feb 25 '17 at 21:15\includegraphics{map-picture}
using thegraphicx
package. – David Carlisle Feb 25 '17 at 21:18getmap
, but I'm not sure if that's what you mean. Generally, you are not going to get much luck just trying to 'guess' commands (e.g.,\getanswer
).... – jon Feb 25 '17 at 21:20pst-geo
is a tool that might be helpful – user31729 Feb 25 '17 at 21:25