View source: R/device_dimensions.R
device_dimensions | R Documentation |
Get the dimensions to pass to a graphics device (or related, such as
ggplot2::ggsave()
) for a graphic. The output proportions are
determined by the default text size, the height in lines of text, and the
aspect ratio.
device_dimensions(default_text, height, aspect_ratio)
default_text |
Default text size in points (1/72 of an inch) |
height |
The desired height of the graphic, in lines of text |
aspect_ratio |
The desired aspect ratio of the output graphic, as
|
Two-element list containing the height and width in inches
# A graphic at 16:9 and 35 lines of text tall device_dimensions( default_text = 11, height = 35, aspect_ratio = 16/9 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.