bulva
The trick here is that you need to pass the limits of your map to the
coordinate system, and not to the scales. xlim and ylim are shortcuts
to modify the extent of the scales, and all data outside the scale
range is removed from the dataframe before plotting.
You need to pass xlim and ylim to to coord_map() as in the following
code. Note that takes a very long time to process, so you would
probably want to reduce the dataset by using the map tools to specify
the region of the world map that you are actually looking for.
library(ggplot2)
library(maps)
world.map <- map_data("world")
max_lat = 16.5
min_lat = 2.0
max_lon = 10.5
min_lon = -20.0
p.map <- ggplot(data=world.map) +
geom_path(aes(long, lat, group = group)) +
coord_map(projection = "tetra", xlim=c(min_lon, max_lon),
ylim=c(min_lat, max_lat)) +
opts(panel.background = theme_rect(fill = "lightblue",
colour="white"))
print(p.map)