View source: R/panel.xyimage.R
panel.xyimage | R Documentation |
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.
panel.xyimage(x, y, subscripts, groups = NULL, pch = NULL, cex = 1, ..., grid = FALSE, abline = NULL)
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
|
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.
Deepayan Sarkar
panel.xyplot
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.