panel.xyimage {latticeExtra} | R Documentation |
Scatter plots using emoji-like images
Description
Panel function that create scatter plots with emoji-like images for plotting character. Images can be local files or URLs. Only PNG and JPEG images are currently supported.
Usage
panel.xyimage(x, y,
subscripts,
groups = NULL,
pch = NULL,
cex = 1,
...,
grid = FALSE, abline = NULL)
Arguments
x , y |
Data vectors to be plotted. |
subscripts |
An integer vector of subscripts giving indices of the |
groups |
A factor defining groups. |
pch |
A character vector giving path(s) or URL(s) of PNG or JPEG files. If
|
cex |
A numeric multiplier for the size of the symbols. As with
|
... |
Further arguments are accepted but ignored. |
grid |
A logical flag, character string, or list specifying whether and how
a background grid should be drawn. See |
abline |
A numeric vector or list, specifying arguments arguments for
|
Details
The image sources given by pch
are downloaded if necessary and
read in every time the panel function is called. If the same images
are to be used in multiple panels, it may be more efficient to
download them once and provide the file paths rather than provide
URLs.
Author(s)
Deepayan Sarkar
See Also
Examples
## Not run:
alive <- "https://twemoji.maxcdn.com/72x72/1f60a.png"
dead <- "https://twemoji.maxcdn.com/72x72/1f480.png"
dotplot(Titanic,
scales = list(x = "free"),
between = list(x = 1),
panel = panel.xyimage,
pch = c(dead, alive), grid = "h",
main = "Survival on the Titanic",
xlab = "Number of persons")
## End(Not run)