Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
# False Bay inset
fb <- ggplot(data = sa_shore, aes(x = lon, y = lat)) +
# The land mass
geom_polygon(aes(group = PID),
fill = "grey70", colour = NA, size = 0.5, show.legend = FALSE) +
# The in situ sites
geom_point(data = site_list, shape = 1, size = 3, colour = "black") +
geom_text(data = site_list, aes(label = order), size = 2.3, colour = "red") +
# Text label
geom_text(aes(x = 18.65, y = -34.25, label = "False\nBay"), size = 2.7) +
# Control the x and y axes
coord_cartesian(xlim = c(18.2, 19), ylim = c(-34.5, -33.8), expand = F) +
scale_x_continuous(breaks = c(18.5), label = "18.5°E") +
scale_y_continuous(breaks = c(-34.1), label = "34.1°S") +
labs(x = NULL, y = NULL) +
# Change the theme for cleaner over-plotting
theme_bw() +
theme(plot.background = element_blank(),
axis.text = element_text(colour = "ivory"),
axis.text.y = element_text(angle = 90, hjust = 0.5),
axis.ticks = element_line(colour = "ivory"),
panel.border = element_rect(colour = "ivory"),
panel.grid = element_blank())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment