[R] Place a graphic into an R-plot

Anders Nielsen anielsen at math.ku.dk
Thu Sep 18 15:03:24 CEST 2003


Hi,

You need to install the pixmap package to do that. After that
is installed the following lines illustrate how to use it.


> library(pixmap)
>  x <- read.pnm(system.file("pictures/logo.ppm", package = "pixmap")[1])
> layout(matrix(c(1,1,2,3),2,2))
> plot(rnorm(100))
> plot(rnorm(100))
> plot(x)
>

Cheers,

Anders.


On Thu, 18 Sep 2003, Morrison, Gordon wrote:

> I have a graphic image in a file (say a *.jpeg or *.png file) and want to
> put it into a plot. I have segmented the plot area by means of the layout
> function and successfully plotted my data in the appropriate segments. I
> cannot find how to put my graphic image onto the same plot. Searching the
> archives has shed little light on my challenge.
>
> Many thanks in anticipation.
>
> Gordon
>
> > version
>
> platform i386-pc-mingw32
> arch     i386
> os       mingw32
> system   i386, mingw32
> status
> major    1
> minor    7.1
> year     2003
> month    06
> day      16
> language R
>
>
> **********************************************************************
> This is a commercial communication from Commerzbank AG.\ \ T...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help
>
>




More information about the R-help mailing list