Title: | Show an Image on an 'R' Graphics Device |
---|---|
Description: | Sometimes it is handy to be able to view an image file on an 'R' graphics device. This package just does that. Currently it supports 'PNG' files. |
Authors: | Gábor Csárdi [aut, cre], Posit Software, PBC [cph, fnd] |
Maintainer: | Gábor Csárdi <[email protected]> |
License: | GPL-2 | GPL-3 |
Version: | 1.0.0 |
Built: | 2024-12-09 06:15:24 UTC |
Source: | https://github.com/r-lib/showimage |
Show an Image on an R Graphics Device
show_image( file, mar = c(0, 0, 0, 0), axes = FALSE, frame.plot = TRUE, asp = NULL, ... )
show_image( file, mar = c(0, 0, 0, 0), axes = FALSE, frame.plot = TRUE, asp = NULL, ... )
file |
Name of the image file to show. |
mar |
Margin, the |
axes |
Whether to show the axes. You need to increase the margin to see the axis labels. |
frame.plot |
Whether to draw a frame around the plot. |
asp |
Aspect ratio parameter for |
... |
Additonal arguments are passed to |
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() show_image(tmp)
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() show_image(tmp)