Fiji(斐济)这个国家正好跨越东经180°(西经180°),如图,我想要图的中间部分,目测经度范围160到-160,怎么做?
我的代码如下
library(colormap)
library(ggplot2)
library(maps)
library(mapdata)
FijiMap <- map_data("worldHires", region = "Fiji" )
gg <- ggplot(FijiMap, aes( x = long, y = lat)) +
geom_map( map = FijiMap, aes(map_id = region),
color = "gray60",show.legend = FALSE, size =.2 ) +
geom_point(data = quakes, aes(x = long, y = lat,colour = mag),pch = 16) +
expand_limits(x = FijiMap$long, y = FijiMap$lat ) +
scale_y_continuous(breaks=(-6:6)*15) +
scale_x_continuous(breaks=(-6:6)*30) +
coord_map("ortho", orientation = c(-10,180,0)) +
scale_color_colormap(colormap = colormaps$viridis, reverse = TRUE) +
labs(colour = " Richter \n Magnitude") +
xlab("Long (°)") +
ylab("Lat (°)")
print(gg)