Show an Image on an R Graphics Device
show_image(file, mar = c(0, 0, 0, 0), axes = FALSE, frame.plot = TRUE,
asp = NULL, ...)Name of the image file to show.
Margin, the mar parameter, see par.
Whether to show the axes. You need to increase the margin to see the axis labels.
Whether to draw a frame around the plot.
Aspect ratio parameter for plot. If NULL,
then the original aspect ratio of the image is used.
Additonal arguments are passed to plot.
Nothing.
rlogo <- system.file("img", "Rlogo.png", package="png")
show_image(rlogo)
## Create a plot in a PNG and show it
png(tmp <- tempfile(fileext = ".png"))
pairs(iris)
dev.off()
#> agg_record_346871191
#> 2
show_image(tmp)