grid.picture | R Documentation |
These function take a "Picture"
object and either draw the
picture or create a grid graphical object representing the picture.
pictureGrob(picture,
x = unit(0.5, "npc"), y = unit(0.5, "npc"),
width = NULL, height = NULL,
just = "centre", hjust = NULL, vjust = NULL,
default.units = "npc", expansion = 0.05,
xscale = NULL, yscale = NULL, distort = FALSE,
gpFUN = identity, ...,
ext = c("none", "clipbbox", "gridSVG"),
delayContent = match.arg(ext) == "gridSVG",
name = NULL, prefix = NULL, clip = "on")
grid.picture(...)
picture |
A |
x |
A single numeric value or unit object specifying an x-value. |
y |
A single numeric value or unit object specifying a y-value. |
width |
A single numeric value or unit object specifying a width.
May also be |
height |
A single numeric value or unit object specifying a height.
May also be |
just |
The justification of the picture relative to its (x, y) location.
If there are two values, the first value specifes horizontal
justification and the second value specifies vertical justification.
Possible string values are: |
hjust |
A numeric vector specifying horizontal justification. If specified,
overrides the |
vjust |
A numeric vector specifying vertical justification. If specified,
overrides the |
default.units |
A string indicating the default units to use if |
expansion |
An expansion factor; determines whether any space is left between the extent of the picture and the bounding rectangle it is drawn within. |
xscale |
A numeric vector of length two indicating the minimum and maximum on the x-scale. |
yscale |
A numeric vector of length two indicating the minimum and maximum on the y-scale. |
distort |
A logical value indicating whether the image should preserve its aspect ratio or distort to fit the area it is being drawn within. |
gpFUN |
A function that takes in a grid |
... |
For |
ext |
A character vector. Selects from one of three possible extensions
for drawing imported pictures. |
delayContent |
If |
name |
A character identifier. |
prefix |
A character string. A prefix to add to referenced gridSVG content
(e.g. pattern fills). Only used when |
clip |
Clipping setting passed to the viewport that is set up for drawing the imported image. |
If width
or height
is NULL
, and
distort=FALSE
,
the aspect ratio of the image will be respected.
By default, the image will match the width/height of the current viewport,
(if distort=FALSE
, as much as the aspect ratio allows),
less any expansion
.
A grid gTree.
Simon Potter
grobify
, grid.symbols
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.