How to Find the Default ggplot2 Plot Margins in R (Example Code)
In this R programming tutorial you’ll learn how to find the default ggplot2 plot margins.
Example: Printing the Default Margins of a ggplot2 Graphic Using the theme_get() Function
install.packages("ggplot2") # Install ggplot2 package library("ggplot2") # Load ggplot2 |
install.packages("ggplot2") # Install ggplot2 package library("ggplot2") # Load ggplot2
theme_get()$plot.margin # Get default ggplot2 margins # [1] 5.5points 5.5points 5.5points 5.5points |
theme_get()$plot.margin # Get default ggplot2 margins # [1] 5.5points 5.5points 5.5points 5.5points
Related Tutorials & Further Resources
You may find some additional R programming tutorials below.