powered by
Returns a small theme that draws a rectangular border around the plot area. Handy for visually separating inset plots from the main plot.
map_border(color = "black", linewidth = 1, fill = "white", ...)
A ggplot2 theme object to add to a ggplot with +.
+
Border color. Default "black".
Border line width. Default 1.
Background fill color. Default "white".
Passed to ggplot2::element_rect().
ggplot2::element_rect()
library(ggplot2) ggplot(mtcars, aes(mpg, wt)) + geom_point() + map_border(color = "red", linewidth = 2)
Run the code above in your browser using DataLab