#r #ggplot2 #rworldmap
#r #ggplot2 #rworldmap
Вопрос:
Может кто-нибудь объяснить, почему ggplot создает смещение на карте? Единственное, что я меняю в двух кодах для map A и B, — это xlim. Я не понимаю, почему возникает эта ошибка, и не могу решить эту проблему, если мне нужна карта с экстентом map A. Спасибо за вашу помощь и время.
world <- rworldmap::getMap(resolution = "low")
fty_world <- ggplot2::fortify( world)
## map A with offset in the image
ggplot()
geom_polygon( data = fty_world,
aes( x = long,
y = lat,
group = group),
fill = "white",
color = "grey50")
coord_map( xlim = c( -3, 14),
ylim = c( 43, 54))
## map B without offset
ggplot()
geom_polygon( data = fty_world,
aes( x = long,
y = lat,
group = group),
fill = "white",
color = "grey50")
coord_map( xlim = c( -2, 14),
ylim = c( 43, 54))