The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Title: Show an Image on an 'R' Graphics Device
Version: 1.0.0
Author: Gábor Csárdi
Maintainer: Gábor Csárdi <csardi.gabor@gmail.com>
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.
License: GPL-2 | GPL-3
LazyData: true
URL: https://github.com/r-lib/showimage#readme
BugReports: https://github.com/r-lib/showimage/issues
Imports: png, tools
Suggests: covr, testthat
RoxygenNote: 5.0.1
Encoding: UTF-8
NeedsCompilation: no
Packaged: 2018-01-23 10:39:23 UTC; gaborcsardi
Repository: CRAN
Date/Publication: 2018-01-24 09:51:26 UTC

Show an Image on an R Graphics Device

Description

Show an Image on an R Graphics Device

Usage

show_image(file, mar = c(0, 0, 0, 0), axes = FALSE, frame.plot = TRUE,
  asp = NULL, ...)

Arguments

file

Name of the image file to show.

mar

Margin, the mar parameter, see par.

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 plot. If NULL, then the original aspect ratio of the image is used.

...

Additonal arguments are passed to plot.

Value

Nothing.

Examples

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)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.