Wolfram Fischer
2002-Oct-14 20:10 UTC
[R] import a bitmap image and add it to graphics display
Hello Is there a possibility to import and add a bitmap image (png or similar) to a R graphics display. It would be helpful e.g. to locate positions of points of a scanned map or to add a background to a R graphic. Wolfram -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
Wolfram Fischer
2004-Aug-05 09:03 UTC
[R] import a bitmap image and add it to graphics display
> Hello > > Is there a possibility to import and add a bitmap image (png or > similar) to a R graphics display. It would be helpful e.g. to > locate positions of points of a scanned map or to add a background > to a R graphic. > > WolframI found the package pixmap with the functions x <- read.pnm( file ) and plot(x) This plots pnm pictures as R graphics. (Other picture formats can be converted to pnm pictures by several pnm commands on Linux or by using gimp.) Overlaying such a picture with a graph could be done as follows: library(pixmap) example(pixmap) plot(x) m <- 20 ; points( x=m*c(0,1,2), y=m*c(0,2,1), col='red', type='b', lwd=5 ) There rests a problem with the scale: Question: How can I scale a pixmap object? Wolfram