points.BitmapImage {R.image}R Documentation

Places the image on a existing plot as points

Description

Places the image on a existing plot as points.

Usage

## S3 method for class 'BitmapImage':
points(x, x0=NULL, y0=NULL, width=NULL, height=NULL, pch=15, cex=NULL, ...)

Arguments

x0, y0 The x and y position of the lower left corner of the image. If NULL, x0 and y0 will be the coordinate at the very left and the very bottom of the current plot, respectively.
width The width of the image in dimensions of the current plot. The width can also be specify in percentage of the width of the current plot, by e.g. width=\"20%\". If NULL, the full width will be used.
height The height of the image in dimensions of the current plot. The height can also be specify in percentage of the height of the current plot, by e.g. height=\"20%\". If NULL, the full height will be used.
pch The point style do be used as a pixel. Default value is 15, which is a solid square.
cex The scaling factor of each pixel. If NULL the size of the pixels will be set automatically.
... Any graphical parameters as accepted by most plot functions.

Author(s)

Henrik Bengtsson (http://www.braju.com/R/)

See Also

For plotting the image on new plot see *plot(). For a more precise way of drawing the image see *image(). For more information see BitmapImage.

Examples

   # Read the images 'logosm.ppm' of size 51x38.
   logo <- BitmapImage$read("logosm.ppm", path=system.file("images", package="R.image"))

   # Read the images 'hb.ppm' of size 88x113.
   hb <- BitmapImage$read("hb.ppm", path=system.file("images", package="R.image"))
 
   image(hb)
   points(logo, x0=5,y0=5, width=13, height=17)

   # Be careful not to do

   #   points(logo, x=5,y=5, width=13, height=17)

   # because that will call points(x=5,y=5, logo, ...),
   # which results in an error!
 

[Package R.image version 0.2.3 Index]