panel.xyimage.RdPanel 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)Data vectors to be plotted.
An integer vector of subscripts giving indices of the x and
y values in the original data source. See the corresponding
entry in xyplot for details.
A factor defining groups.
A character vector giving path(s) or URL(s) of PNG or JPEG files. If
groups is specified, there should be one value for each
level, otherwise this should have length 1. Recycled as necessary.
A numeric multiplier for the size of the symbols. As with
pch, this can be a vector corresponding to levels of
groups.
Further arguments are accepted but ignored.
A logical flag, character string, or list specifying whether and how
a background grid should be drawn. See panel.xyplot
for details.
A numeric vector or list, specifying arguments arguments for
panel.abline, which is called with those
arguments. See panel.xyplot
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.
if (FALSE) { # \dontrun{
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")
} # }