I'll preface this by admitting that this is my first post to Stack Overflow, so apologies if I miss some of the finer points.
I am creating a series of maps of the Antarctic Peninsula in ggplot2 using a vector shapefile of the coastline. Creating the basic map works fine:
library(ggplot2)
library(rgdal)
# Import shapefile
peninsula <- readOGR(dsn = "C:/filepath", layer = "filename")
peninsula <- fortify(peninsula)
basic <- ggplot() +
geom_polygon(data = peninsula, aes(x = long, y = lat, group = group),
color = "gray30", size = 0.25, fill = "gray30", alpha = 0.8) +
theme(panel.background = element_rect(fill = "black"),
panel.grid.major = element_line(colour = "white", linetype = "dotted")) +
coord_map(project="stereographic", orientation=c(-90,-55,0),
ylim = c(-68, -60), xlim = c(-70, -42)) +
labs(x = "", y = "")
basic
Which produces the following map:
What I would really like to do, however, is rotate the map counter-clockwise, so that the axis of the Peninsula and island groups to the northeast are vertical (allowing me to put several maps together for publication). I can change the orientation
argument to =c(-90,-55,-35)
in order to rotate the map,
but I can't seem to figure out if there is a way to reset the x and y limits to "crop" the map extent.
It would seem that a similar question was asked here a while back, but there hasn't been a response yet.
I'm not wedded to the stereographic projection, but I haven't found any other choices that make it easier to both rotate the map and narrow the plotted extent.
Of course, I could simply make the maps like this, and then crop and add new Lat/Lon labels in another program, but it would be better if R could produce the maps directly.