1

I want to plot two countries:

library('maps')

map(database='world',regions='germany')
map(database='world',regions='burkina faso')

But "burkina farso" is clipped by the x-region of "germany". How can I get a complete map of "burkina faso"?

1 Answer 1

1

It seems the default margin of maps::map() is set at mar = c(4.1, 4.1, 4, 0.1).

You could reduce left and right margin area.

library('maps')

map(database='world',regions='germany')
map.axes(cex.axis=0.8)

dev.new()                                      # if you are using R-Gui
par(mar=c(3, 1, 2, 0) + 0.1)                   # margins in lines (bottom, left, top, right)
map(database='world',regions='burkina faso')
map.axes(cex.axis=0.8) 

enter image description here

2
  • Thanks, works. But I always have to use the par(...) again if I plot one more country, right?
    – Red-Cloud
    Commented May 16, 2020 at 6:56
  • @Red-Cloud I think so, yes.
    – Kazuhito
    Commented May 16, 2020 at 7:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.