get_margin | R Documentation |
This function works in combination with the get_paper()
function to make it
easier to position a map on a page before saving to file. This is primarily
useful when using a map or plot created with ggplot2 as part of a print
document format that is composed outside of R using a page layout application
such as Adobe InDesign.
get_margin( margin = NULL, paper = NULL, orientation = NULL, dist = NULL, unit = "in", plot_width = NULL, header = 0, footer = 0 )
margin |
Margin style (options include "extrawide", "wide", "standard",
"narrow", "none"), Additional "auto" option to generate margin based on
line length is planned but not yet implemented. Default: |
paper |
Paper, Default: 'letter'. |
orientation |
Orientation "portrait", "landscape", or "square", Default: 'portrait'. |
dist |
Margin distance (single value used to all sides), Default: |
unit |
Unit for margin distance, Default: 'in'. |
plot_width |
Plot or map width in units. If |
header, footer |
Header and footer height in units; defaults to 0. Please note: headers and footers are not currently supported for "px" units. |
A ggplot2::margin()
element intended for use with
ggplot2::element_rect()
and the plot.background
theme element.
ggplot2::margin()
get_margin("standard") get_margin("none") get_margin(dist = 25, unit = "mm") get_margin(paper = "letter", plot_width = 5.5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.