Returns a plot that displays an image. It enables users to directly include a
.png
or a .jpeg
file in a plot region by providing their path.
plotImage(obj = NULL, file = NULL, add = FALSE, ...)
obj | an object of class |
---|---|
file | a path to either a |
add | logical. Should images be added on the current graph? If FALSE a new plot is created. |
... | additional arguments to be passed to |
Note that either obj
or file
must be defined.
If a path is provided either readPNG
or readJPEG
according to
the end of the file extension.